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

PulpSolverError: Pulp: Error while trying to execute, use msg=True for more details #703

Open
kaijing-zhang opened this issue Nov 14, 2023 · 4 comments

Comments

@kaijing-zhang
Copy link

Hi Experts,

i use below scripts to load problem from JSON.
`
import pulp as lp

d, loaded_problem = lp.LpProblem.fromJson('saved_problem.json')
loaded_problem.solve()
`

it shows

At line 1594 ENDATA Problem MODEL has 341 rows, 50 columns and 704 elements Coin0008I MODEL read with 0 errors Continuous objective value is 8.3122 - 0.00 seconds Cgl0003I 0 fixed, 0 tightened bounds, 15 strengthened rows, 0 substitutions Cgl0003I 0 fixed, 0 tightened bounds, 10 strengthened rows, 0 substitutions Cgl0004I processed model has 39 rows, 21 columns (21 integer (0 of which binary)) and 126 elements Cutoff increment increased from 1e-05 to 0.9999 Cbc0012I Integer solution of 28 found by DiveCoefficient after 0 iterations and 0 nodes (0.01 seconds) Cbc0038I Full problem 39 rows 21 columns, reduced to 8 rows 11 columns Cbc0012I Integer solution of 20 found by RINS after 0 iterations and 0 nodes (0.01 seconds) terminate called after throwing an instance of 'CoinError' Exception in execute request:

then error out

could you please help me?

the saved_problem.json file is in the attachment.
saved_problem.json

@pchtsp
Copy link
Collaborator

pchtsp commented Nov 14, 2023

This seems an issue to report to the cbc repository. https://github.com/coin-or/Cbc

Having said that, the coefficients for your constraints seem to have way more decimal digits than you need. Consider rounding all the floats on your problem to a reasonable precision (e.g., 2 digits).

That could be the cause of the error.

@kaijing-zhang
Copy link
Author

This seems an issue to report to the cbc repository. https://github.com/coin-or/Cbc

Having said that, the coefficients for your constraints seem to have way more decimal digits than you need. Consider rounding all the floats on your problem to a reasonable precision (e.g., 2 digits).

That could be the cause of the error.

thanks for your suggestion.
but my coefficients for my constraints are all 1 or -1.
such as: a6536 + a6537 + a6538 <= 30
a6536, a6537 a6538 and are variables. they coefficients are all 1

@pchtsp
Copy link
Collaborator

pchtsp commented Nov 14, 2023

Well if you open the json file you shared in a text editor you will see "constant" values for some constraints that have maaany decimals.

@kaijing-zhang
Copy link
Author

Well if you open the json file you shared in a text editor you will see "constant" values for some constraints that have maaany decimals.

Thanks a lot. i will try.
how to send the case to CBC? same as my description here ans send the json to them?

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