Book a Demo
Prev Next

Dynamic Simulations

Model Simulation brings your behavioral models to life with instant, real-time behavioral model execution. Coupled with tools to manage triggers, events, guards, effects, breakpoints and Simulation variables, plus the ability to visually track execution at run-time, the Simulator is a multi-featured means of 'watching the wheels turn' and verifying the correctness of your behavioral models. With Simulation you can explore and test the dynamic behavior of models. In the Corporate, Unified and Ultimate Editions, you can also use JavaScript as a run-time execution language for evaluating guards, effects and other scriptable items of behavior.

Extensive support for triggers, trigger sets, nested states, concurrency, dynamic effects and other advanced Simulation capabilities, provides a remarkable environment in which to build interactive and working models that help explore, test and visually trace complex business, software and system behavior. With JavaScript enabled, it is also possible to create embedded COM objects that will do the work of evaluating guards and executing effects - allowing the Simulation to be tied into a much larger set of dependent processes. For example, a COM object evaluating a guard condition on a State Transition might query a locally running process, read and use a set of test data, or even connect to an SOA web service to obtain some current information.

As Enterprise Architect uses a dynamic, script driven Simulation mechanism that analyzes and works with UML constructs directly, there is no need to generate intermediary code or compile simulation 'executables' before running a Simulation. This results in a very rapid and dynamic Simulation environment in which changes can be made and tested quickly. It is even possible to update Simulation variables in real time using the Simulation Console window. This is useful for testing alternative branches and conditions 'on the fly', either at a set Simulation break point or when the Simulation reaches a point of stability (for example, when the Simulation is 'blocked').

In the Professional Edition of Enterprise Architect, you can manually walk through Simulations - although no JavaScript will execute - so all choices are manual decisions. This is useful for testing the flow of a behavioral model and highlighting possible choices and processing paths. In the Corporate, Unified and Ultimate Editions it is possible to:

  • Dynamically execute your behavioral models
  • Assess guards and effects written in standard JavaScript
  • Define and fire triggers into running Simulations
  • Define and use sets of triggers to simulate different event sequences
  • Auto-fire trigger sets to simulate complex event histories without user intervention
  • Update Simulation variables 'on the fly' to change how Simulations proceed
  • Create and call COM objects during a Simulation to extend the Simulation's reach and input/output possibilities
  • Inspect Simulation variables at run time
  • Set a script 'prologue' for defining variables, constants and functions prior to execution
  • Use multiple Analyzer Scripts with differing 'prologues' for running the Simulation under a wide range of conditions

In the Unified and Ultimate Editions it is also possible to simulate BPMN models.

Using the Model Simulator, you can simulate the execution of conceptual model designs containing behavior. When you start a Simulation, the current model Package is analyzed and a dynamic Simulation process is triggered to execute the model.

To get up and running with Simulation, the only steps required are:

  • Build a behavioral diagram (State or Activity for manual or dynamic execution, Sequence for manual interaction only)
  • Optional: load the 'Simulation Workspace' layout - a fast way of bringing up all the frequently used Simulation windows
  • Click on the Simulator Play button

If the diagram contains any external elements (those not in the same Package as the diagram) you will have to create an Import connector from the diagram's Package to the Package containing the external elements. To do this, drag both Packages from the Browser window onto a diagram and then use the Quick Linker arrow to create the connector between them.

Simulation Overview


See also

Overview of the Model Simulator

Dynamic Simulations How it Looks

Use of the Simulation Window and Related Windows, and Running a Simulation

Simulation Windows Run Model Simulation

Set Up a Simulation and Activate a Simulation Script

Set Up Simulation Script Activate Simulation Script

Set Up and Use Simulation Breakpoints

Simulation Breakpoints

Simulate the Use of Objects

Objects and Instances in Simulation

The Use of Different Types of Action in Simulation

Action Behavior By Type Action Types Variable Actions

Perform Dynamic Simulation with JavaScript

Dynamic Simulation with Javascript Interaction Operand Condition and Message Behavior

The Use of Guards and Effects in Simulations

Guards and Effects

The Use of Triggers in Simulations

Triggers Simulation Events Window Waiting Triggers Re-Signal Triggers Trigger Parameters Trigger Sets and Auto-Firing Using Trigger Sets to Simulate an Event Sequence

Call Behaviors and Variables

Call Behaviors

Simulating Activity Returns

Activity Return Value Simulation

Simulating Structured Activity Behavior

Structured Activity Simulation

Simulating Multi-Threaded Processes

Multi-threading - Forks and Joins Multi-threading - Concurrent State Regions

Simulating Sub-Processes in Separate Diagrams

Using Composite Diagrams

Performing BPMN Simulations

BPMN Simulation

Simulate Win32 Dialog Behavior

Win32 User Interface Simulation

Platforms and Available Editions



See also

Models and Platforms Supported

The Model Simulator currently supports the execution of UML Activity, Interaction and StateMachine models and BPMN Business Processes on the Simulation platforms:

  • UML Basic
  • BPMN
Set Up Simulation Script

Edition Support

Model Simulation is available at different levels across the range of editions of Enterprise Architect:

  • Professional - Manual Simulation only
  • Corporate and above  -  Adds dynamic JavaScript evaluation; currently JavaScript is enabled for StateMachines and Activity graphs; it is not enabled for Interaction diagrams
  • Unified and Ultimate - Adds BPMN Simulation

Learn more