Prev Next

Mathematical Simulations

Enterprise Architect 15.2 greatly expanded the range of options for introducing powerful mathematical tools and capabilities into your simulations.

Users of version 15.2 and higher can bring the power of integrated external tools such as MATLAB into your models through the use of Solver Classes, or export your models for execution in a tool such as Simulink, Stateflow, Simscape or OpenModelica.

Version 15.2 introduced an extensive new library of mathematical functions within the JavaScript engine, providing the benefits of a new and significantly expanded Simulation capability.

Version 15.2 also introduced 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:

  • All new Solver classes in Enterprise Architect that call MATLAB or Octave to incorporate complex mathematics into your model-based simulations
  • New and much expanded 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; create your model in Enterprise Architect and execute it in MATLAB
  • Expanded support for Modelica; 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 modeling 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.

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 that allows modeling of physical systems and that instructs 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 allows 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 State Machine 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


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.

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.

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 variable, 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.


Define Multiple Datasets

SysML Blocks used in a Parametric model can, within the Simulation configuration, have multiple datasets defined against them, which allows for 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

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

Model and Test a StateChart

  • Fully model a StateChart before simulating it in Stateflow

Learn more