Introduce "potential" and then use it.#3829
Introduce "potential" and then use it.#3829HansOlsson wants to merge 8 commits intomodelica:masterfrom
Conversation
…t is instead formulated to first define "potential" variable and then use it.
henrikt-ma
left a comment
There was a problem hiding this comment.
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?
henrikt-ma
left a comment
There was a problem hiding this comment.
I think we at least need to avoid having two definitions which look like they might be conflicting.
Co-authored-by: Henrik Tidefelt <henrikt@wolfram.com>
Co-authored-by: Henrik Tidefelt <henrikt@wolfram.com>
henrikt-ma
left a comment
There was a problem hiding this comment.
Looks good to me. If @qlambert-pro would find something subtle that I can't see, we can always fix this later.
henrikt-ma
left a comment
There was a problem hiding this comment.
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.
Co-authored-by: Henrik Tidefelt <henrikt@wolfram.com>
| 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. |
There was a problem hiding this comment.
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.)
| 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. |
There was a problem hiding this comment.
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.
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.