Changeset 1598
 Timestamp:
 Aug 31, 2010 8:47:23 AM (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

stable/1.11/Clp/src/ClpPresolve.cpp
r1534 r1598 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.0e8) {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.0e8) {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.0e3) { 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.0e3) { 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_;
Note: See TracChangeset
for help on using the changeset viewer.