Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
henrikt-ma opened this issue Aug 12, 2024 · 0 comments
Open

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

henrikt-ma opened this issue Aug 12, 2024 · 0 comments
Labels
MCP0031 Base Modelica and MLS modularization (MCP-0031)

Comments

@henrikt-ma
Copy link
Collaborator

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 henrikt-ma added the MCP0031 Base Modelica and MLS modularization (MCP-0031) label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MCP0031 Base Modelica and MLS modularization (MCP-0031)
Projects
None yet
Development

No branches or pull requests

1 participant