Replies: 1 comment
-
Or provide an api to get current solution best bound |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using python Pulp package to solve linear programs (MILPs as well). I find that certain problems are taking a lot of time to reach optimality and so I am forced to use a time limit on the solver.
answer=prob.solve(p.PULP_CBC_CMD(timeLimit=999))
#answer=prob.solve(p.PULP_CBC_CMD(maxSeconds=999, msg=1, gapRel=0))
I need to save the value of the relative %-age fractional gap "gapRel" into a file for later use. Please suggest ways to print it separately.
Presently I have to copy the Fractional Gap from the Solutions printed by the PuLP Solver and pasting it in Notepad manually for later reference; but I wish to automate this process and therefore need to obtain the Fractional Gap value into a variable.
I could not find the solution here:- https://groups.google.com/g/pulp-or-discuss/c/IBGL7hqj7wU
You may also answer it here:- https://stackoverflow.com/questions/71603297/how-to-obtain-the-fracgap-or-gaprel-from-a-solution-of-pulp
Beta Was this translation helpful? Give feedback.
All reactions