src/lemon/lp_glpk.cc
changeset 1383 79b68a337f9f
parent 1377 bfbb5b30c5b8
child 1405 3626c7f10f14
equal deleted inserted replaced
9:0628c58b0426 10:a59473b62824
   257 	break;
   257 	break;
   258       default: ;
   258       default: ;
   259 	//FIXME error
   259 	//FIXME error
   260       }
   260       }
   261     }
   261     }
       
   262   }
       
   263 
       
   264   void LpGlpk::_setRowBounds(int i, Value lb, Value ub)
       
   265   {
       
   266     //Bad parameter
       
   267     if (lb==INF || ub==-INF) {
       
   268       //FIXME error
       
   269     }
       
   270 
       
   271     if (lb == -INF){
       
   272       if (ub == INF){
       
   273 	lpx_set_row_bnds(lp, i, LPX_FR, lb, ub);
       
   274       }
       
   275       else{
       
   276 	lpx_set_row_bnds(lp, i, LPX_UP, lb, ub);
       
   277       }
       
   278     }
       
   279     else{
       
   280       if (ub==INF){
       
   281 	lpx_set_row_bnds(lp, i, LPX_LO, lb, ub);
       
   282 
       
   283       }
       
   284       else{
       
   285 	if (lb == ub){
       
   286 	  lpx_set_row_bnds(lp, i, LPX_FX, lb, ub);
       
   287 	}
       
   288 	else{
       
   289 	  lpx_set_row_bnds(lp, i, LPX_DB, lb, ub);
       
   290 	}
       
   291       }
       
   292     }
       
   293 
   262   }
   294   }
   263   
   295   
   264   void LpGlpk::_setObjCoeff(int i, Value obj_coef)
   296   void LpGlpk::_setObjCoeff(int i, Value obj_coef)
   265   {
   297   {
   266     //i=0 means the constant term (shift)
   298     //i=0 means the constant term (shift)