 Timestamp:
 Dec 10, 2017 12:25:59 PM (2 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Couenne/src/bound_tightening/FixPointGenCuts.cpp
r1232 r1234 171 171 for (int j=0; j<m; j++) { // for each row 172 172 173 int nEl = A > getVectorSize (j); // # elements in each row 173 const int nEl = A>getVectorLast(j)  A>getVectorFirst(j), // A > getVectorSize (j); // # elements in each row 174 *rind = &ind [A>getVectorFirst (j)]; 175 const double *rcoe = &coe [A>getVectorFirst (j)]; 174 176 175 177 if (!nEl) … … 181 183 182 184 for (int i=0; i<nEl; i++) { 183 printf ("%+g x%d ", coe [i],ind [i]);185 printf ("%+g x%d ", rcoe [i], rind [i]); 184 186 fflush (stdout); 185 187 } … … 191 193 192 194 if (extendedModel_  rlb [j] > COUENNE_INFINITY) 193 for (int i =0; i<nEl; i++)194 createRow (1, ind [i], n, fplp, ind,coe, rlb [j], nEl, extendedModel_, j, m + nCuts); // downward constraints  on x_i195 for (int i = A>getVectorFirst(j); i < A>getVectorLast(j); i++) 196 createRow (1, ind [i], n, fplp, rind, rcoe, rlb [j], nEl, extendedModel_, j, m + nCuts); // downward constraints  on x_i 195 197 196 198 if (extendedModel_  rub [j] < COUENNE_INFINITY) 197 for (int i =0; i<nEl; i++)198 createRow (+1, ind [i], n, fplp, ind,coe, rub [j], nEl, extendedModel_, j, m + nCuts); // downward constraints  on x_i199 for (int i = A>getVectorFirst(j); i < A>getVectorLast(j); i++) 200 createRow (+1, ind [i], n, fplp, rind, rcoe, rub [j], nEl, extendedModel_, j, m + nCuts); // downward constraints  on x_i 199 201 200 202 // create (at most 2) cuts for the bL and bU elements ////////////////////// 201 203 202 204 if (extendedModel_) { 203 createRow (1, 2*n + j, n, fplp, ind, coe, rlb [j], nEl, extendedModel_, j, m + nCuts); // upward constraints  on bL_i 204 createRow (+1, 2*n + m + j, n, fplp, ind, coe, rub [j], nEl, extendedModel_, j, m + nCuts); // upward constraints  on bU_i 205 } 206 207 ind += nEl; 208 coe += nEl; 205 createRow (1, 2*n + j, n, fplp, rind, rcoe, rlb [j], nEl, extendedModel_, j, m + nCuts); // upward constraints  on bL_i 206 createRow (+1, 2*n + m + j, n, fplp, rind, rcoe, rub [j], nEl, extendedModel_, j, m + nCuts); // upward constraints  on bU_i 207 } 209 208 } 210 209 … … 244 243 createRow (+1, 2*n + m + nCuts + j, n, fplp, ind, coe, cut > ub (), nEl, extendedModel_, m + j, m + nCuts); // upward constraints  on bU_i 245 244 } 246 247 ind += nEl;248 coe += nEl;249 245 } 250 246
Note: See TracChangeset
for help on using the changeset viewer.