Some MIP solvers will save feasible solutions in files that can be read by AMPL. This only works if the run is terminated by a recognizable interrupt (equivalent to a "ctrl-C") or other termination condition, and not by a crash or arbitrary "kill" operation; so it's worth a try but may or may not be helpful.
In CPLEX you can specify
option cplex_options 'poolstub savesol';
or add this option to your existing cplex_options string. (I use savesol just as an example; you can specify any name you like.) Then CPLEX will write the successively better integer solutions that it finds as savesol1.sol, savesol2.sol, etc. These files are produced upon termination. Then if the last one is, say, savesol7.sol, and if you can copy it back to a local computer, you can read it in a subsequent AMPL session with the command
solution savesol7.sol;
Only the solution is in this file, so before you give this command you must set up the whole AMPL model again just as it was when you tried to solve it. In your case that would mean running the same script that you submitted to the computational grid, but with "solution savesol7.sol;" replacing the "solve;" command.
In Gurobi the analogous feature is specified in the gurobi_options string with the option ams_stub (ams stands for "alternate MIP solutions").
Bob Fourer
From: am...@googlegroups.com [mailto:am...@googlegroups.com]
On Behalf Of arr...@gmail.com
Sent: Friday, February 7, 2014 6:16 PM
To: am...@googlegroups.com
Subject: [AMPL 7980] Store a feasible solution before completion
Using the "poolstub" option creates what CPLEX calls its solution pool. There are many other options with "pool" in the name that regulate the solution pool's contents; see
www.ampl.com/netlib/ampl/solvers/cplex/README.cplex
In particular "poolcapacity n" causes only the last n solutions to be kept. For a MIP each new solution must have a better objective than the previous one, and this tends to keep the number of solutions found to a reasonable level.
On Behalf Of arr...@gmail.com
Sent: Monday, February 10, 2014 9:44 AM
To: am...@googlegroups.com
Cc: 4...@ampl.com
Subject: Re: [AMPL 7998] Store a feasible solution before completion
Using the "poolstub" option creates what CPLEX calls its solution pool. There are many other options with "pool" in the name that regulate the solution pool's contents; see
www.ampl.com/netlib/ampl/solvers/cplex/README.cplex
In particular "poolcapacity n" causes only the last n solutions to be kept. For a MIP each new solution must have a better objective than the previous one, and this tends to keep the number of solutions found to a reasonable level.
Bob Fourer