Page 1 of 1

Saving solution with partial solve, and restarting solve

Posted: Fri Feb 10, 2017 5:05 pm
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.

Re: Saving solution with partial solve, and restarting solve

Posted: Fri Feb 10, 2017 5:36 pm
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

Re: Saving solution with partial solve, and restarting solve

Posted: Mon Feb 13, 2017 9:12 am
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