Ignore:
Timestamp:
Oct 8, 2006 7:33:47 PM (13 years ago)
Author:
forrest
Message:

towards common use with other solvers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devel/Cbc/src/CbcHeuristicLocal.cpp

    r356 r439  
    121121  for (i=0;i<numberIntegers;i++) {
    122122    int iColumn=integerVariable[i];
    123     const CbcObject * object = model_->object(i);
    124     const CbcSimpleInteger * integerObject =
    125       dynamic_cast<const  CbcSimpleInteger *> (object);
    126     assert(integerObject);
     123    const OsiObject * object = model_->object(i);
    127124    // get original bounds
    128     double originalLower = integerObject->originalLowerBound();
     125    double originalLower;
     126    double originalUpper;
     127    getIntegerInformation( object,originalLower, originalUpper);
    129128    newSolver->setColLower(iColumn,CoinMax(colLower[iColumn],originalLower));
    130129    if (!used_[iColumn]) {
     
    200199  for (i=0;i<numberIntegers;i++) {
    201200    int iColumn = integerVariable[i];
    202     const CbcObject * object = model_->object(i);
    203     const CbcSimpleInteger * integerObject =
    204       dynamic_cast<const  CbcSimpleInteger *> (object);
    205     assert(integerObject);
     201    const OsiObject * object = model_->object(i);
    206202    // get original bounds
    207     double originalLower = integerObject->originalLowerBound();
    208     double originalUpper = integerObject->originalUpperBound();
    209 
     203    double originalLower;
     204    double originalUpper;
     205    getIntegerInformation( object,originalLower, originalUpper);
    210206    double value=newSolution[iColumn];
    211207    if (value<originalLower) {
     
    463459        newSolution[kColumn] += wayK;
    464460        // See if k can go further ?
    465         const CbcObject * object = model_->object(goodK);
    466         const CbcSimpleInteger * integerObject =
    467           dynamic_cast<const  CbcSimpleInteger *> (object);
     461        const OsiObject * object = model_->object(goodK);
    468462        // get original bounds
    469         double originalLower = integerObject->originalLowerBound();
    470         double originalUpper = integerObject->originalUpperBound();
     463        double originalLower;
     464        double originalUpper;
     465        getIntegerInformation( object,originalLower, originalUpper);
    471466       
    472467        double value=newSolution[kColumn];
     
    512507        for (i=0;i<numberIntegers;i++) {
    513508          int iColumn = integerVariable[i];
    514           const CbcObject * object = model_->object(i);
    515           const CbcSimpleInteger * integerObject =
    516             dynamic_cast<const  CbcSimpleInteger *> (object);
     509          const OsiObject * object = model_->object(i);
    517510          // get original bounds
    518           double originalLower = integerObject->originalLowerBound();
    519           //double originalUpper = integerObject->originalUpperBound();
     511          double originalLower;
     512          double originalUpper;
     513          getIntegerInformation( object,originalLower, originalUpper);
    520514         
    521515          double value=newSolution[iColumn];
Note: See TracChangeset for help on using the changeset viewer.