src/work/athos/lp/lp_cplex.cc
changeset 1339 26a88d12d1a6
parent 1319 6e277ba3fc76
child 1359 1581f961cfaa
     1.1 --- a/src/work/athos/lp/lp_cplex.cc	Mon Apr 11 14:26:35 2005 +0000
     1.2 +++ b/src/work/athos/lp/lp_cplex.cc	Mon Apr 11 15:46:14 2005 +0000
     1.3 @@ -109,7 +109,26 @@
     1.4    void LpCplex::_setRowUpperBound(int i, Value value)
     1.5    {
     1.6      //TODO Ezt kell meg megirni
     1.7 -    //    Value lo=CPX
     1.8 +    //type of the problem
     1.9 +    char sense[1];
    1.10 +    status = CPXgetsense (env, lp, sense, i, i);
    1.11 +    Value rhs[1];
    1.12 +    status = CPXgetrhs (env, lp, rhs, i, i);
    1.13 +
    1.14 +    switch (sense[0]) {
    1.15 +    case 'L'://<= constraint
    1.16 +      break;
    1.17 +    case 'E'://= constraint
    1.18 +      break;
    1.19 +    case 'G'://>= constraint
    1.20 +      break;
    1.21 +    case 'R'://ranged constraint
    1.22 +      break;
    1.23 +    default: ;
    1.24 +      //FIXME error
    1.25 +    }
    1.26 +
    1.27 +    status = CPXchgcoef (env, lp, i, -2, value_rng);
    1.28    }
    1.29    
    1.30    void LpCplex::_setObjCoeff(int i, Value obj_coef)