help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Newbie - Having trouble with superfluous slack variables


From: Andrew Makhorin
Subject: Re: [Help-glpk] Newbie - Having trouble with superfluous slack variables?
Date: Thu, 8 Aug 2002 18:32:31 +0400

>In my problem (which is an MIP problem), I encounter a situation like this:
>for all i in some Set, a linear inequality must hold, where the left hand
>side is a sum over "some" structural variables.
>The actual variables that appear in this sum vary greatly depending on
>several input constants to the problem, and the index variable used in the
>sum ranges not between two constants but between the max of several values
>and the minimum of several other values.

Hmm... As I understand your problem includes inequalities like

    sum     x[j] <= b[k],
  j in J[k]

where J[k] are some index sets. Could you give more detailed description
of your problem?

>So I wrote a C program that translates these equalities into rows of the
>constraint matrix (introducing  a new slack variable for each inequality).

You needn't to explicitly introduce slack variables, because such
variables are introduced automatically for each inequality constraint
(in glpk documentation these variables are called auxiliary). So, it's
better to keep all inequality constraints as is, not transforming them
to equalities.

>However, beacuse the index variable in the sum does not range over the same
>fixed set for each inequality, it happens that , for two different values
of
>the parameter i mentioned above, two inequalities become equivalent.
>So I get two equivalent rows in the constraint matrix...

This is normal. You needn't to worry about linearly dependent constraints
as well as about identical ones (the latter is a particular case of linear
dependence).

>Maybe it's me, but I haven't been able to solve even the simplest problem
>which contains said equivalence between two rows of the constraint matrix.
>
>(e.g. minimize z where x1 = z >= 1 and x2 = z >= 1 ends with "PROBLEM HAS
NO
>FEASIBLE SOLUTION" when I call lpx_simplex()

Probably you made some mistake on preparing data for your problem.
Did you try looking at the example in the reference manual?






reply via email to

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