AmesimKnowledge

Working with the Modelica Editor

Automatically set the initial guess values of your Modelica model

One of the common topics occurring in the Modelica “world” is model initialization, especially when we want to develop a robust model. This discussion arises when non-linear systems of equations occur during initialization. Then the guess values for the iteration variables of this non-linear system must be provided via the start attribute. These guess values are usually not known in advance.

In the Modelica Editor, since version 2210, there is a simple way to provide the complete list of iteration variables for any model. The associated estimation values can be reused and defined directly from the Simcenter Amesim parameters panel.

To automatically generate the guess values for your model, you must activate the toolbar button as shown in the following figure.

Figure 43: Activating the toolbar button

Then, after adding your Modelica model to a Simcenter Amesim sketch, a record will be automatically created in the Modelica code containing the exact list of the guess values of your model. The guess values are set by the Modelica Editor by using the values already defined in your model's Modelica code. When the value of a guess variable is not already defined in your code, the value zero is defined as the default value. These guess values are defined as parameters to be reused in the Simcenter Amesim parameters panel, as shown in the following figure.

Figure 44: Simcenter Amesim parameters panel

At this point, if the simulation is too slow to start or not robust enough, or worse, cannot be initialized by the solver, then these initial guess values need to be modified to be more realistic regarding the physical behavior of your system.

Note

The initial guess values list does not contain the array variables and does not replace the initial equation requested to fix a simulation start value.

Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Modelica_Editor/xid2133358 · retrieved 2026-07-17