Changeset 1226
 Timestamp:
 Jul 9, 2008 10:16:39 AM (13 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Clp/src/ClpSimplex.cpp
r1224 r1226 1594 1594 //#define COMPUTE_INT_INFEAS 1595 1595 #ifdef COMPUTE_INT_INFEAS 1596 if (algorithm_>0&&integerType_&&! sumPrimalInfeasibilities_) {1596 if (algorithm_>0&&integerType_&&!nonLinearCost_>numberInfeasibilities()) { 1597 1597 if (fabs(theta_)>1.0e6!numberIterations_) { 1598 1598 int numberFixed=0; … … 1600 1600 int numberSat=0; 1601 1601 double sumUnsat=0.0; 1602 double tolerance = 10.0*primalTolerance_; 1603 double mostAway=0.0; 1604 int iAway=1; 1602 1605 for (int i=0;i<numberColumns_;i++) { 1603 1606 if (upper_[i]>lower_[i]) { 1604 double value = columnScale_ ? solution_[i]*columnScale_[i] : solution_[i]; 1605 double closest = floor(value+0.5); 1606 // problem may be perturbed so relax test 1607 if (fabs(valueclosest)>1.0e4) { 1608 numberUnsat++; 1609 sumUnsat += fabs(valueclosest); 1607 double value = solution_[i]; 1608 if (value>lower_[i]+tolerance&& 1609 value<upper_[i]tolerance) { 1610 if (columnScale_) 1611 value *= columnScale_[i]; 1612 double closest = floor(value+0.5); 1613 // problem may be perturbed so relax test 1614 if (fabs(valueclosest)>1.0e4) { 1615 numberUnsat++; 1616 sumUnsat += fabs(valueclosest); 1617 if (mostAway<fabs(valueclosest)) { 1618 mostAway=fabs(valueclosest); 1619 iAway=i; 1620 } 1621 } else { 1622 numberSat++; 1623 } 1610 1624 } else { 1611 1625 numberSat++; … … 1615 1629 } 1616 1630 } 1617 printf("iteration %d, %d unsatisfied (%g ), %d fixed, %d satisfied\n",1618 numberIterations_,numberUnsat,sumUnsat, numberFixed,numberSat);1631 printf("iteration %d, %d unsatisfied (%g,%g), %d fixed, %d satisfied\n", 1632 numberIterations_,numberUnsat,sumUnsat,mostAway,numberFixed,numberSat); 1619 1633 } 1620 1634 }
Note: See TracChangeset
for help on using the changeset viewer.