Changeset 407


Ignore:
Timestamp:
Jul 11, 2006 6:06:01 PM (13 years ago)
Author:
forrest
Message:

for unbounded and gap

Location:
branches/devel/Cbc/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/devel/Cbc/src/CbcMessage.cpp

    r310 r407  
    5252  {CBC_CUTS_STATS,31,1,"%d added rows had average density of %g"},
    5353  {CBC_STRONG_STATS,32,1,"Strong branching done %d times (%d iterations), fathomed %d nodes and fixed %d variables"},
     54  {CBC_UNBOUNDED,34,1,"The LP relaxation is unbounded!"},
    5455  {CBC_DUMMY_END,999999,0,""}
    5556};
  • branches/devel/Cbc/src/CbcMessage.hpp

    r279 r407  
    5757  CBC_CUTS_STATS,
    5858  CBC_STRONG_STATS,
     59  CBC_UNBOUNDED,
    5960  CBC_DUMMY_END
    6061};
  • branches/devel/Cbc/src/CbcModel.cpp

    r404 r407  
    656656  continue with processing the root node.
    657657*/
    658   if (!feasible)
    659   { handler_->message(CBC_INFEAS,messages_)<< CoinMessageEol ;
     658  if (!feasible) {
    660659    status_ = 0 ;
    661     secondaryStatus_ = 1;
     660    if (!solver_->isProvenDualInfeasible()) {
     661      handler_->message(CBC_INFEAS,messages_)<< CoinMessageEol ;
     662      secondaryStatus_ = 1;
     663    } else {
     664      handler_->message(CBC_UNBOUNDED,messages_)<< CoinMessageEol ;
     665      secondaryStatus_ = 7;
     666    }
    662667    originalContinuousObjective_ = COIN_DBL_MAX;
    663668    solverCharacteristics_ = NULL;
    664     return ; }
     669    return ;
     670  }
    665671  // Save objective (just so user can access it)
    666672  originalContinuousObjective_ = solver_->getObjValue();
     
    17031709    status_=1;
    17041710  if (!status_) {
    1705     bestPossibleObjective_=bestObjective_;
     1711    // Set best possible unless stopped on gap
     1712    if(secondaryStatus_ != 2)
     1713      bestPossibleObjective_=bestObjective_;
    17061714    handler_->message(CBC_END_GOOD,messages_)
    17071715      << bestObjective_ << numberIterations_ << numberNodes_<<getCurrentSeconds()
     
    30853093{
    30863094  if (!status_ && bestObjective_>=1.0e30)
     3095    return true;
     3096  else
     3097    return false;
     3098}
     3099// Was continuous solution unbounded
     3100bool
     3101CbcModel::isContinuousUnbounded() const
     3102{
     3103  if (!status_ && secondaryStatus_==7)
     3104    return true;
     3105  else
     3106    return false;
     3107}
     3108// Was continuous solution unbounded
     3109bool
     3110CbcModel::isProvenDualInfeasible() const
     3111{
     3112  if (!status_ && secondaryStatus_==7)
    30873113    return true;
    30883114  else
  • branches/devel/Cbc/src/CbcModel.hpp

    r395 r407  
    669669    /// Is  infeasiblity proven (or none better than cutoff)?
    670670    bool isProvenInfeasible() const;
     671    /// Was continuous solution unbounded
     672    bool isContinuousUnbounded() const;
     673    /// Was continuous solution unbounded
     674    bool isProvenDualInfeasible() const;
    671675    /// Node limit reached?
    672676    bool isNodeLimitReached() const;
     
    701705        5 stopped on user event
    702706        6 stopped on solutions
     707        7 linear relaxation unbounded
    703708    */
    704709    inline int secondaryStatus() const
  • branches/devel/Cbc/src/CoinSolve.cpp

    r391 r407  
    17441744                  info.problemStatus=1;
    17451745                  info.objValue = 1.0e100;
    1746                   sprintf(info.buffer,"infeasible by pre-processing");
     1746                  sprintf(info.buffer,"infeasible/unbounded by pre-processing");
    17471747                  info.primalSolution=NULL;
    17481748                  info.dualSolution=NULL;
     
    17521752                if (!noPrinting) {
    17531753                  if (!solver2) {
    1754                     printf("Pre-processing says infeasible\n");
     1754                    printf("Pre-processing says infeasible or unbounded\n");
    17551755                    break;
    17561756                  } else {
Note: See TracChangeset for help on using the changeset viewer.