Changeset 1436 for trunk/Clp


Ignore:
Timestamp:
Sep 25, 2009 11:26:48 AM (10 years ago)
Author:
forrest
Message:

fix divide by zero

Location:
trunk/Clp/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/ClpDualRowSteepest.cpp

    r1377 r1436  
    537537    // could re-initialize here (could be expensive)
    538538    norm /= model_->alpha() * model_->alpha();
    539    
     539    assert(model_->alpha());
    540540    assert(norm);
    541541    // pivot element
  • trunk/Clp/src/ClpModel.hpp

    r1424 r1436  
    1818#include "CoinMessageHandler.hpp"
    1919#include "CoinHelperFunctions.hpp"
     20#include "CoinFinite.hpp"
    2021#include "ClpParameters.hpp"
    2122#include "ClpObjective.hpp"
    2223class ClpEventHandler;
    23 
    24 // Plus infinity
    25 #ifndef COIN_DBL_MAX
    26 #define COIN_DBL_MAX DBL_MAX
    27 #endif
    28 
    2924/** This is the base class for Linear and quadratic Models
    3025    This knows nothing about the algorithm, but it seems to
  • trunk/Clp/src/ClpSimplexDual.cpp

    r1434 r1436  
    38183818  }
    38193819
    3820   if (sequenceIn_>=0) {
    38213820#ifdef MORE_CAREFUL
    38223821    // If we have done pivots and things look bad set alpha_ 0.0 to force factorization
    3823     if (badSumPivots) {
     3822    if (badSumPivots||
     3823        fabs(theta_*badFree)>10.0*dualTolerance_&&factorization_->pivots()) {
    38243824      if (handler_->logLevel()>1)
    38253825        printf("forcing re-factorization\n");
    3826       alpha_=0.0;
    3827     }
    3828     if (fabs(theta_*badFree)>10.0*dualTolerance_&&factorization_->pivots()) {
    3829       if (handler_->logLevel()>1)
    3830         printf("forcing re-factorizationon free\n");
    3831       alpha_=0.0;
    3832     }
    3833 #endif
     3826      sequenceIn_=-1;
     3827    }
     3828#endif
     3829  if (sequenceIn_>=0) {
    38343830    lowerIn_ = lower_[sequenceIn_];
    38353831    upperIn_ = upper_[sequenceIn_];
     
    38963892      lowerIn_=valueIn_;
    38973893    }
     3894  } else {
     3895    // no pivot
     3896    bestPossible=0.0;
     3897    alpha_=0.0;
    38983898  }
    38993899  //if (thisIncrease)
Note: See TracChangeset for help on using the changeset viewer.