Changeset 1017 for stable


Ignore:
Timestamp:
Jul 21, 2008 12:13:43 PM (11 years ago)
Author:
forrest
Message:

fix bug when threaded

File:
1 edited

Legend:

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

    r1004 r1017  
    41164116    walkback_ = NULL;
    41174117  synchronizeModel();
    4118   if (cloneHandler) {
     4118  if (cloneHandler&&!defaultHandler_) {
    41194119    delete handler_;
    41204120    CoinMessageHandler * handler = rhs.handler_->clone();
     
    48104810  the reference isn't clear to me).
    48114811*/
    4812   solver_->restoreBaseModel(numberRowsAtContinuous_);
    4813 #if 0
    4814   int currentNumberCuts = solver_->getNumRows()-numberRowsAtContinuous_;
    4815   int *which = new int[currentNumberCuts];
    4816   for (i = 0 ; i < currentNumberCuts ; i++)
    4817     which[i] = i+numberRowsAtContinuous_;
    4818   solver_->deleteRows(currentNumberCuts,which);
    4819   delete [] which;
    4820 #endif
     4812  if (numberThreads_<=0) {
     4813    solver_->restoreBaseModel(numberRowsAtContinuous_);
     4814  } else {
     4815    // *** Fix later
     4816    int numberCuts = solver_->getNumRows()-numberRowsAtContinuous_;
     4817    int *which = new int[numberCuts];
     4818    for (i = 0 ; i < numberCuts ; i++)
     4819      which[i] = i+numberRowsAtContinuous_;
     4820    solver_->deleteRows(numberCuts,which);
     4821    delete [] which;
     4822  }
    48214823/*
    48224824  Accumulate the path from node to the root in walkback_, and accumulate a
Note: See TracChangeset for help on using the changeset viewer.