Simulation Setup Dialog Box

The Simulation Setup dialog box appears when you select the Simulation Setup command.

This dialog box contains controls organized in several tabs:

This page discusses:

General Tab

This section provides information about the General tab.

Simulation Interval

Start Time
Specifies a Start time.

You can enter the time with a unit, for example 1m.

The value must be equal or greater to 0.

By default, the Start time is valued 0s.

Stop Time
Specifies a Stop time for the virtual execution.

You can enter the time with a unit, for example 2m.

Note: The value must be greater than or equal to 0.

By default, the Stop time is valued 1s.

Stop when steady state is reached
When you select this option, the simulation terminates automatically if steady state is reached before the Stop time.

The option corresponds to the flag Advanced.Simulation.SteadyStateTermination.

The tolerance of this option is by default 0.02, with the time scale taken into account. As an alternative, you can specify the tolerance using the flag Advanced.Simulation.SteadyStateTerminationTolerances. The default value of this flag is 0.0 meaning that the flag is not used.

Note: The option is implemented by checking if the state derivatives are close to zero. This means that the following cannot be detected:
  • Periodic steady states.
  • Steady states where a subset of the states is still varying.

By default, this option is not selected.

Interactive simulation
When you select this option, the simulation is interactive.
Important: To be able to simulate interactively, the model must be prepared for this.

By default, this option is not selected.

Setup storage

See Setting up a Simulation.

Integration Tab

This section provides information about the Integration tab.

Output Interval

Interval length
Specifies an interval length as the results storage rate.

You can enter the time with a unit, for example 1m.

By default, this option is not selected. If selected, the default value is 0.01s.

Number of intervals
Specifies a number of intervals as the results storage rate.

By default, this option is selected and valuated 500.

Integration

Algorithm
Specifies the Algorithm used to solve the differential equations.

By default, the selected algorithm is Dassl.

Tips:
  • When switching from a new solver (example: Radau Ila) to a traditional solver (example: Lsodar), or when linearizing a model, the model is recompiled but not totally re.

    Therefore, before you perform a virtual execution, select the integration algorithm.

  • For more information about algorithms, see Dymosim Integrators.
Tolerance
Specifies the accuracy of the integration.

By default, this option is valuated 0.0001.

Fixed Integrator Step
If the selected algorithm is a fixed-step integrator (such as Euler, for example), this option specifies the Fixed integrator step.

You can enter the time with a unit, for example 1m.

By default, this option is not selected. The default when selected is 0s.

Runge Kutta order for inline integration
This option is available when selecting Inline Explicit Runge Kutta or Inline Implicit Runge Kutta as the algorithm. It lets you specify the Runge-Kutta order for inline integration.

By default, this option is not selected. The default when selected is 2.

Note: You need the Export for HILS license (HIS) to use inline integration.

Execution time

Maximum run time (0 means no limit)
Specifies the maximum wall-clock run time of any simulation.

The option corresponds to the flag Advanced.Simulation.MaxRunTime.

Notes:
  • You can enter the time with a unit, for example 1m.
  • The run time is independent of the simulation time unit.
  • The option works for both single simulations and batch runs.
  • The option works also if the simulation is stuck in the code of an imported FMU or in an external C code.

By default, this option is valued 0s, meaning that there is no limitation on the run time.

Translation Tab

This section provides information about the Translation tab.

Model Translation

Evaluate parameters to reduce models (improve virtual execution speed)
When this option is selected, all parameters except top-level parameters are evaluated at translation.

By default, this option is not selected.

Also evaluate top-level parameters
When this option is selected, also top-level parameters are evaluated at translation.

By default, this option is not selected.

Include a variable for elapsed CPU time during virtual execution
Select this option to introduce a new variable, CPU time, with the accumulated CPU time during virtual execution. The slope of this signal is an indirect measure of the computational complexity of the virtual execution.

By default, this option is not selected.

Warn about parameters with no default
Lists all free parameters that have no explicit value in the model.

By default, this option is selected.

Pedantic mode for checking Modelica semantics
Select this option to turn all warnings corresponding to semantic errors in the Modelica code (compared to Modelica Language Specification) into errors instead of warnings. This forces the programmer to use compliant Modelica code.

By default, this option is not selected.

Generate Analytic Jacobian for the ODE problem
Select this option to use analytic ODE Jacobians for simulation and linearization. For more information, see Advanced Algorithms.

By default, this option is not selected.

Start a PLM Update before every model translation
Select this option to start a PLM Update before every model translation.

By default, this option is not selected.

Logging

The logging is available in the translation log, which can be seen in the Messages Reporting window after a translate or simulation.

List continuous time states selected
Lists the selected continuous time state.

By default, this option is selected.

List non-linear iteration variables
Lists the non-linear iteration variables. For the use in an example, see About Analyzing a Failed Initialization.

By default, this option is not selected.

Log default connections
Outputs diagnostics when unconnected connectors receive a default value according to the Modelica semantics. This information might help you in finding an incorrectly composed model.

By default, this option is selected.

Log bus signal sets
Outputs information about connections of bus signals (expandable connectors), for tracing of bus signals. If this option is active, and you have bus signals in your model, you get an entry Bus signal sets in the translation log. This can be used for searching a connection of bus signals.

By default, this option is not selected.

Log selected default initial conditions
When initial conditions are missing, Systems Virtual Execution selects the default initial conditions. This option reports the result of the automatic selection of default initial conditions.

By default, this option is selected.

Log deduced units
Outputs deduced units.

By default, this option is not selected.

Output information when differentiating for index reduction
Reports about which equations are differentiated.

