Skip to content

Application settings

Access settings by clicking on icon, top right corner of Modelon Impact.

There are six (6) categories for settings/options and global actions:

All settings need to be saved in order to take effect. The save button is at the bottom of the screen. Saved settings affect all subsequent models even models created before changing the settings.

Modelon Impact allows setting specific a for a model called Local simulation settings.


Application settings🔗

Application settings are divided into five (5) sections.

  • Section 1: Canvas
  • Section 2: Logging
  • Section 3: Model browsing
  • Section 4: Steady state
  • Section 5: Misc

Canvas settings🔗

Regulates how the model canvas is displayed.

  • Show grid – Turn on to show a grid in the model canvas.
  • Enable snapping – Turn on to snap to the grid when moving components.

Model browsing settings🔗

  • Show final parameters – Turn on to show final parameters in the Model browser.
  • Show disabled parameters – Turn on to show disabled parameters in the Model browser.
  • Enable automatic propagation – See section Propagation of classes and integer parameters.

Logging settings🔗

  • Compilation log level - Set the level of logging when compiling. Higher log levels provide more information, but can cause slower compilation and simulation.
  • Simulation log level - Set the level of logging when simulating. Higher log levels provide more information, but can cause slower compilation and simulation.

Misc settings🔗

  • Open class after creation - Turn on to enable opening class right after creation automatically.

Steady state activation🔗

  • Enable steady state simulation - Turn on to enable the steady state simulation option.
  • Initialize from latest results - Turn on to enable initialization from the last results.

Execution settings🔗

Execution settings also known as Global simulation settings, consists of three execution types:

  • Type 1: Dynamic simulation settings
  • Type 2: Steady State simulation settings
  • Type 3: Custom settings

Each execution type, consists of same four (4) sections where variables are available specific for each execution type:

  • Section 1: Simulation Options
  • Section 2: Compiler Options
  • Section 3: Solver Options
  • Section 4: Runtime Options

Global vs Local simulation settings

Modelon Impact has two types of simulation settings:

  • Global simulation settings specify default simulation settings, are applied to all models and not stored in the model.
  • Local simulation settings specify simulation settings specific for a model and thus stored in the model. Local simulation settings are accessible in the Experimentation mode, under the EXPERIMENT tab and further down, the Analysis tab.

Simulation settings are grouped into:

  • Basic - common settings
  • Advanced - numerical settings
  • Global settings

Dynamic settings🔗

Dynamic Simulation Options🔗

Simulation framework options for solving the FMU using the Assimulo simulation package.

General options for the AssimuloFMIAlg algorithm
Default Description
filter None A filter for choosing which variables to store result for. filter = "*der" , store all variables ending with 'der' and filter = ["*der*", "summary*"], store all variables with "der" in the name and all variables starting with "summary".
ncp 500 Number of communication points. If ncp is zero, the solver will return the internal steps taken.
solver "CVode" Specifies the simulation method that is to be used. Currently supported solvers are, CVode, Radau5ODE, RungeKutta34, Dopri5, RodasODE, LSODAR, ExplicitEuler. The recommended solver is "CVode".
with_jacobian False Simulation with analytical Jacobian, Note: all models can't generate an analytical Jacobian.
write_scaled_result False When true, write the result to file without taking numerical scaling into account.
dynamic_diagnostics False If enabled, additional diagnostic variables will be included in the simulation results.

Dynamic Solver options🔗

Options for the chosen solver.

Selection of solver arguments for CVode
Option Default Description
disc 'BDF' Discretization method. Can be either 'BDF' or 'Adams'.
h 0.01 The step-size for ExplicitEuler solver.
iter 'Newton' The iteration method. Can be either 'Newton' or 'FixedPoint'.
maxord 5 The maximum order used. Maximum for 'BDF' is 5 while for the 'Adams' method the maximum is 12.
maxh Inf Maximum step-size.
rtol 1e-4 Relative tolerance. The relative tolerance is retrieved from the 'default experiment' section in the XMLfile and if not found is set to 1.0e-4.
atol rtol*0.01*(nominal values of the continuous states) Absolute Tolerance. Can be an array where each value corresponds to the absolute tolerance for the corresponding variable. Can also be a single value.

