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 PyomoModel class #420

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Add PyomoModel class #420

wants to merge 6 commits into from

Conversation

khaeru
Copy link
Member

@khaeru khaeru commented Jun 29, 2021

This is an incomplete¹ PR that addresses #119 by adding ixmp.model.pyomo.PyomoModel, a class that solves models via Pyomo. Pyomo offers the option of using some supported open-source solvers.

The Pyomo docs use the phrase algebraic modeling language (AML) to refer to an information/data model that includes equations, parameters, variables, etc. Because ixmp was geared towards GAMS, another AML, it already aligns well to these concepts, so the implementation is not too awkward or complex. (The same would apply to other AMLs like AMPL, linopy, and perhaps others.)

¹ it is provided for exploration, discussion, and to clarify the work that would be involved to complete it.

How to review

To be added.

PR checklist

  • Complete the code. This is currently blocked by the following limitations of JDBCBackend, that would need to be addressed, either through changes to the underlying Java code (ixmp_source) or a new backend, e.g. Add Python DB API backend #400.
    • Does not allow to set values of equations (ItemType.equ) and variables (ItemType.var). This is necessary to store the model solution produced by Pyomo.
  • Continuous integration checks all ✅
  • Add or expand tests; coverage checks both ✅
  • Add, expand, or update documentation.
  • Update release notes.

@khaeru khaeru added the enh New features & functionality label Jun 29, 2021
@khaeru khaeru force-pushed the feature/pyomo-model branch from a0625ef to 37ff9ef Compare July 22, 2021 11:34
@khaeru khaeru marked this pull request as draft August 27, 2021 11:57
@khaeru khaeru changed the title 🚧 Add PyomoModel class Add PyomoModel class May 9, 2022
@khaeru khaeru force-pushed the feature/pyomo-model branch from 37ff9ef to b36c34f Compare May 9, 2022 13:15
@khaeru
Copy link
Member Author

khaeru commented May 11, 2023

Per discussion with @glatterf42, if work continues with this, it may be better to target linopy, a newer package which seems to be a more performant—though possibly also less mature, uncertain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enh New features & functionality help welcome
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant