next up previous
Next: General type nodes Up: A (Autonomous) type nodes Previous: Indexes

Examples

  1.     Print (A) :: IT := 365; Annual;
    Each 365 unit times the procedure Annual is called (for instance to print a report of the state of the model). The node must be activated for the first time from other node or from the INIT section.
  2.     GraphProPri (A) ::   IT := 0.125;
                             GRAPH(0, 50, BLACK, TIME: 6: 1, WHITE;
                                   Prod: 7: 1, Production, 0, 1000, RED;
                                   Price: 7: 1, PriceInd, 0, 2, Yellow);
    Each interval time of 0.125 units (8 times per year) points with the new values of Prod and Price are added to the time graphic and united by a line to the previous point. The node must be activated for the first time from other nodes or from the INIT section.
  3.     NewStr (A) NewSource ::  IT := 0.5;
                                 If CondStCh THEN
                                             BEGIN
                                               ACT(NewSource, 0);
                                               CREATE(MessSource)
                                               SENDTO(NewSource);
                                               DEACT(Inst3);
                                               ACT(Proc4, 12);
                                               STAT;
                                               CLRSTAT;
                                             END;
    Each 0.5 units of time the boolean function CondStCh (that may compute conditions for a structural change) is evaluated. If it is TRUE, the nodes NewSource and, with a delay, Proc4 are activated. The Inst3 is deactivated. A message is sent to the newly activated node. The statistics are displayed and then initialized for a new statistical gathering.


domingo c
Mon Mar 20 17:31:11 PST 2000