Skip to content
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

Add a comparison with InfiniteOpt.jl (Task #5) #21

Open
frapac opened this issue Jul 24, 2024 · 7 comments
Open

Add a comparison with InfiniteOpt.jl (Task #5) #21

frapac opened this issue Jul 24, 2024 · 7 comments

Comments

@frapac
Copy link
Collaborator

frapac commented Jul 24, 2024

InfiniteOpt.jl is another Julia package that supports the solution of large-scale optimal control problems. It can use both JuMP and ExaModels as backend.
https://github.com/infiniteopt/InfiniteOpt.jl/

I would suggest to add a comparison between InfiniteOpt.jl and OptimalControl.jl. See e.g. the following tutorial:
https://infiniteopt.github.io/InfiniteOpt.jl/stable/examples/Optimal%20Control/hovercraft/

@ocots
Copy link
Member

ocots commented Sep 11, 2024

@0Yassine0 Can you try to make a comparison with this package?

@0Yassine0
Copy link
Collaborator

0Yassine0 commented Sep 12, 2024

The example provided in this tutorial have constraints on intermediate values of the state.
I guess that's not allowed in OptimalControl.
I'll look for another model to use in the comparison : https://infiniteopt.github.io/InfiniteOpt.jl/stable/examples/Optimal%20Control/consumption_savings/#Consumption-Savings-Problem

@0Yassine0
Copy link
Collaborator

I created a small comparison between OptimalControl and InfiniteOpt in this folder.
I compared the results using plot and @benchmark from BenchmarkTools. here.
Is there any other particular comparison I should add to the notebook?

@frapac
Copy link
Collaborator Author

frapac commented Sep 12, 2024

I just looked at the logs: Ipopt is converging in one iteration with InfiniteOpt, 4 with OptimalControl.jl. is there any reason why it is the case? Is the model a QP with only equality constraints?

I would suggest having a look at the quadrotor problem, already implemented in OptimalControlProblems.jl. You can found an implementation using InfiniteOpt.jl in that file. Do you think it's doable?

@ocots
Copy link
Member

ocots commented Sep 12, 2024

Clearly, the initial guess is not the same.

@0Yassine0
Copy link
Collaborator

By fixing the initial guess for both models, the number of iteration is now the same.

@0Yassine0
Copy link
Collaborator

I would suggest having a look at the quadrotor problem, already implemented in OptimalControlProblems.jl. You can found an implementation using InfiniteOpt.jl in that file. Do you think it's doable?

The quadrotor problem given in the file is not the same model we have in OptimalControlProblems.jl.
I created the similar problem in the same folder.
The comparison file is here.
Is there an explanation why even by fixing the same initial guess the first objective value given by Ipopt isn't the same for both solvers?

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

No branches or pull requests

3 participants