Contents - Index


Model structure



The main structure of a model is shown below. 

MODEL model_name -- Model_name is an arbitrary user specified name
                 -- The mod-file must have the same name 

INPUT            -- Declaration of input variables. 
   
OUTPUT           -- Name of output variables
 
DATA             -- Name of data variables

VAR              -- Name of local variables

CONST            -- Name and values of constants (e.g. X {­VAL:4.5})

comment             Block between comment and endcomment ignored. The sign '--' causes the rest of the line to be ignored.
endcomment

INPUT, OUTPUT and DATA variables are passed into the model by ATPDraw. Variable and constants names are separated by ',' or CR
E.g.: 
INPUT
  A1 
  A2 
OUTPUT
  N2, N3
  N4
DATA
  D1, D2
VAR
  X, Y, Z
CONST
  W {­VAL:3}

HISTORY          -- Default values of variables and expressions {­DFLT:n}

DELAY            -- Specify the number of required DELAY CELLS. Default 100.

INIT             -- Initialization block. Executed for time t=0 only.

ENDINIT

EXEC             -- Execution block. Executed once for each time step.

ENDEXEC

ENDMODEL