Changeset 1076


Ignore:
Timestamp:
Aug 10, 2007 7:49:54 AM (12 years ago)
Author:
forrest
Message:

add yet more special options

Location:
trunk/Clp/src
Files:
3 edited

Legend:

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

    r1060 r1076  
    4545  columnDualInfeasibility_(0.0),
    4646  rowDualInfeasibility_(0.0),
    47   columnDualSequence_(-2),
     47  moreSpecialOptions_(0),
    4848  rowDualSequence_(-2),
    4949  primalToleranceToGetOptimal_(-1.0),
     
    156156  columnDualInfeasibility_(0.0),
    157157  rowDualInfeasibility_(0.0),
    158   columnDualSequence_(-2),
     158  moreSpecialOptions_(0),
    159159  rowDualSequence_(-2),
    160160  primalToleranceToGetOptimal_(-1.0),
     
    16151615  columnDualInfeasibility_(0.0),
    16161616  rowDualInfeasibility_(0.0),
    1617   columnDualSequence_(-2),
     1617  moreSpecialOptions_(0),
    16181618  rowDualSequence_(-2),
    16191619  primalToleranceToGetOptimal_(-1.0),
     
    17191719  columnDualInfeasibility_(0.0),
    17201720  rowDualInfeasibility_(0.0),
    1721   columnDualSequence_(-2),
     1721  moreSpecialOptions_(0),
    17221722  rowDualSequence_(-2),
    17231723  primalToleranceToGetOptimal_(-1.0),
     
    19121912  rowPrimalSequence_ = rhs.rowPrimalSequence_;
    19131913  columnDualInfeasibility_ = rhs.columnDualInfeasibility_;
    1914   columnDualSequence_ = rhs.columnDualSequence_;
     1914  moreSpecialOptions_ = rhs.moreSpecialOptions_;
    19151915  rowDualInfeasibility_ = rhs.rowDualInfeasibility_;
    19161916  rowDualSequence_ = rhs.rowDualSequence_;
     
    51975197  perturbation_ = otherModel.perturbation_;
    51985198  specialOptions_ = otherModel.specialOptions_;
     5199  moreSpecialOptions_ = otherModel.moreSpecialOptions_;
    51995200  automaticScale_ = otherModel.automaticScale_;
    52005201}
     
    73357336  otherModel.rowPrimalSequence_ = rowPrimalSequence_;
    73367337  otherModel.columnDualInfeasibility_ = columnDualInfeasibility_;
    7337   otherModel.columnDualSequence_ = columnDualSequence_;
     7338  otherModel.moreSpecialOptions_ = moreSpecialOptions_;
    73387339  otherModel.rowDualInfeasibility_ = rowDualInfeasibility_;
    73397340  otherModel.rowDualSequence_ = rowDualSequence_;
  • trunk/Clp/src/ClpSimplex.hpp

    r1055 r1076  
    863863  inline ClpNonLinearCost * nonLinearCost() const
    864864  { return nonLinearCost_;}
     865  /** Return more special options
     866      1 bit - if presolve says infeasible in ClpSolve return
     867      2 bit - if presolved problem infeasible return
     868  */
     869  inline int moreSpecialOptions() const
     870  { return moreSpecialOptions_;}
     871  /** Set more special options
     872      1 bit - if presolve says infeasible in ClpSolve return
     873      2 bit - if presolved problem infeasible return
     874  */
     875  inline void setMoreSpecialOptions(int value)
     876  { moreSpecialOptions_ = value;}
    865877  //@}
    866878  /**@name status methods */
     
    10811093  /// Worst row dual infeasibility
    10821094  double rowDualInfeasibility_;
    1083   /// Sequence of worst (-1 if feasible)
    1084   int columnDualSequence_;
     1095  /// More special options - see set for details
     1096  int moreSpecialOptions_;
    10851097  /// Sequence of worst (-1 if feasible)
    10861098  int rowDualSequence_;
  • trunk/Clp/src/ClpSolve.cpp

    r1060 r1076  
    615615        <<CoinMessageEol;
    616616      model2 = this;
    617       if (options.infeasibleReturn()) {
     617      problemStatus_=1; // may be unbounded but who cares
     618      if (options.infeasibleReturn()||(moreSpecialOptions_&1)!=0) {
    618619        return -1;
    619620      }
     
    22472248    if (finalStatus!=3&&(finalStatus||status()==-1)) {
    22482249      int savePerturbation = perturbation();
    2249       setPerturbation(100);
    2250       if (finalStatus==2) {
    2251         // unbounded - get feasible first
    2252         double save = optimizationDirection_;
    2253         optimizationDirection_=0.0;
    2254         primal(1);
    2255         optimizationDirection_=save;
    2256       }
    2257       primal(1);
     2250      if (!finalStatus||(moreSpecialOptions_&2)==0) {
     2251        if (finalStatus==2) {
     2252          // unbounded - get feasible first
     2253          double save = optimizationDirection_;
     2254          optimizationDirection_=0.0;
     2255          primal(1);
     2256          optimizationDirection_=save;
     2257          primal(1);
     2258        } else if (finalStatus==1) {
     2259          dual();
     2260        } else {
     2261          setPerturbation(100);
     2262          primal(1);
     2263        }
     2264      } else {
     2265        // just set status
     2266        problemStatus_=finalStatus;
     2267      }
    22582268      setPerturbation(savePerturbation);
    22592269      numberIterations += numberIterations_;
Note: See TracChangeset for help on using the changeset viewer.