9 #ifndef BonminOuterApprox_H
10 #define BonminOuterApprox_H
15 class OsiTMINLPInterface;
34 veryTiny_(other.veryTiny_){
42 veryTiny_ = rhs.veryTiny_;}
55 const double * x,
bool getObj);
59 const double * x,
bool getObj){
64 inline bool cleanNnz(
double &value,
double colLower,
double colUpper,
65 double rowLower,
double rowUpper,
double colsol,
66 double & lb,
double &ub,
double tiny,
double veryTiny);
72 static int nTimesCalled;
78 OuterApprox::cleanNnz(
double &value,
double colLower,
double colUpper,
79 double rowLower,
double rowUpper,
double colsol,
80 double & lb,
double &ub,
double tiny,
double veryTiny)
82 if(fabs(value)>= tiny)
return 1;
84 if(fabs(value)<veryTiny)
return 0;
88 bool colUpBounded = colUpper < 10000;
89 bool colLoBounded = colLower > -10000;
90 bool rowNotLoBounded = rowLower <= - infty;
91 bool rowNotUpBounded = rowUpper >= infty;
94 if(colLoBounded && pos && rowNotUpBounded) {
95 lb += value * (colsol - colLower);
99 if(colLoBounded && !pos && rowNotLoBounded) {
100 ub += value * (colsol - colLower);
104 if(colUpBounded && !pos && rowNotUpBounded) {
105 lb += value * (colsol - colUpper);
109 if(colUpBounded && pos && rowNotLoBounded) {
110 ub += value * (colsol - colUpper);
114 if(pos) value = tiny;