Introduction
Example
Distribution
Tutorials
Applications
News
People
Publications
Hints

Example: GPSS code generator

This example shows a tool generated by AToM3 to graphically construct GPSS models and generate GPSS code from them. A snapshot of the generated tool is shown below (the generated tool has the same look-and-feel as AtoM3 itself).

images/snapshot01.png

The GPSS code generated by a graph-grammar in AToM3 is:

                 SIMULATE
           1     FUNCTION   RN1,C24
          0.0,0.0/0.1,0.104/0.2,0.222/0.3,0.355/0.4,0.509/0.5,0.69
          0.6,0.915/0.7,1.2/0.75,1.38/0.8,1.6/0.84,1.83/0.88,2.12
          0.9,2.13/0.92,2.52/0.94,2.81/0.95,2.99/0.96,3.2/0.97,3.5
          0.98,3.9/0.99,4.6/0.995,5.3/0.998,6.2/0.999,7.0/0.9997,8.0
          *
           L1    GENERATE   12,FN1
           L3    TEST G     V2,2,OUT
           L4    ASSIGN     1,V1,H
           L5    GATE LR    PH1,L4
           L6    ASSIGN     2,V1,H
           L7    TEST NE    P1,P2,L6
           L0    LOGIC R    PH1
           L8    TRANSFER   BOTH,L9,L11
           L9    LOGIC R    PH1
           L10   TERMINATE  1
           OUT   TERMINATE  0
           L11   ENTER      LNKS
           L12   GATE LR    PH2,L13
           L16   LOGIC S    PH2
           L17   ADVANCE    120,FN1
           L18   LOGIC R    PH1
           L19   LOGIC R    PH2
           L20   LEAVE      LNKS
           L21   TERMINATE  1
           L13   LOGIC R    PH1
           L14   LEAVE      LNKS
           L15   TERMINATE  1
           LNKS  STORAGE    10
           1     VARIABLE   XH1*RN1/1000+1
           2     VARIABLE   XH1-2*S$LNKS
                 START      1000
                 END