Skip to content

How to represent final start when using fallback value? #3560

Open
@henrikt-ma

Description

@henrikt-ma

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    MCP0031Base Modelica and MLS modularization (MCP-0031)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions