help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] intermediary results


From: Andrew Makhorin
Subject: Re: [Help-glpk] intermediary results
Date: Mon, 31 Oct 2005 19:44:07 +0300

> I would like to ask whether it is possible to get the value of
> intermediary results when solving a MIP problem.  I tried to set a time
> limit, then call lpx_integer(), and then if LPX_E_TMLIM is returned,
> calling lpx_integer() again, and so forth.  Unfortunately, on the second
> run the lower and upper bounds found before are not displayed again, and
> the loop never terminates.
> 
> Should this even be possible?  If not, how can one get intermediary
> results?  Of course there's always the solution of first setting the
> time limit to 1s, reading the results, then resetting the problem and
> restarting it with a higher time limit.  But this would not use
> solutions found before.
> 
> Output is like this:
> Integer optimization begins...
> +    97: mip =     not found yet <=              +inf        (1; 0)
> +   222: mip =   9.628084001e+02 <=   1.269580305e+03  31.9% (28; 0)
> +   237: mip =   1.032392867e+03 <=   1.269580305e+03  23.0% (29; 1)
> +   502: mip =   1.032392867e+03 <=   1.253445807e+03  21.4% (38; 43)
> TIME LIMIT EXCEEDED; SEARCH TERMINATED
> Integer optimization begins...
> +   502: mip =     not found yet <=              +inf        (1; 0)
> TIME LIMIT EXCEEDED; SEARCH TERMINATED
> Integer optimization begins...
> +   502: mip =     not found yet <=              +inf        (1; 0)
> TIME LIMIT EXCEEDED; SEARCH TERMINATED

This happens because the b&b solver spent the time limit and you did
not provide a new time limit quantity by setting LPX_K_TMLIM.

However, this way will not help, because the b&b solver starts the
search from the beginning, i.e. the search tree is destroyed on exit
from the solver. You can obtain an intermediate mip solution by
adding your own code in the routine record_solution (see file
glpmip2.c) which is called whenever a better mip solution has been
detected.






reply via email to

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