LP model solves with CLP and PDLP but fails using GLOP #4192
Replies: 4 comments 6 replies
-
glop is much stricter w.r.t numerical errors. Have you enabled logging ? |
Beta Was this translation helpful? Give feedback.
5 replies
-
#1868 (comment)
Laurent Perron | Operations Research | ***@***.*** | (33) 1 42 68 53
00
Le jeu. 2 mai 2024 à 14:12, kasvas-ee ***@***.***> a écrit :
… Thank you @lperron <https://github.com/lperron> .
I enabled the logs and noticed the cost perturbation was probably larger
than the solution checker tolerance. Logs pasted below. Is there a syntax
in Python to raise the 'solution_feasibility_tolerance' to 1e-5? I tried
looking in 'pywraplp.MPSolverParameters' for the feasibility tolerance
setting, but could only find 'PRIMAL_TOLERANCE' and 'DUAL_TOLERANCE'.
Final unscaled solution:
Primal objective (before moving primal/dual values) = 4.407207591129694E+04
Dual objective (before moving primal/dual values) = 4.407207538915282E+04
Max. primal values move = 9.09495e-13
Max. dual values move = 9.16677e-17
Primal objective (after moving primal/dual values) = 4.407207591129694E+04
Max. rhs perturbation = 8.18545e-12
Max. cost perturbation = 2.05641e-06
Max. primal infeasibility = 5.45697e-12
Max. dual infeasibility = 1.20905e-14
Objective error <= 0.060193
The needed cost perturbation is too large !!
status: IMPRECISE
objective: 44072.1
iterations: 2504
time: 0.0960571
deterministic_time: 0.220503
—
Reply to this email directly, view it on GitHub
<#4192 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUPL3NDZT6EQQV2NOD2WY3ZAIUUDAVCNFSM6AAAAABHB5JTSSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TEOJUHEZTE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
and
https://or-tools.github.io/docs/pdoc/ortools/linear_solver/pywraplp.html#Solver.SetSolverSpecificParametersAsString
Laurent Perron | Operations Research | ***@***.*** | (33) 1 42 68 53
00
Le jeu. 2 mai 2024 à 14:14, Laurent Perron ***@***.***> a écrit :
… #1868 (comment)
Laurent Perron | Operations Research | ***@***.*** | (33) 1 42 68
53 00
Le jeu. 2 mai 2024 à 14:12, kasvas-ee ***@***.***> a écrit :
> Thank you @lperron <https://github.com/lperron> .
> I enabled the logs and noticed the cost perturbation was probably larger
> than the solution checker tolerance. Logs pasted below. Is there a syntax
> in Python to raise the 'solution_feasibility_tolerance' to 1e-5? I tried
> looking in 'pywraplp.MPSolverParameters' for the feasibility tolerance
> setting, but could only find 'PRIMAL_TOLERANCE' and 'DUAL_TOLERANCE'.
>
> Final unscaled solution:
> Primal objective (before moving primal/dual values) = 4.407207591129694E+04
> Dual objective (before moving primal/dual values) = 4.407207538915282E+04
> Max. primal values move = 9.09495e-13
> Max. dual values move = 9.16677e-17
> Primal objective (after moving primal/dual values) = 4.407207591129694E+04
> Max. rhs perturbation = 8.18545e-12
> Max. cost perturbation = 2.05641e-06
> Max. primal infeasibility = 5.45697e-12
> Max. dual infeasibility = 1.20905e-14
> Objective error <= 0.060193
> The needed cost perturbation is too large !!
> status: IMPRECISE
> objective: 44072.1
> iterations: 2504
> time: 0.0960571
> deterministic_time: 0.220503
>
> —
> Reply to this email directly, view it on GitHub
> <#4192 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACUPL3NDZT6EQQV2NOD2WY3ZAIUUDAVCNFSM6AAAAABHB5JTSSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TEOJUHEZTE>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
yes, this is the write syntax.
The string uses a json syntax.
The parameters are in ortools/glop/parameters.proto
Laurent Perron | Operations Research | ***@***.*** | (33) 1 42 68 53
00
Le jeu. 2 mai 2024 à 14:57, kasvas-ee ***@***.***> a écrit :
… Thanks for the links. This thread helped me better understand the log, and
I tried to mimic the steps to modify the feasibility tolerance.
I could not figure out the Python equivalent of this java code from the
thread:
solver.setSolverSpecificParametersAsString(operations_research.glop.Parameters.GlopParameters.newBuilder().setSolutionFeasibilityTolerance(1e-3).build().toString());
Eventually I tried this, which seemed to work:
solver.SetSolverSpecificParametersAsString("solution_feasibility_tolerance:1e-5")
—
Reply to this email directly, view it on GitHub
<#4192 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUPL3IJWGDKULDJU5S53U3ZAIZ2DAVCNFSM6AAAAABHB5JTSSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TEOJVGM2TE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
kasvas-ee
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What version of OR-Tools and what language are you using?
Version: 9.7.2996
Language: Python
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
GLOP, CLP, PDLP
What operating system (Linux, Windows, ...) and version?
Windows
What did you do?
Steps to reproduce the behavior:
solver = pywraplp.Solver('Model', pywraplp.Solver.GLOP_LINEAR_PROGRAMMING)
ret = solver.solve(params)
What did you expect to see
ret
value as zero from solver.solve, indicating optimal solution.What did you see instead?
ret
as 4 from solver.solve, which indicates 'Abnormal / Error'Make sure you include information that can help us debug (full error message, model Proto).
Following zipped file contains the LP model in LpFormat:
lp_file.zip
Anything else we should know about your project / environment
Using PDLP solver solves the LP model with an objective function value of 44116.22. CLP solver solves the model too.
Beta Was this translation helpful? Give feedback.
All reactions