11 #include "CglCutGenerator.hpp"
16 using namespace Couenne;
27 int nrc = cs.sizeRowCuts ();
31 *indLow =
new int [ncols],
32 *indUpp =
new int [ncols],
33 nLow, nUpp = nLow = 0;
41 *oldLow = si.getColLower (),
42 *oldUpp = si.getColUpper (),
47 for (
int i=0; i <
problem_ -> nVars (); i++)
50 printf (
"x%-3d. [%-10g , %10g] ---> [%-10g , %10g]\n",
51 i, oldLow [i], oldUpp [i], newLow [i], newUpp [i]);
55 for (
int i = 0; i < nchanged; i++) {
57 int index = changed [i];
63 (
problem_ -> Var (index) -> Multiplicity () <= 0))
66 if (newLow [index] > newUpp [index])
77 indLow [nLow] = index;
87 indUpp [nUpp] = index;
96 OsiColCut *cut =
new OsiColCut;
99 cut -> setLbs (nLow, indLow, bndLow);
100 cut -> setUbs (nUpp, indUpp, bndUpp);
108 printf (
"column cuts\n");
109 for (
int jj = nrc; jj < cs.sizeRowCuts (); jj++) cs.rowCutPtr (jj) -> print ();
112 delete [] bndLow;
delete [] indLow;
113 delete [] bndUpp;
delete [] indUpp;
bool firstcall_
True if no convexification cuts have been generated yet for this problem.
double CouNumber
main number type in Couenne
CouenneProblem * problem_
pointer to symbolic repr. of constraint, variables, and bounds
void genColCuts(const OsiSolverInterface &, OsiCuts &, int, int *) const
generate OsiColCuts for improved (implied and propagated) bounds
bool isInteger(CouNumber x)
is this number integer?