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

Tick off roadmap item "Get rid of 'false' as default for 'fixed'" #2996

Merged
merged 2 commits into from Oct 2, 2021

Conversation

henrikt-ma
Copy link
Collaborator

According to yesterday's web meeting, I'm setting up this PR for documenting why we're ticking off this item on the road map.

As I remember it, the purpose of the roadmap item was to see if anything could be done to remove the need to have to add fixed = true each time one simply wants to unconditionally set the start value of a variable. Instead of discussion to which degree this really is a problem in full Modelica, let's take a look at what it is like in the current design for Flat Modelica:

  • The full Modelica fixed attribute does not have a corresponding actual built-in attribute in Flat Modelica.
  • Flat Modelica supports fixed = true as a syntactic sugar, but there is no need to use this if you stick with the core language.
  • Instead of fixed = true, Flat Modelica uses explicit initial equations to tie the start value of a variable to the corresponding guess value parameter.

Actually, while it can be argued that we have technically gotten rid of the default for fixed by not keeping fixed as a built-in attribute at all, it should be noted that the underlying purpose of the roadmap item has not been addressed by the current Flat Modelica design.

What I find more important, on the other hand, is that a main design goal for the design of Flat Modelica initialization is to have explicit equations rather than an intricate play with various attributes and flags. Addressing the underlying purpose of the roadmap item would likely be a change away from this design goal (we want the connection between a variable and its guess value parameter to be explicit in the form of an equation, even if it can be tedious to write down the equation by hand), and in view of this it would also seem right to tick it off as a way of saying that we've considered it, but deliberately chose to ignore it in the end.

Comments explaining why we can tick off this item at this time will be given in the PR for merging this.
@henrikt-ma henrikt-ma added the MCP0031 FlatModelica and MLS modular issues and PRs (MCP-0031) label Sep 8, 2021
@olivleno
Copy link
Collaborator

olivleno commented Oct 1, 2021

Web Meeting: (Hans, Martin, Gerd, Kai, Henrik, Oliver)
Reflecting what has been discussed and agreed before.
approved to be merged and closed by Henrik.

@henrikt-ma henrikt-ma merged commit 050fac8 into MCP/0031 Oct 2, 2021
@henrikt-ma henrikt-ma deleted the MCP/0031+fixed-default-false branch October 2, 2021 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MCP0031 FlatModelica and MLS modular issues and PRs (MCP-0031)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants