Saving solution with partial solve, and restarting solve

questions about GAMS' tools
Post Reply
trengarajan
User
User
Posts: 3
Joined: 7 years ago

Saving solution with partial solve, and restarting solve

Post by trengarajan »

I am solving a large LP using Gurobi via GAMS. Solve itself takes very long, so I am interested in saving current solution part-way through the solve (say after 10 minutes), feed this solution into a new gams file and after some processing of this solution, continue solving. How is this accomplished? GAMS option Savepoint doesn't work because it seems to want to finish the solve before it can save. Then I tried save and restart but that seems to be work only for the GAMS portion of the code, not solve - restarting begins building the model al over again.
Last edited by trengarajan 7 years ago, edited 1 time in total.
cladelpino
User
User
Posts: 108
Joined: 7 years ago

Re: Saving solution with partial solve, and restarting solve

Post by cladelpino »

Setting:

option reslim=600

Will make the solver stop after 10 minutes. You can also consider iterlim for a stopping based on the number of iterations.

http://www.gams.com/latest/docs/usergui ... eslim2.htm
http://www.gams.com/latest/docs/usergui ... terlim.htm


Regards!
Claudio
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: Saving solution with partial solve, and restarting solve

Post by bussieck »

Restarting an LP solver from a previous basis used to be easy and reliable 20 years ago. We even had some tests that for this. With modern LP solvers this is not necessarily the case anymore, let along MIP solvers. Very often you have to decide to a) start from an advanced basis and not do presolve (this can be very bad if the presolved model is significantly smaller than the origina) or b) start from scratch with presolve (with this you loose all previous work). Cplex long time ago introduced a hybrid method that takes a starting point, apply presolve and use the starting point to crash a basis to restart the simplex algorithm. The option for dealing with starting information is "advind" in Cplex (http://www.gams.com/latest/docs/solvers ... PLEXadvind) and "useBasis" in Gurobi (http://www.gams.com/latest/docs/solvers ... BIusebasis).

-Michael
Post Reply