google / or-tools

Google's Operations Research tools:
https://developers.google.com/optimization/
Apache License 2.0
11.24k stars 2.13k forks source link

Warm start for `GLOP_LINEAR_PROGRAMMING`? #3997

Closed gdowdy3 closed 11 months ago

gdowdy3 commented 11 months ago

What language and solver does this apply to? Python, GLOP

Describe the problem you are trying to solve. I would like to "warm-start" the GLOP linear programming solver when applied to multiple similar LPs. In particular, I would like to

  1. Solve an LP with GLOP.
  2. Add a decision variable to that LP.
  3. Solve the LP again, starting from the optimal basis found in the previous solution.

I know how to do steps 1 and 2, but I have't yet figured out how to achieve step 3. @lperron, @Mizux, Does this feature exist in OR-Tools? If not, does it exist in OR-Tools for other open source solvers?

lperron commented 11 months ago

So, you can on c++ with MPsolver.

On MPsolver: Setstartinglpbasis is not wrapped in python. You can patch the swig file and recompile the python module.

You can use math_opt (c++ and python) on the main branch with bazel only (see my post on or-tools 10.0)