|
Go to the documentation of this file.
45 int ninfeasibilities = 0;
48 for( int i = 0; i < dim(); ++i )
64 if( ninfeasibilities > sparsitythreshold )
84 (*spxout) << " --- using hypersparse pricing, ";
86 (* spxout) << " --- using sparse pricing, ";
87 (*spxout) << "sparsity: "
88 << std::setw(6) << std::fixed << std::setprecision(4)
89 << ( Real) ninfeasibilities/ dim()
90 << std::scientific << std::setprecision( int(prec))
101 assert(&ftest == & fTest());
107 for ( int j = idx. size() - 1; j >= 0; --j)
109 int i = idx. index(j);
135 if( (* solveVector3)[i] > eps || (*solveVector3)[i] < -eps )
167 leaveId = baseId(leaveIdx);
195 assert( lhs(leaveNum) == rhs(leaveNum));
196 leavebound = - rhs(leaveNum);
205 leavebound = - rhs(leaveNum);
212 leavebound = - lhs(leaveNum);
222 leavebound = - lhs(leaveNum);
230 leavebound = - rhs(leaveNum);
239 MSG_DEBUG( std::cout << "DLEAVE51 SPxSolver::getLeaveVals() : row " << leaveNum
242 << " objChange: " << objChange
287 objChange += maxObj(leaveNum) * leavebound;
297 objChange += theUCbound[leaveNum] * leavebound;
304 objChange += theLCbound[leaveNum] * leavebound;
313 objChange += theUCbound[leaveNum] * leavebound;
321 objChange += theLCbound[leaveNum] * leavebound;
329 MSG_DEBUG( std::cout << "DLEAVE52 SPxSolver::getLeaveVals() : col " << leaveNum
332 << " objChange: " << objChange
405 newUBbound = - lhs(idx);
406 newLBbound = - rhs(idx);
407 enterBound = - rhs(idx);
408 objChange -= newCoPrhs * rhs(idx);
416 newLBbound = - rhs(idx);
417 newUBbound = - lhs(idx);
418 enterBound = - lhs(idx);
419 objChange -= newCoPrhs * lhs(idx);
426 MSG_ERROR( std::cerr << "ELEAVE53 ERROR: not yet debugged!" << std::endl; )
437 << "ERROR! Tried to put a fixed row variable into the basis: "
439 << ", lhs=" << lhs(idx)
440 << ", rhs=" << rhs(idx) << std::endl; )
446 MSG_DEBUG( std::cout << "DLEAVE55 SPxSolver::getLeaveVals2(): row " << idx
449 << " objChange: " << objChange
509 objChange -= newCoPrhs * enterBound;
520 objChange -= newCoPrhs * enterBound;
536 << "ERROR! Tried to put a fixed column variable into the basis. "
538 << ", lower=" << lower(idx)
539 << ", upper=" << upper(idx) << std::endl; )
545 MSG_DEBUG( std::cout << "DLEAVE57 SPxSolver::getLeaveVals2(): col " << idx
548 << " objChange: " << objChange
564 MSG_DEBUG( std::cout << "DLEAVE58 rejectLeave() : row " << leaveNum
566 << " -> " << leaveStat << std::endl; )
579 MSG_DEBUG( std::cout << "DLEAVE59 rejectLeave() : col " << leaveNum
581 << " -> " << leaveStat << std::endl; )
597 assert(leaveIdx < dim() && leaveIdx >= 0);
613 #ifdef ENABLE_ADDITIONAL_CHECKS
624 << ": coPvec.delta error = " << tmp. length()
641 Real objChange = 0.0;
643 getLeaveVals(leaveIdx, leaveStat, leaveId, leaveMax, leavebound, leaveNum, objChange);
657 Real enterVal = leaveMax;
663 MSG_DEBUG( std::cout << "DLEAVE71 trigger recomputation of nonbasic value due to shifts in ratiotest" << std::endl; )
685 if (enterVal != leaveMax)
687 MSG_DEBUG( std::cout << "DLEAVE61 rejecting leave A (leaveIdx=" << leaveIdx
688 << ", theCoTest=" << theCoTest[leaveIdx] << ")"
705 instableLeaveNum = leaveIdx;
718 << "leave() for feasibility test" << std::endl; )
730 MSG_INFO3( (* spxout), (* spxout) << "ILEAVE11 clean up step to reduce numerical errors" << std::endl; )
739 << "in leave()" << std::endl; )
750 sign = (enterVal > 0 ? -1 : +1);
764 if (enterId != baseId(leaveIdx))
785 << "breakpoints passed / bounds flipped = " << boundflips
812 << "breakpoints passed / bounds flipped = " << boundflips
819 #ifdef ENABLE_ADDITIONAL_CHECKS
842 << "in leave()" << std::endl; )
855 sign = (enterVal > 0 ? 1.0 : -1.0);
869 sign = (enterVal > 0 ? -1.0 : +1.0);
882 rejectLeave(leaveNum, leaveId, leaveStat, &newVector);
886 MSG_DEBUG( std::cout << "DLEAVE63 rejecting leave B (leaveIdx=" << leaveIdx
888 << ")" << std::endl; )
909 getLeaveVals2(leaveMax, enterId, enterBound, newUBbound, newLBbound, newCoPrhs, objChange);
921 (*theCoPrhs)[leaveIdx] = newCoPrhs;
960 change(leaveIdx, none, 0);
967 (*theCoPrhs)[leaveIdx] = theLRbound[leaveNum];
972 (*theCoPrhs)[leaveIdx] = theLCbound[leaveNum];
983 (*theCoPrhs)[leaveIdx] = theURbound[leaveNum];
988 (*theCoPrhs)[leaveIdx] = theUCbound[leaveNum];
1015 #ifdef ENABLE_ADDITIONAL_CHECKS
1025 << ": fVec error = " << tmp. length() << std::endl; )
|