Prev Next

Run Model Simulation

A simulation executes the model step-by-step, enabling you to validate the logic of your behavioral model. The current execution step is automatically highlighted in the model's diagram to make it easy to understand the various processes and state changes as they occur during the simulation.

There are several ways to start a model simulation:

  • When the active diagram can be simulated, the Run button on the main Simulation window will process the current diagram, either by running an existing script or defining a new temporary one
  • When the active diagram can not be simulated, the Run button on the main Simulation window will run the simulation for the active Execution Analyzer script
  • By right-clicking on a Simulation script in the Execution Analyzer window and selecting the 'Start Simulation' option
  • By right-clicking on a suitable diagram and selecting one of the 'Execute Simulation' options

There are visual cues during execution. When the simulation is running, Enterprise Architect will actively highlight each active node for each executed step. In addition, all outgoing transitions and control flows will be highlighted, showing the possible paths forward. Elements at the end of possible paths forward will be de-emphasized to half-strength and any other remaining elements will be 90% 'grayed out'. This provides a very dynamic and easy to follow execution that continually refocuses attention on the execution context.

Access

Ribbon

Simulate > Dynamic Simulation > Simulator > Open Simulation Window

Edition Specific Details

In the Professional edition, if a branch is encountered in the execution, the simulator prompts you to choose the appropriate path to take in your execution.

In the Corporate and above editions, in which JavaScript is enabled, the Simulation will automatically evaluate all guards and effects and dynamically execute the Simulation without user intervention. If the Simulation becomes blocked due to no possible paths forward evaluating to True (or multiple paths evaluating to True) you can modify Simulation variables on the fly using the console input of the Simulation Execution window.  

Run a Simulation Using the Toolbar

Icon

Action

See also

Start the simulator for the current diagram or, if the current diagram cannot be simulated, run simulation using the activated simulation script.

Activate Simulation Script

Pause the simulation.

When the simulation is paused, step over, step in and step out to control the simulator's execution at the required step in the model simulation.

Stop the simulation.

Click on the drop-down arrow and select the type of simulation to run:

  • 'Interpreted' - Perform dynamic execution of a simulation (Corporate and Extended Editions)
  • 'Manual' - Step through a simulation manually (the only option available in the Professional edition)
  • 'Executable' - Select when running the simulation on an Executable State Machine

simulation_tool

Click on the drop-down arrow and select from a menu of options for performing specific operations on the simulation script and output, such as Build, Run, Generate and View Breakpoints.

Vary the execution rate of the simulation, between 0% and 100%; at:

  • 100%, the simulation executes at the fastest possible rate
  • 0% the simulator breaks execution at every statement

Notes

  • The Simulation tool only becomes active when a valid simulation Execution Script is activated
  • You can set a Simulation script as the current default by setting its checkbox in the Execution Analyzer window

Learn more