ModelicaSpecification icon indicating copy to clipboard operation
ModelicaSpecification copied to clipboard

How to represent final start when using fallback value?

Open henrikt-ma opened this issue 6 months ago • 0 comments

Here is a full Modelica model that I don't know how to lower to Base Modelica without loss of information about start being final:

model FinalStartUsingFallback
  Real x(final start);
  Real y(final start);
equation
  sin(x) = 0.5;
  y = 0.5;
  annotation(experiment(StopTime = 1.0));
end FinalStartUsingFallback;

The problem is that introducing the Base Modelica initial equations guess(x) = 0.0 and guess(y) = 0.0 to represent that the start is final means that the Base Modelica tool cannot tell that these 0.0 are fallback values, so it won't be able to generate the required warning about using a fallback value for the initialization of x (but not for y).

henrikt-ma avatar Aug 12 '24 14:08 henrikt-ma