initial
Declare statements which should be executed once at the beginning of the simulation run
Syntax
initial
<list of statements/equations>
end
Description
The INITIAL section is used to denote statements which should be evaluated exactly once at the beginning of the simulation run. These statements typically include things like scaling of model parameters, initialization of discrete events via SCHEDULE statements, initialization of model variables, etc. The INITIAL section is not sorted, so care must be taken to place statement so that any inputs to a particular statement are computed by previous statements, contrary to the sorting done with DERIVATIVE section statements.
A model may have multiple INITIAL sections, and they may be embedded in other section, such as a DERIVATIVE. At build time, the Magnolia translator collects all INITIAL sections a concatenates them in the order they were encountered in the file.
Example
initial
schedule on at 0.0
schedule spike at 2.75
schedule spike at 5.03
schedule spike at 7.234
end