help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Uniqueness of a solution


From: Marcel Luethi
Subject: [Help-glpk] Uniqueness of a solution
Date: Tue, 26 Oct 2004 08:48:01 +0200

Hi all, 

I am using glpk to solve the following maxmin problem:

maximize dummyobj: u; 
s.t. objective{j in J}: 
        sum{k in I}  p[k,j] * (sum{i in J} w[i] * x[k,i]) >= u;

s.t. errorbound{j in J}: 
        sum{k in I} (p[k,j] * x[k,j]) <= epsilon;

The problem arises when I want to determine whether the obtained
solution is unique. I implemented it as follows:

lpx_simplex(_pPrimal);
// check optimality, ...
...
// uniqueness
bool unique = true;
for (int j = 2; j <= lpx_get_num_cols(_pPrimal); j++) { 
    if (lpx_get_col_stat(_pPrimal, j) != LPX_BS) {
      // 0 is the rhs of the corresponding constraint in the dual
      if (abs(0 - lpx_get_col_dual(_pPrimal, j)) < Constants::eps) { 
        unique = false;
      }
    }
}
(A similar check is also performed for the first column. )

I thought that this would give me the reduced costs of the nonbasic 
variables, and that the solution is unique if all this values are
strictly positive.
However, I have some problem instances, where I know that the 
solution is not unique, but above code still tells me that it is!
Furthermore, solving the LP-Dual with glpsol gives me different
values for the activities. 

Thanks in advance for any suggestions. 

Regards, 

Marcel Luethi






reply via email to

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