Ignore:
Timestamp:
Sep 21, 2007 1:57:32 PM (12 years ago)
Author:
forrest
Message:

fix bug for Stefano Gliozzi

File:
1 edited

Legend:

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

    r584 r787  
    56155615*/
    56165616double
    5617 CbcModel::checkSolution (double cutoff, const double *solution,
     5617CbcModel::checkSolution (double cutoff, double *solution,
    56185618                         bool fixVariables, double objectiveValue)
    56195619
     
    57165716    */
    57175717    if ((solver_->isProvenOptimal()||(specialOptions_&4)!=0) && objectiveValue <= cutoff) {
    5718       double * solution = new double[numberColumns];
    57195718      memcpy(solution ,solver_->getColSolution(),numberColumns*sizeof(double)) ;
    57205719     
     
    57545753        delete [] rowActivity ;
    57555754      }
    5756       delete [] solution;
    57575755    } else {
    57585756      objectiveValue=1.0e50 ;
     
    59095907void
    59105908CbcModel::setBestSolution (CBC_Message how,
    5911                            double & objectiveValue, const double *solution,
     5909                           double & objectiveValue, const double *solutionIn,
    59125910                           bool fixVariables)
    59135911
    59145912{
     5913  double * solution=CoinCopyOfArray(solutionIn,solver_->getNumCols());
    59155914  if (!solverCharacteristics_->solutionAddsCuts()) {
    59165915    // Can trust solution
     
    61126111    delete [] candidate;
    61136112  }
     6113  delete [] solution;
    61146114  return ;
    61156115}
Note: See TracChangeset for help on using the changeset viewer.