Changeset 1790 for stable/2.7/Cbc


Ignore:
Timestamp:
Jun 8, 2012 10:59:51 AM (8 years ago)
Author:
stefan
Message:

add message for saying that one stops due to an iteration limit (was printing solution limit reached before)

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

Legend:

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

    r1675 r1790  
    6969    {CBC_FATHOM_CHANGE, 49, 1, "Complete fathoming at depth >= %d"},
    7070#endif
     71    {CBC_MAXITERS, 50, 1, "Exiting on maximum number of iterations"},
    7172    {CBC_NOINT, 3007, 1, "No integer variables - nothing to do"},
    7273    {CBC_WARNING_STRONG, 3008, 1, "Strong branching is fixing too many variables, too expensively!"},
  • stable/2.7/Cbc/src/CbcMessage.hpp

    r1675 r1790  
    2828    CBC_MAXSOLS,
    2929    CBC_EVENT,
     30    CBC_MAXITERS,
    3031    CBC_SOLUTION,
    3132    CBC_END_SOLUTION,
  • stable/2.7/Cbc/src/CbcModel.cpp

    r1783 r1790  
    39303930    */
    39313931    if (!(numberNodes_ < intParam_[CbcMaxNumNode] &&
    3932             numberSolutions_ < intParam_[CbcMaxNumSol] &&
    3933             !maximumSecondsReached() &&
    3934             !stoppedOnGap_ && !eventHappened_ && (maximumNumberIterations_ < 0 ||
    3935                                                   numberIterations_ < maximumNumberIterations_))) {
     3932          numberSolutions_ < intParam_[CbcMaxNumSol] &&
     3933          !maximumSecondsReached() &&
     3934          !stoppedOnGap_ &&
     3935          !eventHappened_ &&
     3936          (maximumNumberIterations_ < 0 || numberIterations_ < maximumNumberIterations_))
     3937         ) {
    39363938        if (tree_->size()) {
    39373939            double dummyBest;
     
    39653967            secondaryStatus_ = 3;
    39663968            status_ = 1 ;
     3969        } else if (maximumNumberIterations_ >= 0 && numberIterations_ >= maximumNumberIterations_) {
     3970           handler_->message(CBC_MAXITERS, messages_) << CoinMessageEol ;
     3971           secondaryStatus_ = 3; /* do not have secondary status for iterlimit yet, so pretend nodelimit */
     3972           status_ = 1 ;
    39673973        } else {
     3974            assert(numberSolutions_ >= intParam_[CbcMaxNumSol]);
    39683975            handler_->message(CBC_MAXSOLS, messages_) << CoinMessageEol ;
    39693976            secondaryStatus_ = 6;
Note: See TracChangeset for help on using the changeset viewer.