By default, this option is selected.

Output read classes to screen during parsing
Outputs read classes during parsing. You can select this option to get information in the log about what classes are read when you, for example, for open a package or a model.
Note: This information is only available in the command log, after you have performed a translation or simulation.

By default, this option is not selected.

Output Tab

This section provides information about the Output tab.

Format

Textual data format
Stores results in textual format instead of binary.

By default, this option is not selected.

Double precision
Stores results in double precision instead of single precision.

By default, this option is not selected.

Store

This section allows you to define which categories of variables to store.

Note: The Protected variables option above also store nonselected variables when selections are present in a model.
Tip: You can control the storage of protected variables during simulation, using one of the following methods:
  • Select the option Protected variables from the Output tab shown above.
  • Use the Advanced.StoreProtectedVariables=False flag.
  • Use the annotation(Hide=true) annotation to hide a variable.

    Note that the annotation(Hide=false) annotation overrides the Advanced.StoreProtectedVariables=False flag.

Output Selection

Equidistant time grid
Stores results equidistantly.

By default, this option is selected.

Store variables at events
Stores variables before and after events.

By default, this option is selected.

Write variables to result file only at stop time
Stores variables to result file only at stop time. This can be used to minimize the result file if the model is large and only the result file at stop time is needed. Using this option can be seen as a complement to using variable selections to decrease the file size. For more information, see About Variable Selections.
Note: The output points, as defined in the General tab above, are still used internally by the integrator.

By default, this option is not selected.

Complete Result Snapshot

Interval between snapshots
Defines the interval between snapshots. For the use in an example, see Saving Snapshots of Results During Simulation.

By default, the value is 0, meaning that no snapshots are created.

Timestamps in snapshot filenames
Adds timestamps to the file names of snapshots. For the use in an example, see Saving Snapshots of Results During Simulation.

By default, this option is selected.

Debug Tab

This section provides information about the Debug tab.

General Information

Normal warning messages
Enables all warning and error messages.

By default, this option is selected.

Store variables after failed initialization
Storing variables after failed initialization enables plotting of variables even in the case of a failed initialization. For the use in an example, see About Analyzing a Failed Initialization.

By default, this option is selected.

Show Dymosim window
Displaying the dymosim window during translation and simulation.

By default, this option is not selected.

Simulation Analysis

Events during initialization and simulation
Logs events during initialization and virtual execution. This can be useful for finding errors in the event logic, including chattering.

By default, this option is not selected.

Which states that dominate error
Sometimes, tolerance requirements for some state variable can slow the virtual execution. Selecting this option logs these critical states.
Note: The logging is not supported for any of the following integrators:
  • Euler
  • Any Rkfix integrator
  • Cvode
  • Any integrator used for inline integration

By default, this option is not selected.

Provide variable dependencies and equation incidence for plotting
Select this option to be able to use variable dependencies and equation incidence for plotting. For more information, see Working with Variable Dependencies and Equation Incidence.

By default, this option is not selected.

Non-linear Solver Diagnostics

Detailed logging of failed non-linear solution
Logs detailed information of failed solutions of non-linear systems.

By default, this option is not selected.

Non-linear solution summary
Adds a non-linear solution summary to the log in the following cases:
  • When solving a non-linear equation fails
  • When initialization fails
  • When using profiling
    Note: The summary also contains the tip that to also log used CPU time you must specify the flag Advanced.GenerateBlockTimers=true. (This flag activates the profiling.)

By default, this option is not selected.

Non-linear solutions
Logs solutions of non-linear systems.

By default, this option is not selected.

Non-linear iterations
Logs iterations of non-linear systems.

By default, this option is not selected.

Details
Logs iterations of non-linear systems in detail.

By default, this option is not selected.

Log singular linear
Logs linear systems if they are consistently over-determined.

By default, this option is not selected.

State Variable Logging

Dynamic state selection
Logs the changes to the selection of states.
Note: The format of the logged changes is similar to the format of a fixed-state selection when editing a model.

By default, this option is not selected.

Final selection of states
Logs the final selection of state variables.
Note: The format of the logged changes is similar to the format of a fixed-state selection when editing a model.

By default, this option is not selected.

Min./Max. Assertions

All variables
Dynamically checks that variables are within the minimum and maximum bounds.

By default, this option is not selected.

Non-linear iterations variables
Checks that non-linear iteration variables are within the minimum and maximum bounds.

By default, this option is not selected.

Use bounds for simplification
Uses minimum and maximum bounds to optimize the code, this automatically adds assertions for used values.

By default, this option is selected.

Log when using bounds for simplification
Generates a log of used minimum and maximum bounds.

By default, this option is not selected.

Allowed error
Defines the allowed error when checking minimum/maximum values.

By default, the value is 0.

Function Context

Include function call in error messages
When this option is selected, the errors that are found in the functions are reported with the call and with variable names.

By default, this option is not selected.

Simulator Tab

This section provides you with information about the Simulator tab.

Embedded Server

None
No embedded server is used.

By default, this option is selected.

DDE Server
Activate this option if Dymosim should be compiled to provide a DDE server.

Realtime simulation

Notes:
Synchronize with realtime (requires DDE)
Activate this option to synchronize the simulation time of the model with realtime.
Note: DDE Server must be activated to enable this selection.

By default, this option is not selected.

Slowdown factor
Enter a value other than 1 to define the slowness of the simulation with realtime synchronization. For example:
  • 1 is the actual simulation speed.
  • 2 reduces the simulation speed by 50%.
  • 0.5 increases the simulation speed by 100%.

By default, the value is specified to 1.