src/work/athos/lp/lp_cplex.cc
changeset 1354 5cb32ce3236a
parent 1319 6e277ba3fc76
child 1359 1581f961cfaa
equal deleted inserted replaced
2:2189c8cbda17 3:d77e52ee0dec
   107   }
   107   }
   108   
   108   
   109   void LpCplex::_setRowUpperBound(int i, Value value)
   109   void LpCplex::_setRowUpperBound(int i, Value value)
   110   {
   110   {
   111     //TODO Ezt kell meg megirni
   111     //TODO Ezt kell meg megirni
   112     //    Value lo=CPX
   112     //type of the problem
       
   113     char sense[1];
       
   114     status = CPXgetsense (env, lp, sense, i, i);
       
   115     Value rhs[1];
       
   116     status = CPXgetrhs (env, lp, rhs, i, i);
       
   117 
       
   118     switch (sense[0]) {
       
   119     case 'L'://<= constraint
       
   120       break;
       
   121     case 'E'://= constraint
       
   122       break;
       
   123     case 'G'://>= constraint
       
   124       break;
       
   125     case 'R'://ranged constraint
       
   126       break;
       
   127     default: ;
       
   128       //FIXME error
       
   129     }
       
   130 
       
   131     status = CPXchgcoef (env, lp, i, -2, value_rng);
   113   }
   132   }
   114   
   133   
   115   void LpCplex::_setObjCoeff(int i, Value obj_coef)
   134   void LpCplex::_setObjCoeff(int i, Value obj_coef)
   116   {
   135   {
   117     status = CPXchgcoef (env, lp, -1, i, obj_coef);
   136     status = CPXchgcoef (env, lp, -1, i, obj_coef);