Changeset 1606
- Timestamp:
- Sep 20, 2010 4:53:00 PM (9 years ago)
- Location:
- stable/1.12/Clp/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
stable/1.12/Clp/src/CbcOrClpParam.cpp
r1525 r1606 2880 2880 parameters[numberParameters-1].append("1000"); 2881 2881 parameters[numberParameters-1].append("10000"); 2882 parameters[numberParameters-1].append("dj"); 2883 parameters[numberParameters-1].append("djbefore"); 2882 2884 parameters[numberParameters-1].setLonghelp 2883 2885 ( -
stable/1.12/Clp/src/ClpModel.hpp
r1525 r1606 750 750 double * infeasibilityRay() const; 751 751 double * unboundedRay() const; 752 /// just test if infeasibility or unbounded Ray exists 753 inline bool rayExists() const { 754 return (ray_!=NULL); 755 } 756 /// just delete ray if exists 757 inline void deleteRay() { 758 delete [] ray_; 759 ray_=NULL; 760 } 752 761 /// See if status (i.e. basis) array exists (partly for OsiClp) 753 762 inline bool statusExists() const { -
stable/1.12/Clp/src/ClpPresolve.cpp
r1551 r1606 1586 1586 result = 0; 1587 1587 1588 if (prob.status_ == 0 && paction_) { 1588 bool fixInfeasibility = (prob.presolveOptions_&16384)!=0; 1589 bool hasSolution = (prob.presolveOptions_&32768)!=0; 1590 if (prob.status_ == 0 && paction_ && (!hasSolution || !fixInfeasibility)) { 1589 1591 // Looks feasible but double check to see if anything slipped through 1590 1592 int n = prob.ncols_; … … 1595 1597 for (i = 0; i < n; i++) { 1596 1598 if (up[i] < lo[i]) { 1597 if (up[i] < lo[i] - 1.0e-8) {1599 if (up[i] < lo[i] - feasibilityTolerance && !fixInfeasibility) { 1598 1600 // infeasible 1599 1601 prob.status_ = 1; … … 1610 1612 for (i = 0; i < n; i++) { 1611 1613 if (up[i] < lo[i]) { 1612 if (up[i] < lo[i] - 1.0e-8) {1614 if (up[i] < lo[i] - feasibilityTolerance && !fixInfeasibility) { 1613 1615 // infeasible 1614 1616 prob.status_ = 1; … … 1628 1630 CoinMemcpyN( prob.colstat_, prob.ncols_, presolvedModel_->statusArray()); 1629 1631 CoinMemcpyN( prob.rowstat_, prob.nrows_, presolvedModel_->statusArray() + prob.ncols_); 1632 if (fixInfeasibility && hasSolution) { 1633 // Looks feasible but double check to see if anything slipped through 1634 int n = prob.ncols_; 1635 double * lo = prob.clo_; 1636 double * up = prob.cup_; 1637 double * rsol = prob.acts_; 1638 //memset(prob.acts_,0,prob.nrows_*sizeof(double)); 1639 presolvedModel_->matrix()->times(prob.sol_,rsol); 1640 int i; 1641 1642 for (i = 0; i < n; i++) { 1643 double gap=up[i]-lo[i]; 1644 if (rsol[i]<lo[i]-feasibilityTolerance&&fabs(rsol[i]-lo[i])<1.0e-3) { 1645 lo[i]=rsol[i]; 1646 if (gap<1.0e5) 1647 up[i]=lo[i]+gap; 1648 } else if (rsol[i]>up[i]+feasibilityTolerance&&fabs(rsol[i]-up[i])<1.0e-3) { 1649 up[i]=rsol[i]; 1650 if (gap<1.0e5) 1651 lo[i]=up[i]-gap; 1652 } 1653 if (up[i] < lo[i]) { 1654 up[i] = lo[i]; 1655 } 1656 } 1657 } 1658 1659 int n = prob.nrows_; 1660 double * lo = prob.rlo_; 1661 double * up = prob.rup_; 1662 1663 for (i = 0; i < n; i++) { 1664 if (up[i] < lo[i]) { 1665 if (up[i] < lo[i] - feasibilityTolerance && !fixInfeasibility) { 1666 // infeasible 1667 prob.status_ = 1; 1668 } else { 1669 up[i] = lo[i]; 1670 } 1671 } 1672 } 1630 1673 delete [] prob.sol_; 1631 1674 delete [] prob.acts_; -
stable/1.12/Clp/src/ClpSimplex.cpp
r1525 r1606 5313 5313 perturbation_ = savePerturbation; 5314 5314 baseIteration_ = numberIterations_; 5315 // Say second call 5316 moreSpecialOptions_ |= 256; 5315 5317 returnCode = static_cast<ClpSimplexPrimal *> (this)->primal(0); 5318 // Say not second call 5319 moreSpecialOptions_ &= ~256; 5316 5320 baseIteration_ = 0; 5317 5321 computeObjectiveValue(); … … 5596 5600 perturbation_ = savePerturbation; 5597 5601 if (problemStatus_ == 10) { 5598 if (!numberPrimalInfeasibilities_) 5602 if (!numberPrimalInfeasibilities_) { 5599 5603 problemStatus_ = 0; 5600 else 5604 numberDualInfeasibilities_ = 0; 5605 } else { 5601 5606 problemStatus_ = 4; 5607 } 5602 5608 } 5603 5609 } -
stable/1.12/Clp/src/ClpSimplexDual.cpp
r1525 r1606 5814 5814 int status = fastDual(alwaysFinish); 5815 5815 CoinAssert (problemStatus_ || objectiveValue_ < 1.0e50); 5816 #ifdef CLP_DEBUG 5817 printf("first status %d obj %g\n",problemStatus_,objectiveValue_); 5818 #endif 5819 if(problemStatus_==10) 5820 problemStatus_=3; 5816 5821 // make sure plausible 5817 5822 double obj = CoinMax(objectiveValue_, saveObjectiveValue); … … 5826 5831 status = problemStatus_; 5827 5832 } 5833 if (problemStatus_ == 3) 5834 status = 2; 5828 5835 if (status || (problemStatus_ == 0 && !isDualObjectiveLimitReached())) { 5829 5836 objectiveChange = obj - saveObjectiveValue; … … 5832 5839 status = 1; 5833 5840 } 5834 if (problemStatus_ == 3)5835 status = 2;5836 5841 5837 5842 if (scalingFlag_ <= 0) { … … 5879 5884 // Start of fast iterations 5880 5885 status = fastDual(alwaysFinish); 5886 CoinAssert (problemStatus_||objectiveValue_<1.0e50); 5887 #ifdef CLP_DEBUG 5888 printf("second status %d obj %g\n",problemStatus_,objectiveValue_); 5889 #endif 5890 if(problemStatus_==10) 5891 problemStatus_=3; 5881 5892 // make sure plausible 5882 5893 obj = CoinMax(objectiveValue_, saveObjectiveValue); … … 5891 5902 status = problemStatus_; 5892 5903 } 5904 if (problemStatus_ == 3) 5905 status = 2; 5893 5906 if (status || (problemStatus_ == 0 && !isDualObjectiveLimitReached())) { 5894 5907 objectiveChange = obj - saveObjectiveValue; … … 5897 5910 status = 1; 5898 5911 } 5899 if (problemStatus_ == 3)5900 status = 2;5901 5912 if (scalingFlag_ <= 0) { 5902 5913 CoinMemcpyN(solution_, numberColumns_, outputSolution[iSolution]); … … 7142 7153 jSequence -= numberColumns_; 7143 7154 } 7155 #ifdef CLP_INVESTIGATE 7144 7156 double lowerValue = tempLower[iSequence]; 7145 7157 double upperValue = tempUpper[iSequence]; 7146 #ifdef CLP_INVESTIGATE7147 7158 printf("*** movement>1.0e30 for %c%d %g <= %g <= %g true %g, %g - status %d\n", 7148 7159 RC, jSequence, lower_[iSequence], solution_[iSequence], -
stable/1.12/Clp/src/ClpSimplexPrimal.cpp
r1551 r1606 1456 1456 problemStatus_ = 10; // try dual 1457 1457 // See if second call 1458 if ((moreSpecialOptions_ & 256) != 0 ) {1458 if ((moreSpecialOptions_ & 256) != 0||nonLinearCost_->numberInfeasibilities()>1.0e2) { 1459 1459 numberPrimalInfeasibilities_ = nonLinearCost_->numberInfeasibilities(); 1460 1460 sumPrimalInfeasibilities_ = nonLinearCost_->sumInfeasibilities();
Note: See TracChangeset
for help on using the changeset viewer.