-
-
Notifications
You must be signed in to change notification settings - Fork 219
feat: CasADiDynamicOptProblem #3602
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
Conversation
@@ -28,17 +31,23 @@ const M = ModelingToolkit | |||
jsol = solve(jprob, Ipopt.Optimizer, constructRK4, silent = true) |
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.
I thought this was changed to using the constructor? This would be natural as:
alg = JuMPCollocation(Ipopt.Optimizer, constructRK4())
and
alg = CasADiCollocation("ipopt", constructRK4())
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.
so the syntax is like sol = solve(jprob, JuMPCollocation(Ipopt.Optimizer, constructRK4())
?
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
@test ≈(jsol2.sol.u, osol2.u, rtol = 0.001) | ||
iprob = InfiniteOptDynamicOptProblem(sys, u0map, tspan, parammap, dt = 0.01) | ||
isol = solve(iprob, Ipopt.Optimizer, | ||
derivative_method = InfiniteOpt.FiniteDifference(InfiniteOpt.Backward()), | ||
silent = true) # 11.540 ms, 4.00 MiB | ||
@test ≈(jsol2.sol.u, osol2.u, rtol = 0.001) | ||
@test ≈(isol.sol.u, osol2.u, rtol = 0.001) | ||
csol2 = solve(cprob, "ipopt", constructImplicitEuler, silent = true) |
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.
silent
isn't a common kwarg. verbose
.
I like it sans a few interface things, but let's merge so that the big PR is out of the way and do the little interface munging before it gets documented. |
Requires CasADi.jl 1.0.2