# Changeset 61

Ignore:
Timestamp:
Dec 13, 2008 4:52:42 PM (13 years ago)
Message:

fixed some method for quadratic functions. Deleted useless problem print.

Location:
trunk
Files:
8 edited

Unmodified
Removed
• ## trunk/Couenne/src/convex/operators/alphaConvexify.cpp

 r1 delete [] indexmap; delete [] indices; #ifdef DEBUG printf ("unbounded, bailing out\n"); #endif return false;
• ## trunk/Couenne/src/convex/operators/conv-exprMul.cpp

 r39 * Purpose: utility methods to convexify multiplications * * (C) Carnegie-Mellon University, 2006. * (C) Carnegie-Mellon University, 2006-08. * This file is licensed under the Common Public License (CPL) */ return aux; } */ // check if it is a product of binary variables bool isBinProd = true; for (int i=nargs_; i--;) { expression *arg = arglist_ [i]; if (arg -> isInteger ()) { CouNumber lb, ub; arg -> getBounds (lb, ub); if ((fabs (lb)      > 0.) || (fabs (ub - 1.) > 0.)) { // if not all conditions hold, isBinProd = false; break; } } else { isBinProd = false; break; } } if (isBinProd) { //printf ("found a BinProd!\n"); } //expression *aux = arglist_ [0]; // why not this one?

 r1 * Purpose: implementation of convexification methods for exprQuad * * (C) Carnegie-Mellon University, 2006. * (C) Carnegie-Mellon University, 2006-08. * This file is licensed under the Common Public License (CPL) */ /*printf ("generated quad bounds:\n  "); lb -> print (); printf (" [%g]\n  ", (*lb) ()); ub -> print (); printf (" [%g]\n", (*ub) ());*/ ub -> print (); printf (" [%g]\n",   (*ub) ());*/ } /// Get lower and upper bound of an expression (if any) void exprQuad::getBounds (CouNumber &lb, CouNumber &ub) { expression::getBounds (lb, ub); }