Skip to content

pulp does not work on COIN_CMD #828

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

Open
zxt5 opened this issue Apr 7, 2025 · 2 comments
Open

pulp does not work on COIN_CMD #828

zxt5 opened this issue Apr 7, 2025 · 2 comments

Comments

@zxt5
Copy link

zxt5 commented Apr 7, 2025

I want to use pulp with COIN_CMD, but it does not work. For reference, PULP_CBC_CMD works fine, and cbc also works correctly from command line. Here is an example:

from pulp import *

solver = COIN_CMD()
# solver = PULP_CBC_CMD() # works fine
file_path = "seed.mps"

vars, prob = LpProblem.fromMPS(file_path)
prob.solve(solver)

status = LpStatus.get(prob.status)
print(f"Status: {status}")

output:

Welcome to the CBC MILP Solver
Version: Devel (unstable)
Build Date: Apr  7 2025
command line - /tmp/86b414af1de948e5bac2808cfcb3937b-pulp.mps -timeMode elapsed -branch -printingOptions all -solution /tmp/86b414af1de948e5bac2808cfcb3937b-pulp.sol (default strategy 1)
At line 2 NAME          MODEL
At line 3 ROWS
At line 23 COLUMNS
At line 202 RHS
At line 221 BOUNDS
At line 240 ENDATA
Problem MODEL has 18 rows, 9 columns and 162 elements
Coin0008I MODEL read with 0 errors
Option for timeMode changed from cpu to elapsed
Total time (CPU seconds):       0.000299   (Wallclock seconds):       0.000605106
Status: Undefined

Was I using pulp wrong? Any suggestion is appreciated.

@zxt5
Copy link
Author

zxt5 commented Apr 7, 2025

I guess this is because the newest cbc need an explicit cmd option -solve to solve the problem

@pchtsp
Copy link
Collaborator

pchtsp commented Apr 8, 2025

Try reproducing this behavior via the command line (without pulp) and see if you make it work. If you do, open an issue in the cbc github: https://github.com/coin-or/cbc

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

No branches or pull requests

2 participants