next up previous
Next: L (Line) type nodes Up: I (Input) type nodes Previous: Indexes

Examples

  1. I::

    This type of node can only be activated from the INIT section or from another node. It generates a message and sends it to the successor node (by default the following in the program).

  2.     MainEntrance (I) Office1, Office2 ::
          IF Number < 40 THEN IT := TRIA(TBAMin, TBAMode, TBAMax);
          ClassOff := FunClass;
          IF ClassOff = Normal THEN SENDTO(Office1) ELSE SENDTO(Office2);
          -------------------------------------------------------------
    
       INIT TIME := 5; TSIM := 2000; ACT(MainEntrance, 0);
           TBAMin := 3; TBAMode := 5; TBAMax := 8;
           FunClass := Normal, 4 / Special, 1;
    
       DECL TYPE Tc = (Normal, Special);
           VAR TBAMin, TBAMode, TBAMax: REAL;
           MESSAGES MainEntrance(ClassOff: Tc; h: REAL);
           GFUNCTIONS FunClass FREQ(Tc): REAL: 2;
    Messages are generated and sent to Office1 or Office2 according to the field ClassOff, whose value is given by the function FunClass. Up to 40 messages are generated. The time between successive generations are taken from a triangular distribution.
  3.     Samples (I) [1 .. 7] LabSec[INO] :: IT := EXPO(MeanArrT[INO]);
             BactConc := GAMMA(MBac[INO], 0.2 * MBac[INO]);
             SENDTO(LabSec[INO]);
    
        LabSec (R) [1 .. 7] :: STAY := 0.031 * BactConc;
    
        INIT  TSIM := 7200;
         ASSI  MeanArrT[1..7] := (3.2, 3.6, 3.3, 3.8, 4.0, 3.97, 3.5);
         FOR I := 1 TO 7 DO ACT(Samples[I], EXPO(MeanArrT[I]));
         ASSI MBac[1 .. 7] := (98, 106, 86, 113, 102, 122, 104);
    
        DECL
         VAR MBac: ARRAY[1 .. 7] OF REAL; I: INTEGER;
             MeanArrT: ARRAY[1 .. 7] OF REAL;
         MESSAGES Samples(BactConc: REAL);

    The messages (samples to be analyzed in a Lab) arrive at random from seven original points and after being assigned a value for BactConc by means of a GAMMA function, they are delivered to one of the seven nodes LabSec (according to their source).

  4.     Hangar (I) Quarry[INO], Mine, City :: SENDTO(City);
                  COPYMESS(5) IF ICOPY <= 3 THEN SENDTO(Quarry[ICOPY])
                                            ELSE SENDTO(Mine);
    The produced message (Truck) is sent to City. Five copies are made. The 1,2, and 3 are sent respectively to Quarry[1], Quarry[2], and Quarry[3]. The other two (4 and 5) are sent to Mine.


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