Download Morpheus User Reference Manual

Transcript
36
Model integration
2. Sequential processes: Non-time-dependent models such as Equations,
Reporters and Events are updated. Their order is computed from their
symbolic interdependencies (section 5.2.2).
3. Analysis: Finally, visualization and data output is updated and the simulation state is saved to file.
Termination
At the end of simulation, visualization and analysis tools specified in Analysis tools
can be executed once more and the simulation state is written to file.
5.2.2
Scheduling update order
The order of execution is independent of the order in which model components
are specified in the model description file. Rather, updates of temporal processes
(CPM, System, Diffusion) are scheduled according to the fixed schedule shown in
figure 5.1 and updates of sequential processes such as Equations and Reporters
are scheduled according to their symbolic interdependencies.
Sequential processes are ordered according to the dependencies in their input
and output symbol based on the following rule:
• Before updating a process, its input symbols must all be updated.
This is achieved by scheduling all processes that have these symbols as an output
before. Note that this is only possible if no algebraic loops or circular dependencies
exist between these processes. Therefore, such loops are only allowed within the
System environment.
The order of execution of data output and visualization in Analysis is arbitrary
and does not affect the simulation itself. Therefore, these are executed in the order
in which they are given in the model description file.
5.2.3
Update interval
The simulation cycle is iterated for the period from StartTime to StopTime, called
the global simulation time. The number of iterations that are executed during this
period depends on the temporal process with the smallest time step. During each
iteration, only the processes that require updating are executed. The intervals at
which each process requires updating are determined during initialization, based
on user-specified time-steps or symbolic interdependencies.
The frequency in which CPM and Systems are updated is based on user-specified
information. The update interval of CPM models is the duration of a single Monte
Carlo step, specified in CPM/MCSDuration (see 3.4.4). The update interval of
a System is determined by its time-step, divided by time-scaling (see 3.1).
Similarly, the intervals at which Analysis processes are executed to do visualization
and data analysis also depend on a user-specified interval.