-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
breaking change in behavior of complete in non-breaking release #3397
Comments
Those are all parameters? There has never been anything guaranteeing there won't be other parameters, and in fact there are many cases where this is already happened? |
Also |
Anywhere that previously assumed that in a non-hierarchical or flattened system It is impossible to build stuff on MTK without using |
Where did we say those were equal? They were made as different calls because they don't do the same thing... why would two different functions that do two different things always be the same? There are many systems for which that already wasn't true anyways. |
from That is the long-standing documentation for them in the |
Whatever the new intended behaviour is, in that case it seems that we need a new, public version, of |
Let's be clear here. |
For reference, he's the code https://github.com/SciML/ModelingToolkit.jl/blob/master/src/systems/abstractsystem.jl#L799-L874 and it has been just a generated alias for getfield since af37b7f#diff-287e017b6c265948a34862d11b63bade810cb38f11173644350028d4ba836661R132 |
Yes, but the meaning of the field has now changed. Moreover, previously in a flattened/non-hierarchical system |
Well it still gives you that, since the initial values are parameters? |
I'll close this as it doesn't feel like there is anything productive to continue discussing about this and it sounds like this was an intentional change that won't be modified. At the end of the day though, this change has broken stuff in Catalyst, as have many of the other changes in API function behavior over the last 5+ months. This has resulted in our being unable to have a fully working version of Catalyst master for most of that time, and prevented us from making a release going back September. |
Just to be clear here, two things. One, if you rely on the exact values in a field because you're using a But also, the FUD is very misplaced here. This is the change to uniformity, and it's the change you requested 😅. The steps to get here were:
The hope though is that now that everything has an initialization problem, which is well-motivated since it ends up being required for correctness across the board, that means there's no more problems that should ever switch from "not having an initialization problem" to "having an initialization problem": there is no choice anymore, they are always on the same side. One thing required to do that correctly though is that we have to really understand the initial values as parameters. In that sense, (1) and (2) become the same problem, simplifying the mechanism a lot. I don't think we're at the final state yet, mostly because of some interactions like https://discourse.julialang.org/t/modelingtoolkit-changes-with-remake/126004 where if you directly modify values non-symbolically it can be a bit unintuitive, but we're hopefully pretty close now. The reason we didn't roll out initialization systems to everything at the start was that we couldn't run an initialization system on non-DAEs in the first place, so we had to update the whole ecosystem to allow for intiailization problems everywhere (not just ODEs, but optimization, nonlinear solves, etc.), and now with that it can be standard. |
What precluded just adding an |
Then ps wouldn't be the parameters of the system? That would be breaking. |
In #3444 I argue that what is a "parameter" is not as clear as stated here. In fact, the MTK docs make "parameter" sound much more like what I think a parameter is, rather than an initial condition. The For what it is worth this has also broken my code and was a result of a non-major release. The change here was not in the field, but in the value. If a user uses |
As discussed with @SebastianM-C , I agree with this when considering initial value problems. Again, some specification about this in the docs, especially in the first call of |
Calling
complete(sys)
now changes the underlying parameters of a system, interjecting lots ofInitial(unknown)
s into the parameter list. This seems breaking, as anything that previously worked with completed systems, like various Catalyst functionality, suddenly has lots of non-parameter parameters to deal with when callingget_ps(sys)
.Older MTK v9s (like 9.59):
such that
Newer MTK v9s:
The text was updated successfully, but these errors were encountered: