-
Notifications
You must be signed in to change notification settings - Fork 40
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
Constraints on spatialDistribution initialization #3640
Comments
I hope libraries are consistent with points 1 and 3, but Dymola 2025x does as far I can see not perform any of those checks. Regarding 2, I assume the goal is to be able to handle sharp transients at the start (even though we don't handle it afterwards) so I don't want to require "increasing" instead of "non-descending". |
It would be great if you could explain this in more detail, illustrated by a meaningful example. |
Slight scope creep, but I'd also be interested in general constraints on where Here is an example to start with:
How is this supposed to be updated at the accepted steps? (If we can agree that there is no clear way of how to handle at accepted steps, we don't need to worry about what to do for initialization.) |
Both |
Indeed. I suggest we open a PR about adding the necessary rules. |
While I can see that one could go beyond the |
Now that I have been thinking a bit about applications of Especially when combined with unit checking, I think that removing the normalization constraint would avoid some pretty error-prone scaling issues, issues which are particularly hard for library developers to detect due to the lack of (standardized, at least) ways to inspect the continuous internal state of a |
After some additional thought I think we can drop that case, and just use increasing - unless someone else objects. |
Well, it turns out that in our comparisons with what OpenModelica does, we have found that they have event generation for their implementation of In my opinion, event generation seems like a good feature, so in the end I'd be in favor of changing the specification to make this the correct behavior (and then keep the current non-decreasing rule for the initial points). @casella, any comments on the OpenModelica behavior? |
Language group:
|
There are several requirements for the initialization of a
spatialDistribution
that I feel are missing in the specification:initialPoints
cover the entire range from 0 to 1 (no need for tools to invent their own extrapolation mechanisms).initialPoints
is strictly increasing instead of non-descending (making the initial state consistent with the rule that the buffer is never updated whenx = x0
during simulation).initialPoints
andinitialValues
are parameter expressions (would be confusing if time-varying expressions could be passed if only values at initialization are used).Based on how
spatialDistribution
has been implemented in tools, could we expect that libraries are already complying with these requirements?The text was updated successfully, but these errors were encountered: