Changeset 1783


Ignore:
Timestamp:
Jun 6, 2012 9:33:48 AM (7 years ago)
Author:
stefan
Message:

do not confuse timelimitreached with user interrupt event

File:
1 edited

Legend:

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

    r1781 r1783  
    39393939        }
    39403940        delete nextRowCut_;
     3941        /* order is important here:
     3942         * maximumSecondsReached() should be checked before eventHappened_ and
     3943         * isNodeLimitReached() should be checked after eventHappened_
     3944         * reason is, that at timelimit, eventHappened_ is set to true to make Cbc stop fast
     3945         *   and if Ctrl+C is hit, then the nodelimit is set to -1 to make Cbc stop
     3946         */
    39413947        if (stoppedOnGap_) {
    39423948            messageHandler()->message(CBC_GAP, messages())
     
    39473953            secondaryStatus_ = 2;
    39483954            status_ = 0 ;
     3955        } else if (maximumSecondsReached()) {
     3956            handler_->message(CBC_MAXTIME, messages_) << CoinMessageEol ;
     3957            secondaryStatus_ = 4;
     3958            status_ = 1 ;
    39493959        } else if (eventHappened_) {
    39503960            handler_->message(CBC_EVENT, messages_) << CoinMessageEol ;
     
    39543964            handler_->message(CBC_MAXNODES, messages_) << CoinMessageEol ;
    39553965            secondaryStatus_ = 3;
    3956             status_ = 1 ;
    3957         } else if (maximumSecondsReached()) {
    3958             handler_->message(CBC_MAXTIME, messages_) << CoinMessageEol ;
    3959             secondaryStatus_ = 4;
    39603966            status_ = 1 ;
    39613967        } else {
Note: See TracChangeset for help on using the changeset viewer.