Changeset 1449


Ignore:
Timestamp:
May 19, 2010 4:47:09 AM (9 years ago)
Author:
forrest
Message:

small change for BonMin?

File:
1 edited

Legend:

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

    r1408 r1449  
    71217121            ||generator_[i]->switchedOff())
    71227122          generate=false;
    7123         if (switchOff) {
     7123        if (switchOff&&!generator_[i]->mustCallAgain()) {
    71247124          // switch off if default
    71257125          if (generator_[i]->howOften()==1&&generator_[i]->whatDepth()<0) {
     
    80918091      }
    80928092      numberTries = 0 ;
     8093      keepGoing=false;
    80938094    }
    80948095  } while (numberTries>0||keepGoing) ;
     
    1247612477      //std::cout<<solver_<<std::endl;
    1247712478      resolve(solver_);
     12479      int saveNumberRows=solver_->getNumRows();
    1247812480      double objval = solver_->getObjValue();
    1247912481      lastHeuristic_ = NULL;
     
    1249412496        feasible=false; // pretend infeasible
    1249512497      }
    12496       if(feasible)
     12498      if( saveNumberRows<solver_->getNumRows()) {
     12499        // delete rows - but leave solution
     12500        int n = solver_->getNumRows();
     12501        int * del = new int [n-saveNumberRows];
     12502        for (int i=saveNumberRows;i<n;i++)
     12503          del[i-saveNumberRows]=i;
     12504        solver_->deleteRows(n-saveNumberRows,del);
     12505        delete [] del;
     12506      }
     12507      if(feasible) {
    1249712508        anyAction = -1;
    12498       else
     12509      } else {
    1249912510        anyAction = -2;
     12511      }
    1250012512    }
    1250112513    /*
Note: See TracChangeset for help on using the changeset viewer.