-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
BVProblem with constraints #3323
base: master
Are you sure you want to change the base?
Conversation
I think this is mostly ready for review @ChrisRackauckas . Some of the problems in the tests don't seem fully well-posed, so I still need to work on that a bit, but the code itself should be correct. |
`constraints` are used to specify boundary conditions to the ODESystem in the | ||
form of equations. These values should specify values that state variables should | ||
take at specific points, as in `x(0.5) ~ 1`). More general constraints that | ||
should hold over the entire solution, such as `x(t)^2 + y(t)^2`, should be | ||
specified as one of the equations used to build the `ODESystem`. Below is an example. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's odd that this is here. Problem constructors are only supposed to take values: constraints are structural. They should be added to the system I would think? @baggepinnen thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the 0.5
in x(0.5) ~ 1
be a parameter? I can imagine this being something one would like to change without re-simplifying the system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to have a BVPSystem
that contains a ConstraintSystem
like the OptimizationSystem
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes to both of these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I will work on these conversions.
# Cartesian pendulum from the docs. | ||
# DAE IVP solved using BoundaryValueDiffEq solvers. | ||
# let | ||
# @parameters g |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's up with these ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interface for specifying boundary conditions is different for the BVDAE solvers at the moment (you specify the time points as a separate argument), was gonna wait until they get updated to be the same.
Followup to #3251. Performance is something like 30x worse than generating the BVProblem using manually-defined f, bc, need to investigate why. Will uncomment the BVDAE solver tests when they get updated to use the same boundary condition format as the others.