Changeset 588


Ignore:
Timestamp:
Mar 30, 2007 10:06:52 AM (12 years ago)
Author:
forrest
Message:

for dubiois optionas

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

Legend:

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

    r579 r588  
    14791479    if (obj) {
    14801480      if (obj->xMeshSize()<1.0&&obj->yMeshSize()<1.0) {
     1481        double oldSatisfied = CoinMax(obj->xSatisfied(),
     1482                                      obj->ySatisfied());
    14811483        OsiBiLinear * objNew = new OsiBiLinear(*obj);
    14821484        newObject[numberOdd++]=objNew;
    14831485        objNew->setXSatisfied(0.5*meshSize);
     1486        obj->setXOtherSatisfied(0.5*meshSize);
     1487        objNew->setXOtherSatisfied(oldSatisfied);
    14841488        objNew->setXMeshSize(meshSize);
    14851489        objNew->setYSatisfied(0.5*meshSize);
     1490        obj->setYOtherSatisfied(0.5*meshSize);
     1491        objNew->setYOtherSatisfied(oldSatisfied);
    14861492        objNew->setYMeshSize(meshSize);
    14871493        objNew->setXYSatisfied(0.5*meshSize);
     
    40734079    xSatisfied_(1.0e-6),
    40744080    ySatisfied_(1.0e-6),
     4081    xOtherSatisfied_(0.0),
     4082    yOtherSatisfied_(0.0),
    40754083    xySatisfied_(1.0e-6),
    40764084    xyBranchValue_(0.0),
     
    40994107    xSatisfied_(1.0e-6),
    41004108    ySatisfied_(1.0e-6),
     4109    xOtherSatisfied_(0.0),
     4110    yOtherSatisfied_(0.0),
    41014111    xySatisfied_(1.0e-6),
    41024112    xyBranchValue_(0.0),
     
    43064316   xSatisfied_(rhs.xSatisfied_),
    43074317   ySatisfied_(rhs.ySatisfied_),
     4318   xOtherSatisfied_(rhs.xOtherSatisfied_),
     4319   yOtherSatisfied_(rhs.yOtherSatisfied_),
    43084320   xySatisfied_(rhs.xySatisfied_),
    43094321   xyBranchValue_(rhs.xyBranchValue_),
     
    43394351    xSatisfied_ = rhs.xSatisfied_;
    43404352    ySatisfied_ = rhs.ySatisfied_;
     4353    xOtherSatisfied_ = rhs.xOtherSatisfied_;
     4354    yOtherSatisfied_ = rhs.yOtherSatisfied_;
    43414355    xySatisfied_ = rhs.xySatisfied_;
    43424356    xyBranchValue_ = rhs.xyBranchValue_;
     
    44494463    }
    44504464    // but if first coarse grid then only if gap small
    4451     if ((branchingStrategy_&8)!=0&&xSatisfied&&
     4465    if (false&&(branchingStrategy_&8)!=0&&xSatisfied&&
    44524466        xB[1]-xB[0]>=xMeshSize_) {
    4453       xNew = 0.5*(xB[0]+xB[1]);
    4454       x = xNew;
    4455       xSatisfied=false;
     4467      // but allow if fine grid would allow
     4468      if (fabs(xNew-x)>=xOtherSatisfied_&&fabs(yB[0]-y)>yOtherSatisfied_
     4469          &&fabs(yB[1]-y)>yOtherSatisfied_) {
     4470        xNew = 0.5*(xB[0]+xB[1]);
     4471        x = xNew;
     4472        xSatisfied=false;
     4473      }
    44564474    }
    44574475  } else {
     
    44754493    }
    44764494    // but if first coarse grid then only if gap small
    4477     if ((branchingStrategy_&8)!=0&&ySatisfied&&
     4495    if (false&&(branchingStrategy_&8)!=0&&ySatisfied&&
    44784496        yB[1]-yB[0]>=yMeshSize_) {
    4479       yNew = 0.5*(yB[0]+yB[1]);
    4480       y = yNew;
    4481       ySatisfied=false;
     4497      // but allow if fine grid would allow
     4498      if (fabs(yNew-y)>=yOtherSatisfied_&&fabs(xB[0]-x)>xOtherSatisfied_
     4499          &&fabs(xB[1]-x)>xOtherSatisfied_) {
     4500        yNew = 0.5*(yB[0]+yB[1]);
     4501        y = yNew;
     4502        ySatisfied=false;
     4503      }
    44824504    }
    44834505  } else {
  • branches/devel/Cbc/src/CbcLinked.hpp

    r579 r588  
    756756  inline void setYSatisfied(double value)
    757757  { ySatisfied_=value;};
     758  /// X other satisfied if less than this away from mesh
     759  inline double xOtherSatisfied() const
     760  { return xOtherSatisfied_;};
     761  inline void setXOtherSatisfied(double value)
     762  { xOtherSatisfied_=value;};
     763  /// Y other satisfied if less than this away from mesh
     764  inline double yOtherSatisfied() const
     765  { return yOtherSatisfied_;};
     766  inline void setYOtherSatisfied(double value)
     767  { yOtherSatisfied_=value;};
    758768  /// X meshSize
    759769  inline double xMeshSize() const
     
    821831  /// y satisfied if less than this away from mesh
    822832  double ySatisfied_;
     833  /// X other satisfied if less than this away from mesh
     834  double xOtherSatisfied_;
     835  /// Y other satisfied if less than this away from mesh
     836  double yOtherSatisfied_;
    823837  /// xy satisfied if less than this away from true
    824838  double xySatisfied_;
  • branches/devel/Cbc/src/CbcSolver.cpp

    r587 r588  
    29622962                  }
    29632963                  int numberPasses = 10;
    2964                   if (tunePreProcess>=1000) {
     2964                  if (tunePreProcess>=1000000) {
     2965                    numberPasses = (tunePreProcess/1000000)-1;
     2966                    tunePreProcess = tunePreProcess % 1000000;
     2967                  } else if (tunePreProcess>=1000) {
    29652968                    numberPasses = (tunePreProcess/1000)-1;
    29662969                    tunePreProcess = tunePreProcess % 1000;
Note: See TracChangeset for help on using the changeset viewer.