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 COPT support for PuLP #659

Merged
merged 9 commits into from
Sep 30, 2023
Merged

Add COPT support for PuLP #659

merged 9 commits into from
Sep 30, 2023

Conversation

wujianjack
Copy link
Contributor

This PR adds COPT support for PuLP, including COPT_CMD(), COPT_DLL() and COPT() solvers.

The COPT_CMD() and COPT_DLL() solvers depend on copt_cmd and COPT shared library respectively, so a full installation of COPT package is required. You can obtain the latest packages from https://github.com/COPT-Public/COPT-Release.

The COPT() solver depends on coptpy, you can install with pip install coptpy.

For larger instances, a valid COPT license is required, you can apply one from https://www.shanshu.ai/copt.

@CLAassistant
Copy link

CLAassistant commented Jun 14, 2023

CLA assistant check
All committers have signed the CLA.

@pchtsp
Copy link
Collaborator

pchtsp commented Jul 15, 2023

this is great! It would be great to add these solvers to the tests, like here:

pulp/pulp/tests/test_pulp.py

Lines 1479 to 1481 in a7684ac

class HiGHS_CMDTest(BaseSolverTest.PuLPTest):
solveInst = HiGHS_CMD

And also it would be even greater to add the installation of the python package in the integrated tests:

- name: Install highspy
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest'
run: |
pip install highspy

by adding another step with the installation of the package.

@wujianjack
Copy link
Contributor Author

wujianjack commented Jul 17, 2023

this is great! It would be great to add these solvers to the tests, like here:

pulp/pulp/tests/test_pulp.py

Lines 1479 to 1481 in a7684ac

class HiGHS_CMDTest(BaseSolverTest.PuLPTest):
solveInst = HiGHS_CMD

And also it would be even greater to add the installation of the python package in the integrated tests:

- name: Install highspy
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest'
run: |
pip install highspy

by adding another step with the installation of the package.

@pchtsp Thanks! Please check the updates.

@pchtsp
Copy link
Collaborator

pchtsp commented Sep 24, 2023

hello! it seems that the tests are falling. Could you take a look? Are you sure the COPT_HOME env variable is set?

@wujianjack
Copy link
Contributor Author

hello! it seems that the tests are falling. Could you take a look? Are you sure the COPT_HOME env variable is set?

Ah, the COPT_DLL requires the libcopt.so and COPT_HOME which requires some setup steps, can we just run the tests with COPT so that pip install coptpy is enough.

It would be nice to test with COPT_CMD and COPT_DLL also, but I don't know how to setup correctly in CI.

@pchtsp pchtsp merged commit c5bc6a8 into coin-or:master Sep 30, 2023
16 checks passed
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