Changeset 722


Ignore:
Timestamp:
Feb 14, 2006 10:42:29 AM (15 years ago)
Author:
forrest
Message:

trying for stability

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ClpModel.cpp

    r718 r722  
    34043404  pivotTolerance_=0.0;
    34053405  acceptablePivot_ = 0.0;
     3406  objectiveScale_ = 1.0;
    34063407  perturbation_ = 0;
    34073408  forceFactorization_=-1;
     
    34183419  pivotTolerance_ = rhs.pivotTolerance_;
    34193420  acceptablePivot_ = rhs.acceptablePivot_;
     3421  objectiveScale_ = rhs.objectiveScale_;
    34203422  sparseThreshold_ = rhs.sparseThreshold_;
    34213423  perturbation_ = rhs.perturbation_;
     
    34423444    pivotTolerance_ = rhs.pivotTolerance_;
    34433445    acceptablePivot_ = rhs.acceptablePivot_;
     3446    objectiveScale_ = rhs.objectiveScale_;
    34443447    sparseThreshold_ = rhs.sparseThreshold_;
    34453448    perturbation_ = rhs.perturbation_;
  • trunk/ClpSimplex.cpp

    r712 r722  
    67196719  saved.forceFactorization_=forceFactorization_;
    67206720  saved.acceptablePivot_ = acceptablePivot_;
     6721  saved.objectiveScale_ = objectiveScale_;
    67216722  // Progress indicator
    67226723  delete progress_;
     
    67346735  dualBound_ = saved.dualBound_;
    67356736  forceFactorization_=saved.forceFactorization_;
     6737  objectiveScale_ = saved.objectiveScale_;
    67366738  acceptablePivot_ = saved.acceptablePivot_;
    67376739  delete progress_;
  • trunk/ClpSimplexDual.cpp

    r712 r722  
    11761176        //rowArray_[0]->cleanAndPackSafe(1.0e-60);
    11771177        //columnArray_[0]->cleanAndPackSafe(1.0e-60);
    1178         if (candidate==-1)
     1178        if (candidate==-1) {
     1179          // make sure incoming doesn't count
     1180          Status saveStatus = getStatus(sequenceIn_);
     1181          setStatus(sequenceIn_,basic);
    11791182          nswapped = updateDualsInDual(rowArray_[0],columnArray_[0],
    11801183                                       rowArray_[2],theta_,
    11811184                                       objectiveChange,false);
    1182         else
     1185          setStatus(sequenceIn_,saveStatus);
     1186        } else {
    11831187          updateDualsInValuesPass(rowArray_[0],columnArray_[0],theta_);
     1188        }
    11841189        double oldDualOut = dualOut_;
    11851190        // which will change basic solution
     
    14601465          // If special option set - put off as long as possible
    14611466          if ((specialOptions_&64)==0) {
    1462             problemStatus_=-4; //say looks infeasible
     1467            if (factorization_->pivots()==0)
     1468              problemStatus_=-4; //say looks infeasible
    14631469          } else {
    14641470            // flag
     
    32153221                                      int ifValuesPass)
    32163222{
     3223  // If lots of iterations then adjust costs if large ones
     3224  if (numberIterations_>4*(numberRows_+numberColumns_)&&objectiveScale_==1.0) {
     3225    double largest=0.0;
     3226    for (int i=0;i<numberRows_;i++) {
     3227      int iColumn = pivotVariable_[i];
     3228      largest = CoinMax(largest,fabs(cost_[iColumn]));
     3229    }
     3230    if (largest>1.0e6) {
     3231      objectiveScale_ = 1.0e6/largest;
     3232      for (int i=0;i<numberRows_+numberColumns_;i++)
     3233        cost_[i] *= objectiveScale_;
     3234    }
     3235  }
    32173236  bool normalType=true;
    32183237  int numberPivots = factorization_->pivots();
  • trunk/Test/Makefile.test

    r621 r722  
    3535#    CXXFLAGS += -DCLP_DEBUG -DPRESOLVE_SUMMARY=1
    3636#endif
    37 CXXFLAGS += -DCOIN_USE_CLP
     37#CXXFLAGS += -DCOIN_USE_CLP
    3838TESTSRC := ClpMain.cpp
    3939TESTSRC += CbcOrClpParam.cpp
  • trunk/include/ClpModel.hpp

    r715 r722  
    934934  double pivotTolerance_;
    935935  double acceptablePivot_;
     936  double objectiveScale_;
    936937  int sparseThreshold_;
    937938  int perturbation_;
Note: See TracChangeset for help on using the changeset viewer.