COIN-OR::LEMON - Graph Library

Changeset 2328:b4931ae52069 in lemon-0.x for test


Ignore:
Timestamp:
12/07/06 17:10:54 (17 years ago)
Author:
athos
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3104
Message:

Query functions have been implemented for GLPK (CPLEX breaks at the moment, I guess): These functions include:
retrieving one element of the coeff. matrix
retrieving one element of the obj function
lower bd for a variable
upper bound for a variable
lower and upper bounds for a row (these can not be handled separately at the moment)
direction of the optimization (is_max() function)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/lp_test.cc

    r2325 r2328  
    298298  check(lp.objCoeff(x1)==1,"First term should be 1 in the obj function!");
    299299  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.");
    301308
    302309
Note: See TracChangeset for help on using the changeset viewer.