16 using namespace Couenne;
23 static bool first_draw =
true;
40 indep = img -> ArgList () [0];
42 int xi = indep -> Index ();
47 indep -> getBounds (lbe, ube);
57 CouNumber curx = cg -> Problem () -> X (xi);
71 cg -> Problem () -> X () [xi] =
x;
75 if (y > maxY) maxY = y;
76 if (y < minY) minY = y;
78 fprintf (stderr,
"%.12e %.12e\n",
x, y);
81 maxY += (maxY-minY) / 20;
82 minY -= (maxY-minY) / 20;
90 for (
int jj=j; jj < cs.sizeRowCuts (); jj++) {
95 const double *el = cs.rowCutPtr (jj) -> row (). getElements ();
96 double rhs = cs.rowCutPtr (jj) -> rhs ();
99 lb0 = CoinMax (lb, CoinMin ((rhs - el[0] * minY) / el [1], (rhs - el[0] * maxY) / el [1]));
100 ub0 = CoinMin (ub, CoinMax ((rhs - el[0] * minY) / el [1], (rhs - el[0] * maxY) / el [1]));
103 fprintf (stderr,
"#m=2,S=%d\n", (cs.rowCutPtr (jj) -> sense () ==
'L') ? 10:11);
105 fprintf (stderr,
"%.12e %.12e\n", lb0, (rhs - el [1] * lb0) / el [0]);
106 fprintf (stderr,
"%.12e %.12e\n", ub0, (rhs - el [1] * ub0) / el [0]);
109 cg -> Problem () -> X () [xi] = curx;
Cut Generator for linear convexifications.
void draw_cuts(OsiCuts &, const CouenneCutGenerator *, int, expression *, expression *)
allow to draw function within intervals and cuts introduced
double CouNumber
main number type in Couenne
void fint fint fint real fint real real real real real real real real * w
void fint fint fint real fint real * x