DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: B T

⟦911c4a4de⟧ TextFile

    Length: 5591 (0x15d7)
    Types: TextFile
    Names: »B«

Derivation

└─⟦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⟧ 

TextFile

separate (Tracker.Manipulate_Data.Group_Data_Fixes)
procedure Reset_Data is
    --------------------------------------------------------------------------------
    --|
    --|  NAME:  RESET_DATA
    --|
    --|  OVERVIEW:
    --|    For each element, this procedure calculates the amount of work
    --|    completed and stores this value in the SIZE_DONE_AT_START field.
    --|    After this calculation, it erases the percent complete field in the
    --|    element by setting it equal to "    ".
    --|
    --|  EXCEPTIONS HANDLED:
    --|    others   an error message is printed and execution continues
    --|
    --|  HISTORY:
    --|    written by   Bonnie Burkhardt   March 1985
    --|
    --|  NOTE:
    --------------------------------------------------------------------------------

    use El_List_Pkg;
    use Ac_List_Pkg;
    use Ss_List_Pkg;

    Ac_Ptr : Activity_Pointer;
    Ac_Index : Integer := 0;
    Ele_Ptr : Element_Pointer;
    Ele_Done : Float range 0.0 .. 999_999.0;
    Ele_Size : Float range 0.0 .. 999_999.0;
    Ele_Start : Float range 0.0 .. 999_999.0;
    End_List : Boolean := False;
    Gr_Tot_Size : array (1 .. Num_Of_Activities) of
                     Float range 0.0 .. 999_999.0 := (others => 0.0);
    Gr_Tot_Done : array (1 .. Num_Of_Activities) of
                     Float range 0.0 .. 999_999.0 := (others => 0.0);
    Gr_Tot_Start : array (1 .. Num_Of_Activities) of
                      Float range 0.0 .. 999_999.0 := (others => 0.0);
    Done : Float range 0.0 .. 9_999_999.0 := 0.0;
    None_Complete : Activity_Phase_Percent := (others => ' ');
    Size : Float range 0.0 .. 9_999_999.0 := 0.0;
    Start : Float range 0.0 .. 9_999_999.0 := 0.0;
    Ss_Ptr : Subsystem_Pointer;

    Ss_Tot_Size : Float range 0.0 .. 999_999.0 := 0.0;
    Ss_Tot_Done : Float range 0.0 .. 999_999.0 := 0.0;
    Ss_Tot_Start : Float range 0.0 .. 999_999.0 := 0.0;

begin
    Start_Walk (Ss_List);

    loop
        Walk (Ss_List, Ss_Ptr, End_List);
        exit when End_List;

        -- reset subsystem totals
        Ss_Tot_Size := 0.0;
        Ss_Tot_Done := 0.0;
        Ss_Tot_Start := 0.0;

        -- set through each subsystem's element list and calculate each element
        Start_Walk (Ss_Ptr.Element_List);

        loop
            Walk (Ss_Ptr.Element_List, Ele_Ptr, End_List);
            exit when End_List;

            Ele_Done := 0.0;
            Ele_Start := Float (Ele_Ptr.Size_Done_At_Start);
            Ele_Size := Float (Ele_Ptr.Current_Size) - Ele_Start;
            Ss_Tot_Size := Ss_Tot_Size + Ele_Size * Ele_Ptr.Complexity;
            Ss_Tot_Start := Ss_Tot_Start + Ele_Start * Ele_Ptr.Complexity;

            -- calculate the amount of work done for each activity in this element
            --| The SIZE_DONE_AT_START is equal to the old SIZE_DONE_AT_START plus
            --| any work that has been completed since the start of the project.
            --| This means that the data can be 'reset' or 'restarted' as many times
            --| as necessary with no loss in accuracy.
            Start_Walk (Ac_List);
            Ac_Index := 0;

            loop
                Walk (Ac_List, Ac_Ptr, End_List);
                exit when End_List;
                Ac_Index := Ac_Index + 1;
                Size := Ele_Ptr.Complexity * Ele_Size *
                           Ac_Ptr.Percent_Tot_Proj / 100.0;
                Start := Ele_Ptr.Complexity * Ele_Start *
                            Ac_Ptr.Percent_Tot_Proj / 100.0;
                Done :=
                   Size * Ac_Pct_Value
                             (Ele_Ptr.Activity_Completeness (Ac_Index)) / 100.0;
                Gr_Tot_Size (Ac_Index) := Gr_Tot_Size (Ac_Index) + Size;
                Gr_Tot_Done (Ac_Index) := Gr_Tot_Done (Ac_Index) + Done;
                Gr_Tot_Start (Ac_Index) := Gr_Tot_Start (Ac_Index) + Start;
                Ele_Done := Ele_Done + Done;
                Ss_Tot_Done := Ss_Tot_Done + Done;
            end loop;

            Ele_Ptr.Activity_Completeness := None_Complete;
            Ele_Ptr.Size_Done_At_Start :=
               Ele_Ptr.Size_Done_At_Start + Integer (Ele_Done);
            -- adjust for round off error

            if Ele_Ptr.Size_Done_At_Start > Ele_Ptr.Current_Size then
                Ele_Ptr.Size_Done_At_Start := Ele_Ptr.Current_Size;
            end if;
        end loop;

        -- compute the percent complete at start for this subsystem
        if Ss_Tot_Size + Ss_Tot_Start = 0.0 then
            Ss_Ptr.Percent_At_Start := 0.0;
        elsif Ss_Tot_Done <= Ss_Tot_Size then
            Ss_Ptr.Percent_At_Start := 100.0 * (Ss_Tot_Done + Ss_Tot_Start) /
                                          (Ss_Tot_Start + Ss_Tot_Size);
        else
            Ss_Ptr.Percent_At_Start := 100.0;
        end if;
    end loop;

    -- calculate the percent complete at start by activity
    Ac_Index := 0;
    Start_Walk (Ac_List);

    loop
        Walk (Ac_List, Ac_Ptr, End_List);
        exit when End_List;
        Ac_Index := Ac_Index + 1;

        if Gr_Tot_Start (Ac_Index) + Gr_Tot_Size (Ac_Index) = 0.0 then
            Ac_Ptr.Percent_At_Start := 0.0;
        elsif Gr_Tot_Done (Ac_Index) <= Gr_Tot_Size (Ac_Index) then
            Ac_Ptr.Percent_At_Start :=
               100.0 * (Gr_Tot_Start (Ac_Index) + Gr_Tot_Done (Ac_Index)) /
                  (Gr_Tot_Start (Ac_Index) + Gr_Tot_Size (Ac_Index));
        else
            Ac_Ptr.Percent_At_Start := 100.0;
        end if;
    end loop;

exception
    when others =>
        Put_Line ("exception raise in RESET_DATA");
end Reset_Data;