# Changeset 1047

Ignore:
Timestamp:
Jan 19, 2014 7:22:31 PM (6 years ago)
Message:

fix inequality-based auxiliaries for exprTrilinear

Location:
trunk/Couenne/src
Files:
4 edited

Unmodified
Removed
• ## trunk/Couenne/src/bound_tightening/operators/impliedBounds-exprPow.cpp

 r1042 CouNumber lb = wl, ub = wu; //printf ("should be here: wl=%g wu=%g k=%g, signpow=%d safepow = %g\n", wl, wu, k, issignpower_, safe_pow (wl, 1./k, issignpower_)); if (k < 0) { // swap bounds as they swap on the curve x^k when lb = wu;
• ## trunk/Couenne/src/bound_tightening/operators/impliedBounds-exprTrilinear.cpp

 r560 return false; }
• ## trunk/Couenne/src/convex/operators/conv-exprTrilinear-gencuts.cpp

 r597 ind[i] = new int[6]; } int *ibnd; ibnd = new int[3]; // compute the permutations of the 3 variables ibnd[0] = v1; ibnd[1] = v2; ibnd[2] = v3; ind[0][0] = ibnd[0]; ind[0][1] = ibnd[1]; ind[0][2] = ibnd[2]; ind[1][0] = ibnd[1]; ind[1][1] = ibnd[0]; ind[1][2] = ibnd[2]; ind[0][0] = ibnd[0]; ind[0][1] = ibnd[1]; ind[0][2] = ibnd[2]; ind[1][0] = ibnd[1]; ind[1][1] = ibnd[0]; ind[1][2] = ibnd[2]; int i, flagg=0, idx=0; i = 0; expression **args = w -> Image () -> ArgList (); int *varInd = new int [4]; int varInd [4]; for (int i=0; i<3; i++) double *coe = new double [size]; // Fix right hand sides: all cuts have coefficients of w equal to // one, but they might be inequality-type auxiliaries. exprAux *waux = dynamic_cast (w); if (waux) { if      (waux -> sign () == expression::AUX_LEQ) cutLb [i] = - COUENNE_INFINITY; else if (waux -> sign () == expression::AUX_GEQ) cutUb [i] =   COUENNE_INFINITY; } std::copy (cutIndices [i].begin (), cutIndices [i].end (), ind); cs.insert (cut); } delete [] varInd; //delete [] varInd; }
• ## trunk/Couenne/src/convex/operators/conv-exprTrilinear.cpp

 r490 CouNumber *lbA = new CouNumber [3], *ubA = new CouNumber [3]; lbA [3], ubA [3]; for (int i=0; i<3; i++) for (int i2 = 0; i2 < 2; i2++) { double curbound = register double curbound = (i0 ? ubA [0] : lbA [0]) * (i1 ? ubA [1] : lbA [1]) * if (curbound > ub) ub = curbound; } delete [] lbA; delete [] ubA; }
Note: See TracChangeset for help on using the changeset viewer.