Dynamic Compiler options🔗

Compiler options specify with what options a model is compiled into an FMU.

Selection of compilation options
Option Default Description
c_compiler gcc C compiler. msvs= Microsoft Visual Studio Compiler.
msvs_path Path to the Microsoft Visual Studio Compiler to compile C code with. Will cause compilation to fail if no installation is found.
msvs_version Microsoft Visual Studio Compiler version or year edition to compile C code with. If the msvs_path option is not set, then this option will be used to find an installation among the default install locations. If the msvs_path option is set, then this option will be used to verify the compiler version. In both cases the compilation will fail if the installation found mismatches the version specified with this option.
generate_html_diagnostics false If enabled, model diagnostics are generated in HTML format. This includes the flattened model, connection sets, alias sets and BLT form.
include_protected_variables false Includes protected variables in the compilation target interface if the protection annotation on the class allows viewing variables.

Dynamic Runtime options🔗

+ Add new adds additional solver options. Detailed descriptions on how to add a solver option are found in the Optimica Compiler Toolkit (OCT) user guide.


Steady State settings🔗

Steady State Compiler options🔗

Option Default Description
hand_guided_tearing True If enabled, hand guided tearing of equation system is performed.
generate_html_diagnostics False If enabled, model diagnostics are generated in HTML format. This includes the flattened model, connection sets, alias sets and BLT form.
equation_sorting True If enabled, then the equation system is separated into minimal blocks that can be solved sequentially.
expose_scalar_equation_ blocks_in_interactive_fmu True If enabled, unsolved scalar equations will be exposed to the external solver when generating interactive fmu.
divide_by_vars_in_tearing True If enabled, a less restrictive strategy is used for solving equations in the tearing algorithm. Specifically, division by parameters and variables is permitted, by default no such divisions are made during tearing.
merge_blt_blocks True If this option is set to true (default is false), BLT blocks will be constructed so that all level one HGT pairs and all unpaired HGT will reside inside the same BLT block.
automatic_tearing True If enabled, then automatic tearing of equation systems is performed.
variability_propagation False If enabled, the compiler performs a global analysis on the equation system and reduces variables to constants and parameters where applicable.
interactive_fmu True If enabled, the DAE system is converted into an interactive fmu where all residual equations and iteration variables have been changed into top level outputs and inputs.
index_reduction False If enabled, then index reduction is performed for high-index systems
local_iteration_in_tearing annotation This option controls whether equations can be solved local in tearing. Possible options are: 'off', local iterations are not used (default). 'annotation', only equations that are annotated are candidates. 'all', all equations are candidates
include_protected_variables False Includes protected variables in the compilation target interface if the protectionannotation on the class allows viewing variables.
c_compiler gcc The C compiler to use to compile generated C code.

Steady State Solver options🔗

Option Default Description
max_iter_no_jacobian 1 Maximum number of iterations without jacobian update. Value 1 means an update in every iteration. [1, 1000] (Corresponding compiler option: nle_solver_max_iter_no_jacobian)
tolerance 0.00001 Relative tolerance [eps(1), 0.1]. (Corresponding compiler option: nle_solver_default_tol)
step_limit_factor 1 Factor used to limit the step size based on nominal and min/max range [0.01, 100]. Newton step length is limited so that for any iteration variable xi it is not larger than step_limit_factor times min(max(abs(nominal), abs(xi)),(xi_max-xi_min)). (Corresponding compiler option: nle_solver_step_limit_factor)
jacobian_calculation_mode 9 Mode for how to calculate the Jacobian: 0 - onesided differences, 1 - central differences, 2 - central differences at bound, 3 - central differences at bound and 0, 4 - central differences in second Newton solve, 5- central differences at bound in second Newton solve, 6 - central differences at bound and 0 in second Newton solve, 7 - central differences when small residual, 8 - calculate Jacobian through MATLAB®, 9 - Jacobian compression. (Corresponding compiler option: nle_jacobian_calculation_mode)
residual_equation_scaling 5 Residual equation scaling mode: 0 - no scaling, 1 - automatic scaling, 2 - manual scaling, 3 - hybrid scaling, 4 - aggressive automatic scaling, 5 - automatic rescaling at full Jacobian update. (Corresponding compiler option: residual_equation_scaling)

