Skip to content

Conversation

vyudu
Copy link
Member

@vyudu vyudu commented May 6, 2025

Requires CasADi.jl 1.0.2

@vyudu vyudu requested a review from ChrisRackauckas May 9, 2025 00:02
@vyudu vyudu closed this May 9, 2025
@vyudu vyudu reopened this May 9, 2025
# Test explicit method.
jprob = JuMPDynamicOptProblem(sys, u0map, tspan, parammap, dt = 0.01)
@test JuMP.num_constraints(jprob.model) == 2 # initials
jsol = solve(jprob, Ipopt.Optimizer, constructRK4, silent = true)
Copy link
Member

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())

Copy link
Member Author

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())?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

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)
Copy link
Member

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.

@ChrisRackauckas
Copy link
Member

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.

@ChrisRackauckas ChrisRackauckas merged commit c0a61ab into SciML:master May 9, 2025
66 of 90 checks passed
@vyudu vyudu deleted the casadi2 branch May 9, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants