Changeset 2550


Ignore:
Timestamp:
Apr 21, 2019 11:46:32 PM (6 months ago)
Author:
stefan
Message:

sync with trunk r2548

Location:
stable/2.10
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • stable/2.10

  • stable/2.10/Cbc

  • stable/2.10/Cbc/src

  • stable/2.10/Cbc/src/CbcLinked.cpp

    r2534 r2550  
    229229        bestSolution_ = CoinCopyOfArray(qpTemp.primalColumnSolution(), numberColumns);
    230230        bestObjectiveValue_ = qpTemp.objectiveValue();
    231         printf("better qp objective of %g\n", bestObjectiveValue_);
     231        //printf("better qp objective of %g\n", bestObjectiveValue_);
    232232        // If model has stored then add cut (if convex)
    233233        if (cbcModel_ && (specialOptions2_ & 4) != 0) {
     
    289289    }
    290290  }
     291  int saveLogLevel=modelPtr_->logLevel();
     292  if (saveLogLevel==1)
     293    modelPtr_->setLogLevel(0);
    291294  specialOptions_ = 0;
    292295  modelPtr_->setWhatsChanged(0);
     
    441444        }
    442445        if (value < bestObjectiveValue_ - 1.0e-3) {
    443           printf("obj of %g\n", value);
     446          // printf("obj of %g\n", value);
    444447          //modelPtr_->setDualObjectiveLimit(value);
    445448          delete[] bestSolution_;
     
    676679                qpTemp.setLogLevel(modelPtr_->logLevel());
    677680                qpTemp.primal();
    678                 assert(!qpTemp.problemStatus());
     681                // assert(!qpTemp.problemStatus());
    679682                if (qpTemp.objectiveValue() < bestObjectiveValue_ - 1.0e-3 && !qpTemp.problemStatus()) {
    680683                  solution2 = CoinCopyOfArray(qpTemp.primalColumnSolution(), numberColumns);
    681684                } else {
    682                   printf("QP says expensive - kill\n");
     685                  // printf("QP says expensive - kill\n");
    683686                  modelPtr_->setProblemStatus(1);
    684687                  modelPtr_->setObjectiveValue(COIN_DBL_MAX);
     
    787790    modelPtr_->setObjectiveValue(COIN_DBL_MAX);
    788791  }
     792  modelPtr_->setLogLevel(saveLogLevel);
    789793}
    790794// Do OA cuts
     
    72167220        bestSolution_ = CoinCopyOfArray(qpTemp.primalColumnSolution(), numberColumns);
    72177221        bestObjectiveValue_ = qpTemp.objectiveValue();
    7218         printf("better qp objective of %g\n", bestObjectiveValue_);
     7222        //printf("better qp objective of %g\n", bestObjectiveValue_);
    72197223      }
    72207224    }
  • stable/2.10/Cbc/src/CbcModel.cpp

    r2545 r2550  
    39723972          newNode->nodeInfo()->nullParent();
    39733973      }
    3974       delete newNode;
     3974      deleteNode(newNode);
    39753975      newNode = NULL;
    39763976      feasible = false;
     
    52805280      bestObjective_ += 100.0 * increment + 1.0e-3; // only set if we are going to solve
    52815281    setBestSolution(CBC_END_SOLUTION, bestObjective_, bestSolution_, 1);
     5282    currentNode_ = NULL;
    52825283    continuousSolver_->resolve();
    52835284    // Deal with funny variables
     
    58435844  appData_ = NULL;
    58445845  solver_ = rhs.clone();
     5846  ownership_ |= 0x80000000; // model now owns solver
    58455847  handler_ = new CoinMessageHandler();
    58465848  if (!solver_->defaultHandler() && solver_->messageHandler()->logLevel(0) != -1000)
     
    1721617218        if (!node->nodeInfo()->numberBranchesLeft())
    1721717219          node->nodeInfo()->allBranchesGone(); // can clean up
    17218         delete node;
     17220        deleteNode(node);
    1721917221        node = NULL;
    1722017222      } else {
     
    1953119533  return originalModel;
    1953219534}
    19533 
    19534 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
    19535 */
     19535// Delete a node and possibly null out currentNode_
     19536void
     19537CbcModel::deleteNode(CbcNode * node)
     19538{
     19539  delete node;
     19540  if (node==currentNode_)
     19541    currentNode_ = NULL;
     19542}
     19543
  • stable/2.10/Cbc/src/CbcModel.hpp

    r2534 r2550  
    25672567    return currentNode_;
    25682568  }
     2569  /// Delete a node and possibly null out currentNode_
     2570  void deleteNode(CbcNode * node);
    25692571  /// Get a pointer to probing info
    25702572  inline CglTreeProbingInfo *probingInfo() const
  • stable/2.10/Cbc/src/CbcSolver.cpp

    r2545 r2550  
    1056010560      }
    1056110561    }
     10562    delete coinModel;
    1056210563  }
    1056310564#if CBC_QUIET == 0
  • stable/2.10/Cbc/src/CbcTree.cpp

    r2467 r2550  
    652652    if (node->nodeInfo())
    653653      node->nodeInfo()->throwAway();
    654     delete node;
     654    model->deleteNode(node);
    655655    delete lastws;
    656656  }
  • stable/2.10/README.md

    r2545 r2550  
    146146
    147147## CHANGELOG
     148
     149 * Release 2.10.2
     150   * Bugfixes
    148151
    149152 * Release 2.10.1
Note: See TracChangeset for help on using the changeset viewer.