Ignore:
Timestamp:
Mar 4, 2005 1:26:23 PM (15 years ago)
Author:
forrest
Message:

relax assertions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CbcBranchLotsize.cpp

    r74 r76  
    427427  value = CoinMax(value, lower[columnNumber_]);
    428428  value = CoinMin(value, upper[columnNumber_]);
     429  double integerTolerance =
     430    model_->getDblParam(CbcModel::CbcIntegerTolerance);
    429431  /*printf("%d %g %g %g %g\n",columnNumber_,value,lower[columnNumber_],
    430432    solution[columnNumber_],upper[columnNumber_]);*/
    431   assert (value>=bound_[0]&&value<=bound_[rangeType_*numberRanges_-1]);
    432   double integerTolerance =
    433     model_->getDblParam(CbcModel::CbcIntegerTolerance);
     433  assert (value>=bound_[0]-integerTolerance
     434          &&value<=bound_[rangeType_*numberRanges_-1]+integerTolerance);
    434435  double infeasibility=0.0;
    435436  bool feasible = findRange(value);
     
    513514#endif
    514515  // Scaling may have moved it a bit
    515   assert (fabs(value-nearest)<=100.0*integerTolerance);
     516  // Lotsizing variables could be a lot larger
     517  assert (fabs(value-nearest)<=(100.0+10.0*fabs(nearest))*integerTolerance);
    516518}
    517519
     
    596598  double integerTolerance =
    597599    model_->getDblParam(CbcModel::CbcIntegerTolerance);
    598   assert (fabs(value-nearest)<=integerTolerance);
     600  // Scaling may have moved it a bit
     601  // Lotsizing variables could be a lot larger
     602  assert (fabs(value-nearest)<=(10.0+10.0*fabs(nearest))*integerTolerance);
    599603  double dj = solver->getObjSense()*solver->getReducedCost()[columnNumber_];
    600604  CbcLotsizeBranchingObject * object = NULL;
Note: See TracChangeset for help on using the changeset viewer.