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

Gurobi solver interfaces #349

Open
brynpickering opened this issue Feb 12, 2021 · 3 comments · May be fixed by #551
Open

Gurobi solver interfaces #349

brynpickering opened this issue Feb 12, 2021 · 3 comments · May be fixed by #551
Assignees
Projects
Milestone

Comments

@brynpickering
Copy link
Member

We want to interface with Gurobi more directly, to leverage performance improvements in the solver backend.

One method is to use the Gurobi Python interface

Another method is the Pyomo Gurobi persisent solver (usage documentation)

The Python interface would probably lead to the greatest improvements, but needs more work to make our mathematical formulation more general (I.e. not written for Pyomo). However, the persistent solver could be a 'quick' fix for models that end up making small changing and then re-solving (cf. SPORES).

This issue can be used to track any updates in Gurobi solver interfaces.

@brynpickering
Copy link
Member Author

I've tested the persistent solver with the national scale example model (3-month, spores run mode, 10 spores) with the following results:

Gurobi wall time: 3min 31s
GurobiPersistent wall time: 2min 20s

The first two model runs (cost optimal and spore 0) build a fresh model in Gurobi. It takes approximately 2-3x longer for Pyomo to send the model to Gurobi on a fresh build (~15s instead of ~6s), so GurobiPersistent is probably only worthwhile when n_spores > 3.

@brynpickering
Copy link
Member Author

Extending the model from 3 months to one year, we get:

Gurobi wall time: 35min 27s
GurobiPersistent wall time: 24min 7s

So it looks like the savings scale quite well.

@sjpfenninger sjpfenninger added this to the 0.7.x milestone May 20, 2021
@sjpfenninger sjpfenninger added this to Blocked issues in v0.7.0 May 20, 2021
@brynpickering
Copy link
Member Author

This is no longer blocked. As of #411 we can write a gurobi solver interface using the gurobi python API

@brynpickering brynpickering moved this from Blocked issues to Constraints as YAML in v0.7.0 Mar 17, 2023
@brynpickering brynpickering moved this from Constraints as YAML to New features building on YAML constraints in v0.7.0 Mar 17, 2023
@brynpickering brynpickering linked a pull request Jan 26, 2024 that will close this issue
4 tasks
@sjpfenninger sjpfenninger modified the milestones: 0.7.x, 0.7.0 Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v0.7.0
New features building on YAML constra...
Development

Successfully merging a pull request may close this issue.

2 participants