|
SoPlex Doxygen Documentation
|
Go to the documentation of this file.
31 #define MAX_RELAX_COUNT 2
32 #define LONGSTEP_FREQ 100
33 #define MIN_LONGSTEP 1e-5
52 for( int i = 0; i < usedBp; ++i )
76 range = lower - upper;
83 range = upper - lower;
94 << " lower: " << lower
95 << " upper: " << upper
103 << " lower: " << lower
104 << " upper: " << upper
107 assert(fabs(range) < 1e20);
119 range = lower - upper;
126 range = upper - lower;
137 << " lower: " << lower
138 << " upper: " << upper
146 << " lower: " << lower
147 << " upper: " << upper
150 assert(fabs(range) < 1e20);
185 for( ; idx < last; ++idx )
193 Real y = upp[i] - vec[i];
201 if( curVal < minVal )
214 Real y = low[i] - vec[i];
222 if( curVal < minVal )
259 for( ; idx < last; ++idx )
267 Real y = low[i] - vec[i];
276 if( curVal < minVal )
289 Real y = upp[i] - vec[i];
297 if( curVal < minVal )
337 val = (max * x > 0) ? upp[idx] : low[idx];
338 val = (val - vec[idx]) / x;
339 if( upp[idx] == low[idx] )
342 if( vec[idx] > upp[idx] )
348 else if( (max > 0 && val < -degeneps) || (max < 0 && val > degeneps) )
365 val = (max * x > 0.0) ? upp[idx] : low[idx];
366 val = (val - vec[idx]) / x;
367 if( upp[idx] == low[idx] )
370 if( vec[idx] > upp[idx] )
376 else if( (max > 0 && val < -degeneps) || (max < 0 && val > degeneps) )
400 MSG_DEBUG( spxout << "ILSTEP06 resetting long step history" << std::endl; )
405 MSG_DEBUG( spxout << "ILSTEP07 switching to fast ratio test" << std::endl; )
499 for( usedBp = 0; usedBp < nBp && slope > 0; ++usedBp)
502 if( usedBp > sorted )
518 Real absupd = fabs(pupd[i]);
521 if( absupd > moststable )
536 Real absupd = fabs(cupd[i]);
538 if( absupd > moststable )
547 if( slope > delta && usedBp >= nBp - 1 )
550 << ": unboundedness in ratio test" << std::endl; )
558 << ": number of flip candidates: "
566 for( stableBp = usedBp + 1; stableBp < nBp; ++stableBp )
570 if( stableBp > sorted )
587 stableDelta = (x > 0.0) ? upb[idx] : lpb[idx];
588 stableDelta = (stableDelta - pvec[idx]) / x;
590 if( stableDelta <= bestDelta)
592 if( fabs(x) > moststable )
594 moststable = fabs(x);
599 else if( stableDelta > 2 * bestDelta )
612 stableDelta = (x > 0.0) ? ucb[idx] : lcb[idx];
613 stableDelta = (stableDelta - cvec[idx]) / x;
615 if( stableDelta <= bestDelta)
617 if( fabs(x) > moststable )
619 moststable = fabs(x);
625 else if( stableDelta > 2 * bestDelta )
636 bool foundStable= false;
641 if( moststable > stab )
646 foundStable = getData(val, enterId, idx, stab, degeneps, pupd, pvec, lpb, upb, PVEC, max);
648 foundStable = getData(val, enterId, idx, stab, degeneps, cupd, cvec, lcb, ucb, COPVEC, max);
658 << ": bound flip gain is too small"
662 while( breakpoints[usedBp].idx < 0 && usedBp < nBp )
672 while( !foundStable && usedBp >= 0 )
680 foundStable = getData(val, enterId, idx, stab, degeneps, pupd, pvec, lpb, upb, PVEC, max);
682 foundStable = getData(val, enterId, idx, stab, degeneps, cupd, cvec, lcb, ucb, COPVEC, max);
695 << ": no valid enterId found - relaxing..."
708 << " no valid enterId found - breaking..."
740 << " number of candidates: "
|