11 #include "OsiRowCut.hpp"
18 #include "CoinFinite.hpp"
20 using namespace Couenne;
28 bool is_global)
const {
31 addEnvelope (cs, sign, &st, w_ind, x_ind, x, l, u, chg, is_global);
40 bool is_global)
const {
54 createCut (cs, ft -> F(x0) - fp0 * x0, 0, w_ind, 1., x_ind, - fp0);
61 && !CoinIsnan (opp_slope)
67 createCut (cs, ft -> F (x) + opp_slope * x, sign, w_ind, 1.,
68 x_ind, opp_slope, -1, 0., is_global);
97 if ((x1 = floor (x)) < l)
110 CoinIsnan (y1) || CoinIsnan (y2) ||
111 !CoinFinite (y1) || !CoinFinite (y2))
113 createCut (cs, ft -> F (x) + opp_slope * x, sign, w_ind, 1.,
114 x_ind, opp_slope, -1, 0., is_global);
119 slope = (y1-y2) / (x2-x1),
120 rhs = y1 + slope *
x1;
123 x_ind, slope, -1, 0., is_global);
137 if (cLeft || cRight) {
149 opp_slope = - ft -> Fp (sample);
159 createCut (cs, ft -> F (sample) + opp_slope * sample, sign,
167 if ((x1 = floor (sample)) < l)
180 CoinIsnan (y1) || CoinIsnan (y2) ||
181 !CoinFinite (y1) || !CoinFinite (y2))
183 createCut (cs, ft -> F (sample) + opp_slope * sample, sign, w_ind, 1.,
184 x_ind, opp_slope, -1, 0., is_global);
199 createCut (cs, ft -> F (x) + opp_slope * x, sign,
209 opp_slope = - ft -> Fp (sample);
212 createCut (cs, ft -> F (sample) + opp_slope * sample, sign,
225 opp_slope = - ft -> Fp (sample);
227 createCut (cs, ft -> F(sample) + opp_slope * sample, sign,
bool firstcall_
True if no convexification cuts have been generated yet for this problem.
status of lower/upper bound of a variable, to be checked/modified in bound tightening ...
const char & lower() const
const char & upper() const
enum conv_type convtype_
what kind of sampling should be performed?
void addEnvelope(OsiCuts &, int, unary_function, unary_function, int, int, CouNumber, CouNumber, CouNumber, t_chg_bounds *=NULL, bool=false) const
Add general linear envelope to convex function, given its variables' indices, the (univariate) functi...
void fint fint fint real fint real real real real * f
CouNumber(* unary_function)(CouNumber)
unary function, used in all exprUnary
int createCut(OsiCuts &, CouNumber, CouNumber, int, CouNumber, int=-1, CouNumber=0., int=-1, CouNumber=0., bool=false) const
create cut and check violation. Insert and return status
double CouNumber
main number type in Couenne
CouenneProblem * problem_
pointer to symbolic repr. of constraint, variables, and bounds
int nSamples_
how many cuts should be added for each function?
void fint fint fint real fint real * x
bool isInteger(CouNumber x)
is this number integer?