Ignore:
File:
1 edited

Legend:

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

    r2127 r2101  
    217217  smallObjective_=0.0;
    218218  const double * objective = model_->solver()->getObjCoefficients();
    219   int numberObjects = model_->numberObjects();
    220   for (int i = 0; i < numberObjects; i++) {
     219  for (int i = 0; i < numberIntegers; i++) {
    221220    OsiObject * object = model_->modifiableObject(i);
    222221    const CbcSimpleInteger * thisOne = dynamic_cast <const CbcSimpleInteger *> (object);
    223     if (!thisOne)
    224       continue; // Not integer
     222    assert (thisOne);
    225223    int iColumn = thisOne->columnNumber();
    226224    smallObjective_ += objective[iColumn];
     
    234232  if (gotPriorities || priority1>priority2) {
    235233    priority_ = new PriorityType [numberIntegers];
    236     for (int i = 0; i < numberObjects; i++) {
     234    for (int i = 0; i < numberIntegers; i++) {
    237235      OsiObject * object = model_->modifiableObject(i);
    238236      const CbcSimpleInteger * thisOne = dynamic_cast <const CbcSimpleInteger *> (object);
    239       if (!thisOne)
    240         continue; // Not integer
    241237      int level=thisOne->priority()-priority2;
    242238      assert (level<(1<<29));
Note: See TracChangeset for help on using the changeset viewer.