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

JuMP Direct Mode #275

Closed
ccoffrin opened this issue May 9, 2018 · 5 comments · Fixed by #879
Closed

JuMP Direct Mode #275

ccoffrin opened this issue May 9, 2018 · 5 comments · Fixed by #879
Labels
enhancement JuMP v0.19 Issues to do after MOI migration

Comments

@ccoffrin
Copy link
Member

ccoffrin commented May 9, 2018

See if there is any need to consider using JuMP direct mode and/or expose this as parameter.

@ccoffrin ccoffrin added the JuMP v0.19 Issues to do after MOI migration label May 9, 2018
@ccoffrin ccoffrin added this to the JuMP v0.19 milestone Aug 16, 2018
@ccoffrin ccoffrin modified the milestones: JuMP v0.19, Advanced JuMP v0.19 Features May 9, 2019
@ccoffrin ccoffrin removed this from the Advanced JuMP v0.19 Features milestone May 27, 2019
@ccoffrin
Copy link
Member Author

@odow curious about your thoughts on this? Is there any clear reason / value to adding support for this?

@odow
Copy link
Collaborator

odow commented Aug 13, 2023

I don't see a need. Obviously, no one has ever complained or requested this in the last five years...

@odow
Copy link
Collaborator

odow commented Aug 13, 2023

Previously, it wasn't super useful because Ipopt and the conic solvers didn't support direct mode. But the new nonlinear + Ipopt will. I don't think it makes much of a difference though. It might just lower memory usage.

@ccoffrin
Copy link
Member Author

If memory savings are on the order of 2x, I can imagine a few uses cases. Am I correct in that to use direct mode all one needs to do is initialize the jump model with model = direct_model(<solver here>)?

If so then the user provided jump_model parameter may be an easy way that users can already use InfrastructureModels in direct mode. See, https://github.com/lanl-ansi/InfrastructureModels.jl/blob/master/src/core/base.jl#L43-L103 and https://github.com/lanl-ansi/InfrastructureModels.jl/blob/master/src/core/base.jl#L378-L414

@odow
Copy link
Collaborator

odow commented Aug 13, 2023

If memory savings are on the order of 2x

Yes, about that. (At least for model construction. Peak usage improvement somewhat less once you take the solvers workspace into account.)

Am I correct in that to use direct mode all one needs to do is initialize the jump model with model = direct_model()

Yes, with the subtle distinction that the solver must be instantiated, as opposed to a constructor. So direct_model(Ipopt.Optimizer()), not direct_model(Ipopt.Optimizer).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement JuMP v0.19 Issues to do after MOI migration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants