Changeset 1989


Ignore:
Timestamp:
Jun 4, 2012 8:04:30 AM (7 years ago)
Author:
pbonami
Message:

Fix unitTest to work with the methods that relax rhs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Bonmin/test/InterfaceTest.cpp

    r1846 r1989  
    191191void testOa(Bonmin::OsiTMINLPInterface &si)
    192192{
    193         CoinRelFltEq eq(1e-07);// to test equality of doubles   
    194     OsiClpSolverInterface lp;
    195     si.extractLinearRelaxation(lp);
     193      CoinRelFltEq eq(1e-07);// to test equality of doubles   
     194      OsiClpSolverInterface lp;
     195      si.extractLinearRelaxation(lp);
     196
     197      //get tolerances
     198      double tiny, very_tiny, rhs_relax, infty;
     199      si.get_tolerances(tiny, very_tiny, rhs_relax, infty);
     200
    196201//    lp.writeMps("toy");
    197      MyAssert(lp.getNumCols()==4);
     202      MyAssert(lp.getNumCols()==4);
    198203      MyAssert(lp.getNumRows()==3);
    199204      //Check bounds on columns
     
    223228                 <<error<<std::endl;
    224229      }
    225       DblEqAssert(rowUp[1], 0.);
    226       DblEqAssert(rowUp[2], 2.);
     230      DblEqAssert(rowUp[1], 0. + rhs_relax);
     231      DblEqAssert(rowUp[2], 2. * (1 + rhs_relax));
    227232      //DblEqAssert(rowUp[3], 0.);
    228233     
Note: See TracChangeset for help on using the changeset viewer.