[Scip] how to get non optimal solutions

Tobias Achterberg achterberg at zib.de
Tue Dec 2 14:34:25 MET 2008


Hi Yosri,

Harzallah, Yosri wrote:
> Hi Timo,
> 
> Thanks for the response. 
> Can the values for the time limit and the remaining primal-dual gap be set in a ".set"
> file?

Yes. And in addition to Timo, I propose the following command sequence to get many solutions:

read yourinstance.mps
set limits bestsol 1
optimize
write solution 1.sol
set limits bestsol 2
optimize
write solution 2.sol
...
set limits bestsol 10
optimize
write solution 10.sol
set limits bestsol -1
optimize
write solution best.sol

This gives you at most 11 different solutions, with the optimal solution being "best.sol". 
Note, however, that if, say, the third solution is already the optimal solution, then all 
solutions from 3.sol to 10.sol and best.sol will be identical, and the "optimize" calls 
after the third solution will do nothing.

Tobias


More information about the Scip mailing list