﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3240	FMI import treats enumeration parameters badly -- many MSL models fail	Rüdiger Franke	Adeel Asghar	"MSL uses evaluated parameters of enumeration types for initialization. FMI import using OMEdit leads to wrong equation counts, because the respective variables remain unassigned.

See `Modelica.Blocks.Continuous.Integrator` for an example. The model contains:
{{{#!mo
  parameter Modelica.Blocks.Types.Init initType = Modelica.Blocks.Types.Init.InitialState ""Type of initialization (1: no init, 2: steady state, 3,4: initial output)"" annotation(Evaluate = true, Dialog(group = ""Initialization""));
}}}

The exported FMU lists:
{{{#!xml
<ScalarVariable description=""Type of initialization (1: no init, 2: steady state, 3,4: initial output)"" name=""initType"" 
  initial=""calculated"" causality=""calculatedParameter"" variability=""fixed"" valueReference=""0"">
    <Enumeration declaredType=""Modelica.Blocks.Types.Init""/>
</ScalarVariable>
}}}

Importing the FMU back to OMEdit, the generated wrapper code declares the enumeration again:
{{{#!mo
  Modelica.Blocks.Types.Init initType ""Type of initialization (1: no init, 2: steady state, 3,4: initial output)"";
}}}
But the wrapper code assigns no value.

Couldn't the declarations of enumerations just be removed from the wrapper code -- or commented out unless they get values assigned?
"	defect	closed	high	1.9.3	FMI	trunk	fixed		jens.weidmann@…
