|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 3738 (0xe9a)
Types: TextFile
Names: »B«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
separate (Tracker.Manipulate_Data)
procedure Calc_Time_Done is
--------------------------------------------------------------------------------
--|
--| NAME: CALC_TIME_DONE
--|
--| OVERVIEW:
--| This procedure calculates the date each element will be completed
--| and the total number of hours left to completion.
--|
--| EXCEPTIONS HANDLED:
--| others an error message is printed and execution continues
--|
--| HISTORY:
--| written by Bonnie Burkhardt March 1985
--|
--| NOTES:
--| The activities used in the calculations include all activities
--| that were marked as being considered in the calculations and all
--| activities whose priority is less than or equal to any activity
--| marked as being considered.
--|
--------------------------------------------------------------------------------
use Calendar;
use El_List_Pkg;
use Pr_List_Pkg;
use Ac_List_Pkg;
Ac_Ptr : Activity_Pointer;
Ac_Index : Integer := 0;
Ac_Priorities : array (1 .. Max_Num_Activities) of Integer range 1 .. 10 :=
(others => 1);
Begin_Date : Date_Type := Null_Date;
Begin_Date_Used : Integer range 1 .. 3 := 1;
End_List : Boolean := False;
Hi_Ac_Priority : Integer := 1;
Pct_Tot_Proj : array (1 .. Max_Num_Activities) of
Float range 0.0 .. 100.0 := (others => 0.0);
Pr_Ptr : Personnel_Pointer;
Test_Priority : Integer := 1;
Total_Time : Float := 0.0;
procedure Get_El_Time is separate;
begin
-- calculate the highest priority activity considered and
-- initialize the PCT_TOT_PROJ array
Start_Walk (Ac_List);
Ac_Index := 0;
loop
Walk (Ac_List, Ac_Ptr, End_List);
exit when End_List;
Ac_Index := Ac_Index + 1;
Pct_Tot_Proj (Ac_Index) := Ac_Ptr.Percent_Tot_Proj;
Ac_Priorities (Ac_Index) := Ac_Ptr.Priority;
if Ac_Ptr.Consider_In_Calc and Ac_Ptr.Priority > Hi_Ac_Priority then
Hi_Ac_Priority := Ac_Ptr.Priority;
end if;
end loop;
-- compute each person's amount of work remaining and date completed
Start_Walk (Pr_List);
loop
Walk (Pr_List, Pr_Ptr, End_List);
exit when End_List;
-- compute the beginning date
if (Pr_Ptr.Start_Dates (3) /= Null_Date) and
(Pr_Ptr.Stop_Dates (2) < Date) then
-- starting in third time span
Begin_Date_Used := 3;
if Pr_Ptr.Start_Dates (3) > Date then
Begin_Date := Pr_Ptr.Start_Dates (3);
else
Begin_Date := Date;
end if;
elsif (Pr_Ptr.Start_Dates (2) /= Null_Date) and
(Pr_Ptr.Stop_Dates (1) < Date) then
-- starting in second time span
Begin_Date_Used := 2;
if Pr_Ptr.Start_Dates (2) > Date then
Begin_Date := Pr_Ptr.Start_Dates (2);
else
Begin_Date := Date;
end if;
else
-- starting in first time span
Begin_Date_Used := 1;
if (Pr_Ptr.Start_Dates (1) /= Null_Date) and
(Pr_Ptr.Start_Dates (1) > Date) then
Begin_Date := Pr_Ptr.Start_Dates (1);
else
Begin_Date := Date;
end if;
end if;
-- compute the completion date for each person's elements
Total_Time := 0.0;
for Test in 1 .. Hi_Ac_Priority loop
Test_Priority := Test;
Get_El_Time;
end loop;
end loop;
exception
when others =>
Put_Line ("exception raise in CALC_TIME_DONE");
end Calc_Time_Done;