[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] How to analyze which constraint (or combination of cons
Re: [Help-glpk] How to analyze which constraint (or combination of constraints) is causing the model to become unsolvable?
Wed, 14 Jan 2009 13:24:27 -0800
Great idea Ali - Thanks.
Would the following work :
*) Create companion binary variables to the xp,xn debugging variables, called bxp,bxn.
*) Each companion variable denotes whether the original debugging variables are bigger than zero.
*) Try to minimize the sum of bxp + bxn.
That way , we would get the smallest subset of violating constraints, which might help ease debugging.
Do you think that makes sense?
On Wed, Jan 14, 2009 at 1:07 PM, Ali Baharev <address@hidden>
I am afraid it is ambiguous which constraints are causing the trouble.
You could probably try the following. Introduce two new continuous
variables xp >= 0 and xn >= 0 to each constraint. For example:
x1 + 2 x2 = 3
after introducing the variables
x1 + 2 x2 + (xp - xn) = 3
and change the objective function:
minimize: sum xp + sum xn
This problem must have a solution. For those constraints which are
violated the corresponding xp or xn will not equal zero. Unfortunately
it may turn out that all constraints are violated... If you are lucky
there will be only a few constraints with non-zero xp and xn