Hinting a known feasible solution to a MILP solver with Google OrTools mathopt in Python #4265
Replies: 2 comments 1 reply
-
Looking for Solutionhint in ortools/math_opt/... src. or-tools/ortools/math_opt/core/python/solver_test.py Lines 191 to 209 in ef7bb07 or or-tools/ortools/math_opt/python/model_parameters_test.py Lines 28 to 38 in ef7bb07 |
Beta Was this translation helpful? Give feedback.
-
If you look in this file: https://github.com/google/or-tools/blob/stable/ortools/math_opt/solvers/highs_solver.cc You see that hint is not supported for HiGHS yet (it is just silently ignored). Gurobi, CP-SAT, and SCIP all support hint if this feature is critical. Gurobi and SCIP also support incremental MIP solving, which might buy you a little more than the hint if you are just changing the objective and resolving. Gurobi also has its own hierarchial objectives which we have limitted support for. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have been going through the online documentation and the samples available on Github, but I was not able to find an example on how to provide an initial solution (or warm start, or solution hint, depending on the preferred synonym) to a compatible MILP solver when modelling through OrTools mathopt in Python.
Would you have a simple example available for this ?
Note if that helps that I am working with OrTools version 9.10.
Thanks a lot !
(I tried going through both the documentation and the source code, I found the SolutionHint class but I don’t know how to use it)
PS : not being sure of the preferred channel for such a question I also posted on stackoverflow so here is the reference to the page :
https://stackoverflow.com/questions/78592175/hinting-a-known-feasible-solution-to-a-milp-solver-with-google-ortools-mathopt-i
Beta Was this translation helpful? Give feedback.
All reactions