Ignore:
Timestamp:
Mar 26, 2013 11:23:38 AM (8 years ago)
Author:
forrest
Message:

try to fix infeasibility ray,
changes as in stable (for presolve),
stuff for Cbc parameters

File:
1 edited

Legend:

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

    r1924 r1926  
    123123     intParam_[ClpMaxNumIteration] = 2147483647;
    124124     intParam_[ClpMaxNumIterationHotStart] = 9999999;
    125      intParam_[ClpNameDiscipline] = 0;
     125     intParam_[ClpNameDiscipline] = 1;
    126126
    127127     dblParam_[ClpDualObjectiveLimit] = COIN_DBL_MAX;
     
    27552755// Infeasibility/unbounded ray (NULL returned if none/wrong)
    27562756double *
    2757 ClpModel::infeasibilityRay() const
     2757ClpModel::infeasibilityRay(bool fullRay) const
    27582758{
    27592759     double * array = NULL;
    27602760     if (problemStatus_ == 1 && ray_) {
    2761           array = ClpCopyOfArray(ray_, numberRows_);
    2762 #if 0 //ndef CLP_NO_SWAP_SIGN
    2763           // swap signs to be consistent with norm
    2764           for (int i = 0; i < numberRows_; i++)
    2765                array[i] = -array[i];
    2766 #endif
    2767 #if 0
    2768           // clean up
    2769           double largest = 1.0e-30;
    2770           double smallest = COIN_DBL_MAX;
    2771           int i;
    2772           for (i = 0; i < numberRows_; i++) {
    2773                double value = fabs(array[i]);
    2774                smallest = CoinMin(smallest, value);
    2775                largest = CoinMax(largest, value);
    2776           }
    2777 #endif
     2761       if (!fullRay) {
     2762         array = ClpCopyOfArray(ray_, numberRows_);
     2763       } else {
     2764         array = new double [numberRows_+numberColumns_];
     2765         memcpy(array,ray_,numberRows_*sizeof(double));
     2766         memset(array+numberRows_,0,numberColumns_*sizeof(double));
     2767         transposeTimes(-1.0,array,array+numberRows_);
     2768       }
    27782769     }
    27792770     return array;
     
    28502841     defaultHandler_ = oldDefault;
    28512842     handler_ = oldHandler;
     2843}
     2844// Overrides message handler with a default one
     2845void
     2846ClpModel::setDefaultMessageHandler()
     2847{
     2848     int logLevel = handler_->logLevel();
     2849     if (defaultHandler_)
     2850          delete handler_;
     2851     defaultHandler_ = true;
     2852     handler_ = new CoinMessageHandler();
     2853     handler_->setLogLevel(logLevel);
    28522854}
    28532855// Set language
Note: See TracChangeset for help on using the changeset viewer.