Export settings🔗

The Export tab includes global export settings used for an FMU export. These settings are not stored in the model, but they are stored as user settings and are recovered for the next session.


Global FMU export settings🔗

Export settings can be used for changing the default FMU export settings. You can find more information about the FMI standard at fmi-standard.org.

General options for FMU export
Option Default Description
FMI version 2.0 FMU version
Target platform
  • Win64 (for Windows x64/64bit platforms)
  • Linux64 (Linux 64bit platforms)
  • List of available compilation platforms
    FMU format Model exchange FMU format can be either 'Model exchange' or 'Co-simulation'

    Co-simulation defaults🔗

    Co-simulation export settings
    Option Default Description
    Solver
  • CVode
  • Euler
  • RungeKutta2
  • Radau5ODE
  • Numerical methods to be used to solve the simulation problem.
    Depending on the selected solver you can either enter one or both of the next options.
    Relative tolerance 1e-5 Relative error tolerance for the CVode or Radau5ODE numerical solver
    Fixed step size 1e-3 Fixed simulation step size for the Euler or RungeKutta2 numerical solver.
    (CVode and Radau5ODE have an internal step size control.)

    Compiler options🔗

    Compiler options specify with what options a model is compiled into an FMU.

    Selection of compilation options
    Option Default Description
    c_compiler gcc C compiler. msvs= Microsoft Visual Studio Compiler.
    msvs_path Path to the Microsoft Visual Studio Compiler to compile C code with. Will cause compilation to fail if no installation is found.
    msvs_version Microsoft Visual Studio Compiler version or year edition to compile C code with. If the msvs_path option is not set, then this option will be used to find an installation among the default install locations. If the msvs_path option is set, then this option will be used to verify the compiler version. In both cases the compilation will fail if the installation found mismatches the version specified with this option.
    generate_html_diagnostics false If enabled, model diagnostics are generated in HTML format. This includes the flattened model, connection sets, alias sets and BLT form.

    For more information, see Optimica Compiler Toolkit (OCT) user guide.

    +Add new - Used to add additional compiler options.


    Units options🔗

    A user can select which physical units the variables are expressed with as well as other aspects of their display like the significant digits that are represented.

    Note

    Changing the settings for these units will automatically convert values displayed in the application, including parameter inputs, output text fields, stickies and plots. These are reverted when chaning back the units. Changes to units are applied to all models in a so called global fashion. If selecting Imperial all units will be imperial until reverting. Values will still be the same. SI units are default.

    User can change aspects of the variables by:

    1. Go to the settings panel by clicking on .
    2. Click on the Units tab.
    3. Set the unit of choice or other properties of the variables.

    Storage clean-up🔗

    You can free up more space by deleting generated resources such as simulation results. In this tab you trigger the deletion of results which will remove them permantly from your disk.

    Note

    This cannot be undone. You can regenerate these files by compiling and re-running your simulations.

    On this tab you can choose between different defaults for the age of the data or specify any time span regarding the age. Data older than the specified time span will be deleted by clicking Delete.


    Workspace delete🔗

    The function to delete a workspace resides in Settings. Deleting a workspace cannot be undone. Only the current workspace can be deleted in order to limit risk of deleting a workspace by accident.