ModelicaStandardLibrary
ModelicaStandardLibrary copied to clipboard
Set Evaluate = true for IdealTransformer.considerMagnetization
Leaving this parameter unevaluated seems like making things overly complicated, and as far as I can see there is nothing that clearly requires the parameter to be treated structurally. Hence, adding an explicit annotation will increase chances of models being treated equally efficiently across tools.
Of course, I would have preferred to declare considerMagnetization a constant with Dialog annotation instead, but I'm afraid the general preference is to use a parameter with Evaluate = true instead.
There's a similar situation in Modelica.Thermal.FluidHeatFlow.BaseClasses.TwoPort
that would be interesting to discuss at the same time, namely the parameter m
present in this if
-equation condition:
if m>Modelica.Constants.small then
flowPort_a.H_flow + flowPort_b.H_flow + Q_flow = m*medium.cv*der(T);
else
flowPort_a.H_flow + flowPort_b.H_flow + Q_flow = 0;
end if;
Would you say it's a Modelica tool "frontend" problem to realize that the condition of this tricky equation should be evaluated, or would you expect that index reduction is the stage when one should determine which parametric if
-equation conditions to evaluate?
Nobody has any thoughts regarding the question about Modelica.Thermal.FluidHeatFlow.BaseClasses.TwoPort
above?