19 using namespace Couenne;
75 image_ (e.image_ -> clone (d)),
77 multiplicity_ (e.multiplicity_),
78 integer_ (e.integer_),
79 top_level_ (e.top_level_),
163 if (deplist.find (
varIndex_) == deplist.end ())
197 static bool warned_large_coeff =
false;
198 int nrc = cs.sizeRowCuts (), ncc = cs.sizeColCuts ();
215 if (cg -> Jnlst () -> ProduceOutput (Ipopt::J_DETAILED,
J_CONVEXIFYING)) {
216 if (cg -> Jnlst () -> ProduceOutput (Ipopt::J_STRONGWARNING,
J_CONVEXIFYING) &&
217 (warned_large_coeff)) {
218 for (
int jj=nrc; jj < cs.sizeRowCuts (); jj++) {
220 OsiRowCut *cut = cs.rowCutPtr (jj);
221 CoinPackedVector row = cut -> row ();
223 int n = cut -> row (). getNumElements();
224 const double *el = row. getElements ();
225 const int *ind = row. getIndices ();
226 double rhs = cut -> rhs ();
230 printf (
"Couenne, warning: coefficient too large %g x%d: ", el [n], ind [n]);
232 warned_large_coeff =
true;
237 printf (
"Couenne, warning: rhs too large (%g): ", rhs);
239 warned_large_coeff =
true;
247 if ((nrc < cs.sizeRowCuts ()) ||
248 (ncc < cs.sizeColCuts ()))
250 printf (
"---------------- ConvCut: ");
257 printf (
" %g [%g,%g]. ",
265 printf (
"%g [%g,%g] ",
272 printf (
"%g [%g,%g] ",
278 for (
int jj = nrc; jj < cs.sizeRowCuts (); jj++) cs.rowCutPtr (jj) ->
print ();
279 for (
int jj = ncc; jj < cs.sizeColCuts (); jj++) cs.colCutPtr (jj) ->
print ();
Cut Generator for linear convexifications.
enum intType integer_
is this variable integer?
int multiplicity_
number of appearances of this aux in the formulation.
OsiObject for auxiliary variables $w=f(x)$.
status of lower/upper bound of a variable, to be checked/modified in bound tightening ...
void crossBounds()
Get lower and upper bound of an expression (if any)
enum auxSign sign_
"sign" of the defining constraint
virtual enum expr_type code()
code for comparison
void draw_cuts(OsiCuts &, const CouenneCutGenerator *, int, expression *, expression *)
allow to draw function within intervals and cuts introduced
Domain * domain_
Pointer to a descriptor of the current point/bounds.
OsiObject for complementarity constraints .
void generateCuts(OsiCuts &, const CouenneCutGenerator *, t_chg_bounds *=NULL, int=-1, CouNumber=-COUENNE_INFINITY, CouNumber=COUENNE_INFINITY)
generate cuts for expression associated with this auxiliary
const Ipopt::EJournalCategory J_CONVEXIFYING(Ipopt::J_USER3)
expression * simplify()
simplify
virtual expression * Argument() const
return argument (when applicable, i.e., with univariate functions)
void fint fint fint real fint real real real real real real real real real * e
A class to have all elements necessary to setup a branch-and-bound.
auxSign
"sign" of the constraint defining an auxiliary.
virtual ~exprAux()
Destructor.
virtual CouNumber & ub()
Get/set upper bound value.
virtual void print(std::ostream &=std::cout, bool=false) const
Print expression.
enum nodeType Type() const
Node type.
Class for MINLP problems with symbolic information.
intType
integrality type of an auxiliary variable: unset, continuous, integer
int DepList(std::set< int > &deplist, enum dig_type type=ORIG_ONLY)
fill in the set with all indices of variables appearing in the expression
expression * lb_
lower bound, a function of the associated expression and the bounds on the variables in the expressio...
virtual void getBounds(expression *&, expression *&)
Get expressions of lower and upper bound of an expression (if any)
virtual enum auxSign sign() const
return its sign in the definition constraint
CouenneObject * properObject(CouenneCutGenerator *c, CouenneProblem *p, Bonmin::BabSetupBase *base, JnlstPtr jnlst)
return proper object to handle expression associated with this variable (NULL if this is not an auxil...
double CouNumber
main number type in Couenne
int Index() const
Get variable index in problem.
dig_type
type of digging when filling the dependence list
virtual int nArgs() const
return number of arguments (when applicable, that is, with N-ary functions)
exprAux(expression *, int, int, intType=Unset, Domain *=NULL, enum auxSign=expression::AUX_EQ)
Constructor.
bool top_level_
True if this variable replaces the lhs of a constraint, i.e., if it is a top level variable in the DA...
expression * ub_
upper bound, a function of the associated expression and the bounds on the variables in the expressio...
int varIndex_
The index of the variable.
expression * image_
The expression associated with this auxiliary variable.
These are bound expression classes.
virtual expression ** ArgList() const
return arglist (when applicable, that is, with N-ary functions)
Define a dynamic point+bounds, with a way to save and restore previous points+bounds through a LIFO s...
virtual CouNumber & lb()
Get/set lower bound value.
void fint fint fint real fint real * x
bool isInteger(CouNumber x)
is this number integer?