Changeset 1724


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

more control over message handling in mini bab

Location:
stable/2.7/Cbc/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable/2.7/Cbc/src/CbcHeuristic.cpp

    r1675 r1724  
    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();
  • stable/2.7/Cbc/src/CbcModel.cpp

    r1716 r1724  
    1204712047    delete eventHandler_;
    1204812048    eventHandler_ = NULL ;
    12049     if (eventHandler)
     12049    if (eventHandler) {
    1205012050        eventHandler_ = eventHandler->clone();
     12051        eventHandler_->setModel(this);
     12052    }
    1205112053}
    1205212054
  • stable/2.7/Cbc/src/CbcModel.hpp

    r1711 r1724  
    17181718        18 bit (262144) - donor CbcModel
    17191719        19 bit (524288) - recipient CbcModel
     1720        20 bit (1048576) - waiting for sub model to return
    17201721    */
    17211722    inline void setSpecialOptions(int value) {
     
    17291730    inline bool normalSolver() const {
    17301731        return (specialOptions_&16) == 0;
     1732    }
     1733    /** Says if model is sitting there waiting for mini branch and bound to finish
     1734        This is because an event handler may only have access to parent model in
     1735        mini branch and bound
     1736    */
     1737    inline bool waitingForMiniBranchAndBound() const {
     1738        return (specialOptions_&1048576) != 0;
    17311739    }
    17321740    /** Set more special options
Note: See TracChangeset for help on using the changeset viewer.