DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦fd320e54a⟧ Ada Source

    Length: 8192 (0x2000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Quadrant_G_Update_Rule, seg_04c81e, separate Qualit_Generic_Agent.Qualit_Update_Rule_Bundle

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



with System_Utilities;
with Time_Utilities;

separate (Qualit_Generic_Agent.Qualit_Update_Rule_Bundle)

package body Quadrant_G_Update_Rule is


    function Premiss return Fact_Queries is
        use Qualit_Frames;
        use Slot;
        use Slot.Operators;
    begin
        return (Updates.Exist ((Valid => Is_Equal (True_Boolean))),
                Epsilons.Exist ((Value => Is_Equal (Null_Value))),
                Delta_Ys.Exist ((Value => Is_Any)),
                Actual_Positions.Exist ((Value => Is_Any)));
    end Premiss;


    procedure Action (Objects : Fact_Collection) is  
        use Qualit_Frames;
        use Slot;
        use Slot.Operators;
        The_Update_Fact     : Fact_Name renames Objects (1);  
        The_Epsilon_Fact    : Fact_Name renames Objects (2);
        The_Delta_Y_Fact    : Fact_Name renames Objects (3);
        The_Actual_Pos_Fact : Fact_Name renames Objects (4);

        The_New_Actual_Pos  : Slot.Object :=
           Actual_Positions.Get (The_Actual_Pos_Fact, Value);
        The_New_Delta_Y_Val : Slot.Object;
        The_Agent2_Pos      : Slot.Object;

        The_Elapsed_Time_In_Millisec : Integer;
        The_Time_Interval            : Time_Utilities.Interval;
    begin
        Display.New_Line (The_Output_Window);
        Display.Put_Line
           ("********************************************************",
            The_Output_Window);
        Display.Put_Line ("      quadrant G : UPDATE RULE ", The_Output_Window);
        Display.Put_Line
           ("********************************************************",
            The_Output_Window);

        Updates.Change (The_Update_Fact, Valid, False_Boolean);

        Set_Position_Variation (Agent_Id, Null_Value);
        Set_Position (Agent_Id, The_New_Actual_Pos);

        The_Agent2_Pos      := Get_Position (The_Other_Agent);
        The_New_Delta_Y_Val := The_New_Actual_Pos - The_Agent2_Pos;

        Display.Put ("The current position is :", The_Output_Window);
        Display.Put_Line (Integer'Image (Get (The_New_Actual_Pos)),
                          The_Output_Window);
        Display.Put ("The up commande is : ", The_Output_Window);
        Display.Put_Line (Integer'Image (Get (Null_Value)), The_Output_Window);
        Display.Put ("The delta y val is :", The_Output_Window);
        Display.Put_Line (Integer'Image (Get (The_New_Delta_Y_Val)),
                          The_Output_Window);
        Display.New_Line (The_Output_Window);

        The_Time_Interval := Time_Utilities.Convert (System_Utilities.Elapsed);
        The_Elapsed_Time_In_Millisec :=
           Integer (The_Time_Interval.Elapsed_Minutes) * 60000;
        The_Elapsed_Time_In_Millisec :=
           The_Elapsed_Time_In_Millisec +
              (Integer (The_Time_Interval.Elapsed_Seconds) * 1000);
        The_Elapsed_Time_In_Millisec :=
           The_Elapsed_Time_In_Millisec +
              Integer (The_Time_Interval.Elapsed_Milliseconds);

        Qualit_Result_File_Maker.Write
           (The_Output_File, Integer'Image (The_Elapsed_Time_In_Millisec) &
                                " " & Integer'Image (Get (The_New_Actual_Pos)) &
                                " " & Integer'Image (Get (Null_Value)) & " " &
                                Integer'Image (Get (The_New_Delta_Y_Val)));

        Epsilons.Delete (The_Epsilon_Fact); -- to stop
    end Action;


end Quadrant_G_Update_Rule;

E3 Meta Data

    nblk1=7
    nid=3
    hdr6=8
        [0x00] rec0=1f rec1=00 rec2=01 rec3=056
        [0x01] rec0=0d rec1=00 rec2=07 rec3=00c
        [0x02] rec0=14 rec1=00 rec2=04 rec3=04a
        [0x03] rec0=17 rec1=00 rec2=05 rec3=000
        [0x04] rec0=c0 rec1=00 rec2=00 rec3=100
        [0x05] rec0=43 rec1=6e rec2=21 rec3=0e2
        [0x06] rec0=33 rec1=3c rec2=00 rec3=036
    tail 0x21753508286dc58983f92 0x42a00088462063c03
Free Block Chain:
  0x3: 0000  00 06 03 9a 00 00 00 00 4f 20 20 20 20 20 20 20  ┆        O       ┆
  0x6: 0000  00 02 03 74 80 2c 74 69 6c 69 74 69 65 73 2e 43  ┆   t ,tilities.C┆
  0x2: 0000  00 00 03 fc 80 11 61 6d 65 73 20 4f 62 6a 65 63  ┆      ames Objec┆