Skip to content

Does mathopt support warmup start for the second solve in this situation? #4151

Discussion options

You must be logged in to vote

MathOpt supports incremental solving. But instead of calling math.solve(), you need to make an IncrementalSolver object:

https://github.com/google/or-tools/blob/stable/ortools/math_opt/python/solve.py#L137

If you change n nonzeros between solves, mathopt will do O(n log n) work in python to send the data to C++ and then underlying solver. Updating the solver may require work, proportionate to model size/number of variables/number of constraints, this is solver dependent.

A (not particularly minimal) example of this is here:

https://github.com/google/or-tools/blob/stable/ortools/math_opt/samples/python/cutting_stock.py#L220

However, the amount of incrementalism you are going to get to some…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by orwant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Solver: MathOpt MathOpt related issue
2 participants