Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/2.9/Cbc/src/CbcHeuristicDive.cpp

    r2101 r2127  
    217217  smallObjective_=0.0;
    218218  const double * objective = model_->solver()->getObjCoefficients();
    219   for (int i = 0; i < numberIntegers; i++) {
     219  int numberObjects = model_->numberObjects();
     220  for (int i = 0; i < numberObjects; i++) {
    220221    OsiObject * object = model_->modifiableObject(i);
    221222    const CbcSimpleInteger * thisOne = dynamic_cast <const CbcSimpleInteger *> (object);
    222     assert (thisOne);
     223    if (!thisOne)
     224      continue; // Not integer
    223225    int iColumn = thisOne->columnNumber();
    224226    smallObjective_ += objective[iColumn];
     
    232234  if (gotPriorities || priority1>priority2) {
    233235    priority_ = new PriorityType [numberIntegers];
    234     for (int i = 0; i < numberIntegers; i++) {
     236    for (int i = 0; i < numberObjects; i++) {
    235237      OsiObject * object = model_->modifiableObject(i);
    236238      const CbcSimpleInteger * thisOne = dynamic_cast <const CbcSimpleInteger *> (object);
     239      if (!thisOne)
     240        continue; // Not integer
    237241      int level=thisOne->priority()-priority2;
    238242      assert (level<(1<<29));
Note: See TracChangeset for help on using the changeset viewer.