Search code examples
modelicadymola

Modelica (Dymola) Declaration with Formula - What Is This?


What type of declaration is this?

Real x = time^2;

I can put it in a model before any equation or algorithm section.

The issue for me is that it is not a static parameter, but rather it has a formula attached to it that works non-statically - the value is set every time step.

What kind of declaration is it? Short model or short function definition? New instances of a class? A 'type' class?

Any help (especially with a reference to either Fritzon's or Tiller's book) will help me sleep at night.


Solution

  • That is a binding equation in a variable declaration and it will become a normal equation during compilation of the model. See https://modelica.org/documents/ModelicaSpec34.pdf, chapter 8.