Changeset 1778 for trunk/Cbc/src


Ignore:
Timestamp:
May 18, 2012 8:51:08 AM (7 years ago)
Author:
forrest
Message:

change ctrl-c actions

Location:
trunk/Cbc/src
Files:
3 edited

Legend:

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

    r1773 r1778  
    39353935            secondaryStatus_ = 2;
    39363936            status_ = 0 ;
     3937        } else if (eventHappened_) {
     3938            handler_->message(CBC_EVENT, messages_) << CoinMessageEol ;
     3939            secondaryStatus_ = 5;
     3940            status_ = 5 ;
    39373941        } else if (isNodeLimitReached()) {
    39383942            handler_->message(CBC_MAXNODES, messages_) << CoinMessageEol ;
     
    39433947            secondaryStatus_ = 4;
    39443948            status_ = 1 ;
    3945         } else if (eventHappened_) {
    3946             handler_->message(CBC_EVENT, messages_) << CoinMessageEol ;
    3947             secondaryStatus_ = 5;
    3948             status_ = 5 ;
    39493949        } else {
    39503950            handler_->message(CBC_MAXSOLS, messages_) << CoinMessageEol ;
  • trunk/Cbc/src/CbcModel.hpp

    r1769 r1778  
    17351735        return specialOptions_;
    17361736    }
     1737    /// Tell model to stop on event
     1738    inline void sayEventHappened()
     1739    { eventHappened_=true;}
    17371740    /// Says if normal solver i.e. has well defined CoinPackedMatrix
    17381741    inline bool normalSolver() const {
  • trunk/Cbc/src/CbcSolver.cpp

    r1770 r1778  
    831831            currentBranchModel->setMaximumNodes(0); // stop at next node
    832832            currentBranchModel->setMaximumSeconds(0.0); // stop
     833            currentBranchModel->sayEventHappened(); // say why stopped
    833834        }
    834835        return;
Note: See TracChangeset for help on using the changeset viewer.