Ignore:
Timestamp:
Mar 29, 2005 10:30:16 AM (16 years ago)
Author:
forrest
Message:

fix stupid error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Samples/sample2.cpp

    r92 r93  
    291291  if (model.getMinimizationObjValue()<1.0e50) {
    292292    // post process
    293     if (preProcess)
     293    OsiSolverInterface * solver;
     294    if (preProcess) {
    294295      process.postProcess(*model.solver());
    295     // Solution now back in solver1
    296     int numberColumns = solver1.getNumCols();
     296      // Solution now back in solver1
     297      solver = & solver1;
     298    } else {
     299      solver = model.solver();
     300    }
     301    int numberColumns = solver->getNumCols();
    297302   
    298     const double * solution = solver1.getColSolution();
     303    const double * solution = solver->getColSolution();
    299304   
    300305    int iColumn;
     
    304309    for (iColumn=0;iColumn<numberColumns;iColumn++) {
    305310      double value=solution[iColumn];
    306       if (fabs(value)>1.0e-7&&solver1.isInteger(iColumn))
     311      if (fabs(value)>1.0e-7&&solver->isInteger(iColumn))
    307312        std::cout<<std::setw(6)<<iColumn<<" "<<value<<std::endl;
    308313    }
Note: See TracChangeset for help on using the changeset viewer.