test/lp_test.cc
changeset 2335 27aa03cd3121
parent 2325 d6ec469aa019
child 2345 bfcaad2b84e8
equal deleted inserted replaced
16:b794d60d65ac 17:35124c1cd75d
   295 
   295 
   296 
   296 
   297   //Testing the problem retrieving routines
   297   //Testing the problem retrieving routines
   298   check(lp.objCoeff(x1)==1,"First term should be 1 in the obj function!");
   298   check(lp.objCoeff(x1)==1,"First term should be 1 in the obj function!");
   299   check(lp.is_max(),"This is a maximization!");
   299   check(lp.is_max(),"This is a maximization!");
   300   check(lp.coeff(upright,x1)==0,"The coefficient in question is 1!");
   300   check(lp.coeff(upright,x1)==1,"The coefficient in question is 1!");
       
   301   //  std::cout<<lp.colLowerBound(x1)<<std::endl;
       
   302   check(  lp.colLowerBound(x1)==0,"The lower bound for variable x1 should be 0.");
       
   303   check(  lp.colUpperBound(x1)==LpSolverBase::INF,"The upper bound for variable x1 should be infty.");
       
   304   LpSolverBase::Value lb,ub;
       
   305   lp.getRowBounds(upright,lb,ub);
       
   306   check(  lb==-LpSolverBase::INF,"The lower bound for the first row should be -infty.");
       
   307   check(  ub==1,"The upper bound for the first row should be 1.");
   301 
   308 
   302 
   309 
   303   //Maximization of x1+x2
   310   //Maximization of x1+x2
   304   //over the triangle with vertices (0,0) (0,1) (1,0)
   311   //over the triangle with vertices (0,0) (0,1) (1,0)
   305   double expected_opt=1;
   312   double expected_opt=1;