Skip to content

Introduce "potential" and then use it.#3829

Open
HansOlsson wants to merge 8 commits intomodelica:masterfrom
HansOlsson:ClarifyPotential
Open

Introduce "potential" and then use it.#3829
HansOlsson wants to merge 8 commits intomodelica:masterfrom
HansOlsson:ClarifyPotential

Conversation

@HansOlsson
Copy link
Collaborator

In the previous text it looked as if "potential" was redundant, now it is instead formulated to first define "potential" variable and then use it.

…t is instead formulated to first define "potential" variable and then use it.
@HansOlsson HansOlsson requested a review from henrikt-ma February 9, 2026 10:07
Copy link
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any immediate issue, but it would be best to request a review someone which more experience of connection set handling. @qlambert-pro is probably more familiar with the terminology after his recent study of local balance?

Copy link
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we at least need to avoid having two definitions which look like they might be conflicting.

HansOlsson and others added 2 commits February 9, 2026 14:45
Co-authored-by: Henrik Tidefelt <henrikt@wolfram.com>
Co-authored-by: Henrik Tidefelt <henrikt@wolfram.com>
Copy link
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. If @qlambert-pro would find something subtle that I can't see, we can always fix this later.

Copy link
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a private conversation, @qlambert-pro indeed pointed out that the current text is not great with regard to overdetermined connectors. The old formulation actually had a point when making number of potential variables its own concept, and this wasn't so much of a problem until we also made a separate definition of the potential variables. I'll make some suggestions for how this can be fixed.

The \emph{number of potential variables} is the number of all elements in the connector class after expanding all records and arrays to a set of scalars of primitive types.
The number of potential variables of an overdetermined type or record class (see \cref{overconstrained-equation-operators-for-connection-graphs}) is the size of the output argument of the corresponding \lstinline!equalityConstraint!() function.
The potential variables of a connector are the variables that are neither \lstinline!parameter!, \lstinline!constant!, \lstinline!input!, \lstinline!output!, \lstinline!stream! nor \lstinline!flow!.
The degrees of freedom of a potential variable of overdetermined record or array type is the number of scalars of the primitives types of the output argument of the corresponding \lstinline!equalityConstraint! function, and the number of scalars of the primitives types for non-overdetermined potential variables.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't there something lost when removing the expansion? I mean, can't we have overdetermined types inside of records or arrays, so that the potential variable at the top is not overdetermined, and one needs to dig inside to see where to do the overdetermined counting?

Besides the question above, isn't this a simpler way to phrase the current statement? (Also fixing a typo.)

Suggested change
The degrees of freedom of a potential variable of overdetermined record or array type is the number of scalars of the primitives types of the output argument of the corresponding \lstinline!equalityConstraint! function, and the number of scalars of the primitives types for non-overdetermined potential variables.
The degrees of freedom of a potential variable of overdetermined type (see \cref{overconstrained-equation-operators-for-connection-graphs}) is the dimension of the \lstinline!residue! output of the corresponding \lstinline!equalityConstraint! function, and the number of scalars variables it contains for a non-overdetermined potential variable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... Looks good, except for the switch to "dimension" for the residue. I understand that it work (as it is a vector), but I still find it a bit non-intuitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants