Changeset 1831


Ignore:
Timestamp:
Dec 3, 2012 2:50:56 PM (6 years ago)
Author:
stefan
Message:

fix handling of solved solutions: delete solutions in CbcSolver?'s model before setting postprocessed ones; update --numberSavedSolutions_ in CbcModel::delete*Solution*

Location:
stable/2.8/Cbc/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable/2.8/Cbc/src/CbcModel.cpp

    r1815 r1831  
    1513115131        savedSolutions_[i] = NULL;
    1513215132    }
     15133    numberSavedSolutions_ = 0;
    1513315134}
    1513415135// Delete a saved solution and move others up
     
    1514415145    }
    1514515146    savedSolutions_[numberSavedSolutions_]=NULL;
     15147    --numberSavedSolutions_;
    1514615148  }
    1514715149}
  • stable/2.8/Cbc/src/CbcSolver.cpp

    r1829 r1831  
    302302  int numberColumns=presolvedModel->getNumCols();
    303303  if (numberSolutions>1) {
     304    model->deleteSolutions();
    304305    double * bestSolution = CoinCopyOfArray(presolvedModel->bestSolution(),numberColumns);
    305306    //double cutoff = presolvedModel->getCutoff();
Note: See TracChangeset for help on using the changeset viewer.