help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] shiftcover.mod - generate different solutions


From: Xypron
Subject: Re: [Help-glpk] shiftcover.mod - generate different solutions
Date: Fri, 18 Feb 2011 21:19:51 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20101123 SeaMonkey/2.0.11

Hello Andreas,

the MIP solver rejects branches of the tree of all solutions in the course of the solution process. Hence rerunning the solver is not avoidable.

If you use the GLPK library you could add the last solution as additional constraints to the problem and resolve the problem.

If you use the glpsol executable, you will have to restart it and will need some external storage. Using an ODBC database is an alternative to files. I think it is preferable because you can use it to accumulate the solutions, while in the case of files, you have to write all old solutions to the file again.

In the appendix the shiftcover model is changed to only use binary variables. This makes excluding possible solutions much easier.

The idea for the conversion is replacing integer variables (crew[s]) by sums of powers of two times binary variables (sum{i in I} 2**i * crew[s, i]).

Best regards

Xypron

Andreas F wrote:
From: address@hidden
On Wed, 2011-02-16 at 14:48 +0000, Andreas F wrote:
However, is it possible to generate multiple, different solutions [..] ?

Currently glpk does not have such a feature. However, you may obtain an
alternate mip solution by introducing a packing inequality to disable
the current optimal solution. See
http://lists.gnu.org/archive/html/help-glpk/2010-02/msg00033.html
for example.
The solution is indeed elegant, but it requires use of files and one has to 
re-run the solver.  Is it possible to generate more than one solution without 
using files?

Best regards,
Andreas

Attachment: shiftcover2.gz
Description: GNU Zip compressed data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]