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
Update differences.md #2470
Update differences.md #2470
Conversation
Describe change for unbalanced if-equations. I noticed that the original text had "rank" as short-hand for "number of scalarized equations". I didn't think that was clear, but we might find a better name than "number of scalarized equations"
RationaleMCP/0031/differences.md
Outdated
@@ -2,7 +2,21 @@ | |||
This document describes differences between Flat Modelica and Modelica that aren't clear from the differences in the grammars. | |||
|
|||
## Unbalanced if-equations | |||
In Flat Modelica, all branches of an `if`-equation must have the same rank. _TO BE ELABORATED…_ | |||
In Flat Modelica, all branches of an `if`-equation must have the same number of scalarized equations, | |||
and if there is no `else` all branches must have zero scalarized equations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be easier to read if split in two sentences, with a comma after else
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the point but on the other hand they are part of the same concept: a missing else has zero equations, and thus the other branches must have the same number of equations (i.e. zero).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would still be true that all branches must have the same number. One could also just add a sentence like:
Absence of an
else
branch is equivalent to having an emptyelse
branch with "equation rank" 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not controversial.
Decision:
- poll
"scalar equation count" 1
"equation dimension" 1 1 1
"equation rank" 1
"equation size" 1 1 1 1 1 1 = 6 votes
Decision:
- Use term "equation size" until we have better proposal.
- Use formulation: "Absence of an else branch is equivalent to having an empty else branch with equation size 0."
- Define "equation size" in Modelica Specification so that "local equation size" is using that definition. --> Hans
- Merge --> Hans
Perhaps we could say structural rank, make a definition of this term at a suitable location, and add a link to the definition? |
Maybe. I agree that having a defined term would be good, but searching for "structural rank" found a different definition that could cause confusion (the maximum rank of a matrix having a certain sparsity pattern). |
Yes, you are right, it was a very bad proposal to call it structural rank. I think equation rank would be a much better term. One particular reason why I'd like to avoid number of scalarized equations is that it I don't see that it would generalize nicely if we were to get records with algebraic constraints in the future. For example, imagine an |
As discussed at the meeting. Adding the note so that we have a clear definition.
Describe change for unbalanced if-equations, and reason for change.
I noticed that the original text had "rank" as short-hand for "number of scalarized equations". I didn't think that was clear, but we might find a better name than "number of scalarized equations"