# Changeset 370

Ignore:
Timestamp:
Jun 15, 2010 3:16:19 PM (11 years ago)
Message:

merged changeset 367 -- fix infeasibility due to implied bound on exp

Location:
stable/0.2/Couenne/src/expression/operators
Files:
3 edited

Unmodified
Added
Removed
• ## stable/0.2/Couenne/src/expression/operators

• Property svn:mergeinfo set to  /stable/BSP/Couenne/src/expression/operators merged eligible /trunk/Couenne/src/expression/operators merged eligible
• ## stable/0.2/Couenne/src/expression/operators/exprExp.cpp

 r159 /* \$Id: exprExp.cpp 154 2009-06-16 18:52:53Z pbelotti \$ */ /* /* \$Id\$ * * Name:    exprExp.cpp * Author:  Pietro Belotti * Purpose: definition of the exponential * * (C) Carnegie-Mellon University, 2006-08. * (C) Carnegie-Mellon University, 2006-10. * This file is licensed under the Common Public License (CPL) */ #include "exprMul.hpp" #include "CouenneProblem.hpp" // differentiation CouNumber b; if ((b = l [wind]) >= COUENNE_EPS) // lower bound resL = updateBound (-1, l + ind, argument_->isInteger () ? ceil  (log (b)-COUENNE_EPS) : log (b)); if ((b = l [wind]) > 0.) // lower bound resL = updateBound (-1, l + ind, argument_->isInteger () ? ceil  (log (b)) : log (b)); if ((b = u [wind]) < COUENNE_INFINITY / 1e5) // upper bound resU = updateBound ( 1, u + ind, argument_->isInteger () ? floor (log (b)+COUENNE_EPS) : log (b)); else if (b < - COUENNE_EPS) { if ((b = u [wind]) < COIN_DBL_MAX / 10.) { // upper bound if ((b >= -0.) && (b < COUENNE_EPS)) // to prevent infeasibilities due to numerics b = COUENNE_EPS; resU = updateBound ( 1, u + ind, argument_ -> isInteger () ? floor (log (b)) : log (b)); } if (b < - COUENNE_EPS) { // make it infeasible resU = updateBound ( 1, u + ind, -1.) || true; } if (resL) chg [ind].setLower(t_chg_bounds::CHANGED); if (resU) chg [ind].setUpper(t_chg_bounds::CHANGED); if (resL) chg [ind].setLower (t_chg_bounds::CHANGED); if (resU) chg [ind].setUpper (t_chg_bounds::CHANGED); return (resL || resU);
• ## stable/0.2/Couenne/src/expression/operators/exprGroup.cpp

 r159 /// Generalized (static) constructor: check parameters and return a /// constant, a single variable, or a real exprGroup out << ' '; if      (coeff >   0.) out << '+' << coeff << "*"; else if (coeff < - 0.) out        << coeff << "*"; //else continue; if      (coeff >   0.) { out << '+'; if (coeff !=  1.) out <<  coeff << "*";} else if (coeff < - 0.) { out << '-'; if (coeff != -1.) out << -coeff << "*";} lcoeff_ [i]. first -> print (out, descend); arglist [nargs++] = arglist_ [i] -> differentiate (index); if ((nargs == 0) || (nargs == 1) && (fabs (totlin) > COUENNE_EPS)) { if ( (nargs == 0) || ((nargs == 1) && (fabs (totlin) > COUENNE_EPS))) { delete [] arglist; return new exprConst (totlin);
Note: See TracChangeset for help on using the changeset viewer.