Book a Demo

Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

Mathematical Simulations

From Release 15.2 onwards, Enterprise Architect provides a greatly expanded range of options for introducing powerful mathematical tools and capabilities into your simulations.

You can bring the power of integrated external tools such as MATLAB into your models through the use of Solver Classes, and can also export your models for execution in other external tools such as MATLAB Simulink, Stateflow and Simscape, or OpenModelica.

Enterprise Architect includes an extensive library of mathematical functions within the JavaScript engine, providing the benefits of a significantly expanded Simulation capability.

Enterprise Architect also provides a wide range of Dynamic Charts; without the need for external tools, you can configure these Charts to extract and plot information from Simulations that have been directly executed inside Enterprise Architect.

Explore the:

  • Solver classes in Enterprise Architect that call MATLAB or Octave to incorporate complex mathematics into your model-based simulations
  • Extensive internal Math Library based on the popular Cephes function library
  • Integration with the OMG SysPhS standard, enabling you to configure your model for export to common tools
  • Support for exporting models to MATLAB Simulink, Simscape and Stateflow; you can create your model in Enterprise Architect and execute it in MATLAB
  • Extensive support for Modelica; you can create and configure your model in Enterprise Architect and execute it in Modelica
  • Presentation of the results of your modeling and simulation in Chart formats, either within a dedicated graphics presentation tool or through the Dynamic Charting facilities of Enterprise Architect

Available Integrations



See also


MATLAB is a popular and widely-used numerical computing environment and programming language, developed by MathWorks. It provides a wealth of mathematical expressions and formulae that can be processed within the application itself or called into other applications such as Enterprise Architect.

Enterprise Architect's MATLAB integration connects via the MATLAB API, allowing your Enterprise Architect simulations and other scripts to execute based on the values of the selected MATLAB functions and expressions. You can call MATLAB through the Solver classes, or export your model to MATLAB Simulink, Simscape and/or Stateflow.

Note: Integration with MATLAB requires MATLAB version R2018b or higher.

MATLAB Solver Simulink Integration


Simulink is a core MATLAB application, for running SysML simulations of directed messages between Blocks. Enterprise Architect can translate a SysML model into the Simulink format, automatically run the simulation, and plot the outputs of the selected variables as Charts. You can also open the generated Simulink file directly in Simulink, allowing you to modify and fine-tune the simulation settings and output functionality.

You can drag-and-drop common built-in Simulink library Blocks directly from the Enterprise Architect Simulink patterns, or reference your own custom-built Blocks with new SysPhS standard stereotype parameters.

Simulink is an alternative option to OpenModelica for developing and running simulations in Enterprise Architect.

Simulink Integration


Simscape is an optional extension to MATLAB Simulink, allowing you to model physical systems and instruct MATLAB to simulate and plot the requested outputs, using Simscape's vast array of library Blocks across many different physical domains. Enterprise Architect can translate SysML Internal Block diagrams into Simscape.

Simscape Integration


Stateflow is also an optional extension to MATLAB Simulink, providing the ability to generate MATLAB Stateflow diagrams to be run under Simulink. Within Enterprise Architect, this helps you to guide your SysML simulations using StateMachines modeled in Enterprise Architect, which are translated to Stateflow diagrams.

Stateflow Integration


Modelica is an open language standard for modeling, simulating, optimizing and analyzing complex dynamic systems. It defines and provides a file structure that can be accessed and operated on by applications such as OpenModelica (free open source) and Dymola and Wolfram Modeller (commercially available; these can work with Enterprise Architect but have not been tested or integrated with Sparx Systems software).

Modeling and Simulation with OpenModelica Library


OpenModelica is a free and open source environment based on the Modelica open language standard; OpenModelica enables you to read, edit and simulate Modelica files. Enterprise Architect is integrated with OpenModelica, and supports its use under the SysPhS Standard for defining constants and variables in the simulation of StateMachine diagrams and Parametric diagrams.

You can also display the SysML Block diagrams from your models in Enterprise Architect in the OMEdit - OpenModelica Connection Editor, which displays the Blocks' aliases and notes.

OpenModelica is an alternative option to Simulink for developing and running simulations in Enterprise Architect.

OpenModelica Integration

GNU Octave

GNU Octave is a library of mathematical functions. From Enterprise Architect's JavaScript engine, you can integrate with an Octave interpreter to use any of the available Octave functions. Octave provides an alternative to MATLAB functions, with a special emphasis on sequences and matrices.

GNU Octave Solver

JavaScript Math Library

The JavaScript Math Library is an implementation of the Cephes mathematical library built directly into JavaScript within Enterprise Architect, to facilitate the use of advanced mathematical functions within a scripted Simulation (or within a Dynamic Chart, Model based Add-In or many other scenarios).

JavaScript Math Library




See also

The Solver Class

The Solver Class provides a common API to a variety of external tools; it is available in any JavaScript engine used by Enterprise Architect, and is of particular value in calling in mathematical functions from MATLAB or Octave. You can review the results of processing within the external tool, or bring them into the JavaScript engine for presentation within Enterprise Architect.



The MATLAB solver is available when MATLAB is installed on your computer. The solver uses the MATLAB API to provide access to the wide array of available MATLAB functions.



The Octave solver is available when Octave is installed on your computer. The solver directly communicates with the Octave interpreter to allow you to access functions and data within an Octave environment.

GNU Octave Solver

Configuring Simulations



See also

Configuration Artifacts

The SysMLSim Configuration Artifact is a purpose-designed Artifact for specifying the characteristics and parameters of a SysML simulation in Enterprise Architect. You set up the specification through the Configure SysML Simulation window.

Configure SysML Simulation

The SysML Extension for Physical Interaction and Signal Flow Simulation (SysPhS) Standard

The SysPhS Standard provides an easier, model-based method of sharing simulations, defining variables, constants and initial values within each element rather than through a configuration file. This enables a visual approach to setting up a simulation, as the variables, constants and initial values can be made visible in diagrams in additional compartments on the SysML Blocks.

SysPhS Simulation

Define Multiple Datasets

Multiple datasets can be defined against SysML Blocks used within a Simulation configuration in a Parametric model. This allows repeatable simulation variations using the same SysML model.

Model Analysis using Datasets

Common Use Cases



See also

Solver Consoles

  • Quickly test out commands to be used in a script or simulation
  • Call a MATLAB function to see if it returns what you expect and runs without errors
  • Cut and paste a JavaScript snippet that only ever needs to be run once, rather than creating a script and then deleting it
Solver Consoles

Solvers in Simulations

  • Call a complex mathematical function that was defined as an Octave function
  • Call MATLAB's API routines to determine a decision flow
Solvers in Simulations

SysML SysPhS Simulation

  • Model a new automotive ABS system in Enterprise Architect SysML and simulate using Simulink
  • Design and model a hydraulics system in Enterprise Architect and simulate the system in OpenModelica using an existing library of Modelica components
SysPhS Simulation Examples

Generate a StateChart and Refine and Debug in StateFlow

  • Create a SysML StateMachine to quickly define the action of a user turning the system on and off repeatedly; generate the simulation and open in Stateflow to view the state parameters in 'real-time' and tweak Stateflow settings
Humidifier Example

Model and Test a StateChart

  • Fully model a StateChart before simulating it in Stateflow

Learn more