Search code examples
modelicadymolaevaluate

Modelica Evaluate=true


From the Modelica documentation, it seems annotation Evaluate only has an effect on parameters: https://build.openmodelica.org/Documentation/ModelicaReference.Annotations.Evaluate.html

Using the Dymola variable editor, I can conveniently set the annotation on any variable/instance, see screenshot below. Does this have any effect or is the annotation just ignored? If applied to the instance of a class, will the parameters in that class be evaluated, to the value set by the modifier (in the example screenshot, e.g. parameter yMax)?

Dymola screenshot


Solution

  • The parameters of the class will be evaluated, https://specification.modelica.org/master/annotations.html#modelica:Evaluate

    This was added in Modelica 3.5 (and supported earlier in Dymola with some minor differences that don't appear if you only use Evaluate=true - see https://github.com/modelica/ModelicaSpecification/pull/2771 for details).