Ignore:
Timestamp:
Jul 16, 2007 4:20:32 PM (13 years ago)
Author:
forrest
Message:

changes so OsiIntegers? have pseudocosts updated on branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcModel.cpp

    r687 r692  
    44954495      addUpdateInformation(update);
    44964496    } else {
    4497       branchingMethod_->updateInformation(solver_,node);
     4497      OsiTwoWayBranchingObject * obj = dynamic_cast<OsiTwoWayBranchingObject *> (bobj);
     4498      if (obj) {
     4499        const OsiObject * object = obj->originalObject();
     4500        // have to compute object number as not saved
     4501        int iObject;
     4502        int iColumn = object->columnNumber();
     4503        for (iObject = 0 ; iObject < numberObjects_ ; iObject++) {
     4504          if (object_[iColumn]->columnNumber()==iColumn)
     4505            break;
     4506        }
     4507        assert (iObject<numberObjects_);
     4508        int branch = obj->firstBranch();
     4509        if (obj->branchIndex()==2)
     4510          branch = 1-branch;
     4511        assert (branch==0||branch==1);
     4512        double originalValue=node->objectiveValue();
     4513        double objectiveValue = solver_->getObjValue()*solver_->getObjSense();
     4514        double changeInObjective = CoinMax(0.0,objectiveValue-originalValue);
     4515        int iStatus = (feasible) ? 0 : 0;
     4516        double value = obj->value();
     4517        if (branch)
     4518          value = ceil(value)-value;
     4519        else
     4520          value = value -floor(value);
     4521        branchingMethod_->chooseMethod()->updateInformation(iObject,branch,changeInObjective,
     4522                                                            value,iStatus);
     4523      }
    44984524    }
    44994525  }
Note: See TracChangeset for help on using the changeset viewer.