Customization > SySim- SysML model execution > Working with a SySim model execution > Concepts and Reference > SySim model execution loop (SySim)
  
SySim model execution loop (SySim)
SySim model executions run in a model execution loop. Each single execution of the loop is a model execution step. Each model execution step includes the following phases:
Input Latch phase
In the first phase of a model execution step, SySim latches the input values of each executing block (each SySim Control Block).
Time Advance phase
SySim gives control to each executing block in turn to read the latched input values and perform internal computations using the current simulation time. Each execution block then updates the values of its output ports.
Publish phase
SySim makes each executing block publish the values of their output ports, so that the values are visible and transmitted to connected input ports.
Wait phase
The system waits for the next execution time slot. When the next execution time slot is available, the current simulation time is updated and the simulation step finishes.
For each SySim Control Block you can create event handling Operations that handle the Input Latch, Time Advance and Publish phases of the SySim model execution loop. For more information refer to SySim model execution event handling
Concepts and Reference