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

Integration with Pyomo (or similar) #1232

Open
gilirosenberg12 opened this issue Aug 10, 2022 · 3 comments
Open

Integration with Pyomo (or similar) #1232

gilirosenberg12 opened this issue Aug 10, 2022 · 3 comments
Labels
feature-request/enhancement New feature or request

Comments

@gilirosenberg12
Copy link

Application
I want to solve my ILP/QP with multiple solvers, including (but not limited) to the QA. I'd much rather use a single piece of code for formulating the problem. For example, via a standard interface like Pyomo. However, I cannot do that for the QA - I need to reformulate the problem using dimod (or another library).

Proposed Solution
I'm suggesting to add an integration with Pyomo, or a similar library that supports solving non-linear integer optimization problems. I should be able to write code to formulate my optimization problem only once, and solve it with various common conventional solvers like Gurobi, CPLEX, XPRESS, etc., as well as with the QA.

Alternatives Considered
Using CQM directly - the existence of CQM makes this relatively easy. However, it introduces redundancy, which can be a source of errors, as well as requiring increased effort to test, validate, and maintain the codebase.

@arcondello arcondello added the feature-request/enhancement New feature or request label Aug 10, 2022
@arcondello
Copy link
Member

arcondello commented Aug 10, 2022

Agree that would be useful. In the mean time, we do support lp files which can serve as an intermediate representation.

I believe you can create an LP file using pyomo and then convert to a dimod CQM

cqm = dimod.lp.load('example.lp')

See also #1228 for another format we'd like to support.

@gilirosenberg12
Copy link
Author

Thanks, @arcondello I wasn't aware of this option, that should work nicely for now! But still it would be nice to have a more direct integration, to avoid the overhead of writing to a file and reading from it...

@vpranjal
Copy link

vpranjal commented Dec 11, 2023

Very much agree with this request - would love to use an integrated approach with Pyomo and pass the problem to QA. CQM might enforce that no cubic or higher order terms be present in the formulation to start with. Might be generally be usable for MILP/ LPs/ QPs solvable by CQM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants