AmesimKnowledge

Advanced Modelica language topics > The Modelica compiler

Constructing the initialization problem

Before solving the differential algebraic equations that describe a system’s behavior, a simulation tool must first find a start value for each state variable in the model such that the set of these start values is consistent with the equations in the model. Unlike native Simcenter Amesim models, a Modelica model may require a system of algebraic equations to be solved in order to determine the initial values of the problem. In fact, any set of equations can be declared as long as they form a non-singular system for the purpose of initialization.

The Modelica Language Specification document describes how initialization problems should be constructed. A few additional insights are given here.

The start keyword lets a user suggest the initial value for variables or parameters, e.g., Real x(start=42);. The start attribute can accept both literal values and parameters expressions, e.g., Real x(start=x0); where x0 is a parameter declared with a given value such as parameter Real x0 = 42; In this way, start attributes can be set via Simcenter Amesim parameters to be used in conjunction with  Simcenter Amesim design exploration tools such as batch runs to determine the impact of different initial conditions. When no start attribute is provided, Simcenter Amesim assumes a value of zero.

The associated keyword fixed allows the user to specify whether the start value is fixed (i.e., they are certain that is the value they wish to use), or not (i.e., the start value is merely a guess and are actually computed from the equations in a model). This is expressed simply as another modifier within the same variable declaration, e.g., Real x(start=42, fixed=false);. The fixed attribute can be computed from a Boolean structural parameter expression.

Simcenter Amesim assumes that variables declared with the constant or parameter prefixes are fixed by default. On the other hand, all the other variables are not fixed, allowing the tool to compute them from the equations in a model to find a consistent set of initial conditions.

In using the keywords start and fixed within a model, a Modelica developer can provide information to the tool to help it determine a consistent set of initial values. Note that the fixed attribute can be overridden by the tool to make an initialization problem consistent. In such cases, a warning message is displayed in the compilation log.

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