How to warm start a LP problem in PySCIPOpt and initialize it with previous solution

111 views Asked by At

I have a LP problem formulated in PySCIPOpt. I would like to iteratively solve the LP, change the RHS of a specific constraint of this LP, solve it again, etc. The goal would be to use information from the previous LP solution to help solve the next LP. I know that the solution of the previous LP is dual feasible in the next LP, so only a few dual simplex iterations should be needed to solve the next LP.

I tried this at first:

model.optimize()
model.chgRhs(constraint,newRHS)
model.optimize()

But I realized that the model would solve only once. It looks like I needed to "free" it before solving it again. So then I tried this:

model.optimize()
model.freeTransform()
model.chgRhs(constraint,newRHS)
model.optimize()

But now it looks like all the information from the previous LP solution disappeared and the new LP is starting from scratch instead of starting from the previous optimal basis.

Any idea?

0

There are 0 answers