You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following up from #237, we should probably be checking to the solution status following a .solve() attempt. This is because pulp does not raise an exception when model is not solved. However, a status code can be retrieved through the status attribute following a solution attempt:
LpStatus key
string value
numerical value
LpStatusOptimal
"Optimal"
1
LpStatusNotSolved
"Not Solved"
0
LpStatusInfeasible
"Infeasible"
-1
LpStatusUnbounded
"Unbounded"
-2
LpStatusUndefined
"Undefined"
-3
Basically, we'll want to check the status and raise an exception (or at the very least a warning) if the status is anything but 1. See here for a gist demonstrating an example.
Following up from #237, we should probably be checking to the solution status following a
.solve()
attempt. This is becausepulp
does not raise an exception when model is not solved. However, a status code can be retrieved through thestatus
attribute following a solution attempt:LpStatusOptimal
LpStatusNotSolved
LpStatusInfeasible
LpStatusUnbounded
LpStatusUndefined
Basically, we'll want to check the status and raise an exception (or at the very least a warning) if the status is anything but
1
. See here for a gist demonstrating an example.cc @qszhao
The text was updated successfully, but these errors were encountered: