Changeset 1725 for trunk/Cbc


Ignore:
Timestamp:
Sep 12, 2011 3:43:22 AM (8 years ago)
Author:
forrest
Message:

more control over message handling

Location:
trunk/Cbc/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcHeuristic.cpp

    r1641 r1725  
    11761176#endif
    11771177                    model.passInEventHandler(model_->getEventHandler());
     1178                    // say model_ is sitting there
     1179                    int saveOptions = model_->specialOptions();
     1180                    model_->setSpecialOptions(saveOptions|1048576);
    11781181                    model.branchAndBound();
     1182                    model_->setSpecialOptions(saveOptions);
    11791183#ifdef ALWAYS_DUAL
    11801184                    solver = model.solver();
  • trunk/Cbc/src/CbcModel.cpp

    r1717 r1725  
    1203512035    delete eventHandler_;
    1203612036    eventHandler_ = NULL ;
    12037     if (eventHandler)
     12037    if (eventHandler) {
    1203812038        eventHandler_ = eventHandler->clone();
     12039        eventHandler_->setModel(this);
     12040    }
    1203912041}
    1204012042
  • trunk/Cbc/src/CbcModel.hpp

    r1717 r1725  
    17201720        18 bit (262144) - donor CbcModel
    17211721        19 bit (524288) - recipient CbcModel
     1722        20 bit (1048576) - waiting for sub model to return
    17221723    */
    17231724    inline void setSpecialOptions(int value) {
     
    17311732    inline bool normalSolver() const {
    17321733        return (specialOptions_&16) == 0;
     1734    }
     1735    /** Says if model is sitting there waiting for mini branch and bound to finish
     1736        This is because an event handler may only have access to parent model in
     1737        mini branch and bound
     1738    */
     1739    inline bool waitingForMiniBranchAndBound() const {
     1740        return (specialOptions_&1048576) != 0;
    17331741    }
    17341742    /** Set more special options
Note: See TracChangeset for help on using the changeset viewer.