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

Update differences.md #2470

Merged
merged 2 commits into from Jan 20, 2020
Merged

Update differences.md #2470

merged 2 commits into from Jan 20, 2020

Conversation

HansOlsson
Copy link
Collaborator

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"

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"
@@ -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.
Copy link
Collaborator

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.

Copy link
Collaborator Author

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

Copy link
Collaborator

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 empty else branch with "equation rank" 0.

Copy link
Collaborator

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

@henrikt-ma
Copy link
Collaborator

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"

Perhaps we could say structural rank, make a definition of this term at a suitable location, and add a link to the definition?

@HansOlsson
Copy link
Collaborator Author

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

@henrikt-ma
Copy link
Collaborator

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 Orientation record with 4 scalar members and 1 algebraic constraint, resulting in a space of dimension 3.
This is the number we should get when counting an equation with Orientation on both sides. To me, saying number of scalarized equations strongly suggests that the number would be 4, since this is what results from breaking the equation down into the scalar members of the record. However, on the SO(3) manifold, the 4 equations are not independent (how could they, when there are just 3 coordinates?), and I think some variant of rank sounds like the right term to capture this way of counting.

As discussed at the meeting. Adding the note so that we have a clear definition.
@HansOlsson HansOlsson merged commit c1c1659 into MCP/0031 Jan 20, 2020
@HansOlsson HansOlsson deleted the HansOlsson-patch-2 branch January 20, 2020 10:43
@HansOlsson HansOlsson added the MCP0031 FlatModelica and MLS modular issues and PRs (MCP-0031) label Dec 17, 2020
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

3 participants