help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Re: MIP Solutions


From: Thomas Pfau
Subject: Re: [Help-glpk] Re: MIP Solutions
Date: Thu, 2 Dec 2010 11:03:08 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Fedora/3.1.6-1.fc13 Thunderbird/3.1.6

First of all, thanks for the reply

It works fine now :)

Thomas




On 12/01/2010 10:56 PM, Andrew Makhorin wrote:
On Wed, 2010-12-01 at 17:50 +0000, Thomas Pfau wrote:
Hello,

I got a Problem here while trying to implement an algorithm using a MIP.
I need to iteratively add constraints to a problem. I.e. in each
iteration an additional constraint is added and the problem is recomputed.
Does this mean that you add constraints with glp_add_rows and then call
glp_intopt again and again?

I do not know if this causes my problem but glp_intopt solvers the
problem returning a Solution where one of the constraints is violated.
Printing out the solution also shows this (i.e. in the solution file
under KKT.PE there is a statement, that the solution is wrong).
This may happen due to insufficient accuracy, as a rule, if your mip
instance is badly scaled or ill-conditioned, for example, because of too
"big M" used.

However, I know that there are still feasible correct solutions to the
problem. Would I need to reset the whole problem each time and construct
it again
No, it is not needed.

  (this would be kind of bad since I would have to keep track of
the additional constraints added in each iteration, which would
otherwise just be stored in the problem), and if not, how can I detect
if the result returned in fact is violating a constraint (since the only
place I find where this is mentioned is in the KKT.PE statement), and
how can I tell the algorithm to restart/keep searching for a correct
solution.
You may try to decrease the integer tolerance. By default it is 1e-5.

In addition:
Could someone please tell me how to use the glp_init_iocp() function?
When I tried something like this:

glp_iocp* param;
glp_init_iocp(glp_iocp);

It lead to a segfault in the program (the seqfault did not occur in the
glp_init_iocp() function but later on in my program, but I think I
tracked the misallocation to be happening somewhere in the
glp_init_iocp() function).
You should allocate the glp_iocp structure in your program like follows:

glp_iocp parm;
glp_init_iocp(&parm);

Please see examples in the glpk reference manual.



_______________________________________________
Help-glpk mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-glpk


--
Dipl.-Inf. Thomas Pfau         address@hidden
Institute for Complex Systems and Mathematical Biology
University of Aberdeen
Meston Building, Room 303         Phone : ++44 1224 27-2907
Aberdeen AB24 3UE
United Kingdom



The University of Aberdeen is a charity registered in Scotland, No SC013683.



reply via email to

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