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 mps support #581

Closed
wants to merge 12 commits into from
Closed

Conversation

dthuerck
Copy link
Contributor

@dthuerck dthuerck commented Dec 11, 2023

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.

Summary

See issue #582 - adds support for mps and mps.gz, .lp.gz files through docplex.

Details and comments

gzip is used to extract files on the fly. I replicated the single test that uses lp files and modified it so that it uses mps files.

@coveralls
Copy link

coveralls commented Dec 11, 2023

Pull Request Test Coverage Report for Build 7339423754

  • 54 of 54 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.07%) to 93.099%

Totals Coverage Status
Change from base Build 7144510537: 0.07%
Covered Lines: 4560
Relevant Lines: 4898

💛 - Coveralls

@dthuerck dthuerck marked this pull request as draft December 11, 2023 23:02
@dthuerck
Copy link
Contributor Author

Moving this back to draft as there is still a permission error with temporary files under windows.

@dthuerck dthuerck marked this pull request as ready for review December 11, 2023 23:46
@t-imamichi
Copy link
Collaborator

Since QuadraticProgram (QP) code is already big, we carefully add methods to it. It increases the maintenance cost.
qiskit_optimization has modules to separate functionality as follows and I suggest take advantage of it.

  • qiskit_optimization.translators: translate between QP and other objects
  • qiskit_optimization.converters: convert QP to QP in another form.

For this PR's purpose, I suggest making functions qiskit_optimization.translators.{from_mps,to_mps} in a separate file such as mps.py in qiskit_optimziation/translators.

QP has methods read_from_lp_file/write_to_lp_file before we introduce the translators. So, it might be nice to make from_lp_file to_lp_file functions to refactor and simplify QP codes in quadratic_program.py.

@t-imamichi t-imamichi mentioned this pull request Dec 12, 2023
@dthuerck dthuerck closed this Dec 27, 2023
@dthuerck dthuerck reopened this Dec 27, 2023
@dthuerck
Copy link
Contributor Author

As discussed in #581, will replace this PR with another one.

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

Successfully merging this pull request may close these issues.

3 participants