Ignore:
Timestamp:
May 10, 2011 8:33:58 AM (8 years ago)
Author:
forrest
Message:

messages for fathoming plus soem attempts at robustness

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcSimpleIntegerDynamicPseudoCost.cpp

    r1573 r1650  
    615615#endif
    616616    double sum;
     617#ifndef INFEAS_MULTIPLIER
     618#define INFEAS_MULTIPLIER 1.0
     619#endif
    617620    double number;
    618621    double downCost = CoinMax(value - below, 0.0);
     
    621624    number = numberTimesDown_;
    622625#if INFEAS==1
    623     sum += numberTimesDownInfeasible_ * CoinMax(distanceToCutoff / (downCost + 1.0e-12), sumDownCost_);
     626    sum += INFEAS_MULTIPLIER*numberTimesDownInfeasible_ * CoinMax(distanceToCutoff / (downCost + 1.0e-12), sumDownCost_);
    624627#endif
    625628#elif TYPE2==1
     
    627630    number = sumDownChange_;
    628631#if INFEAS==1
    629     sum += numberTimesDownInfeasible_ * CoinMax(distanceToCutoff / (downCost + 1.0e-12), sumDownCost_);
     632    sum += INFEAS_MULTIPLIER*numberTimesDownInfeasible_ * CoinMax(distanceToCutoff / (downCost + 1.0e-12), sumDownCost_);
    630633#endif
    631634#elif TYPE2==2
    632635    abort();
    633636#if INFEAS==1
    634     sum += numberTimesDownInfeasible_ * (distanceToCutoff / (downCost + 1.0e-12));
     637    sum += INFEAS_MULTIPLIER*numberTimesDownInfeasible_ * (distanceToCutoff / (downCost + 1.0e-12));
    635638#endif
    636639#endif
     
    661664    number = numberTimesUp_;
    662665#if INFEAS==1
    663     sum += numberTimesUpInfeasible_ * CoinMax(distanceToCutoff / (upCost + 1.0e-12), sumUpCost_);
     666    sum += INFEAS_MULTIPLIER*numberTimesUpInfeasible_ * CoinMax(distanceToCutoff / (upCost + 1.0e-12), sumUpCost_);
    664667#endif
    665668#elif TYPE2==1
     
    667670    number = sumUpChange_;
    668671#if INFEAS==1
    669     sum += numberTimesUpInfeasible_ * CoinMax(distanceToCutoff / (upCost + 1.0e-12), sumUpCost_);
     672    sum += INFEAS_MULTIPLIER*numberTimesUpInfeasible_ * CoinMax(distanceToCutoff / (upCost + 1.0e-12), sumUpCost_);
    670673#endif
    671674#elif TYPE2==1
    672675    abort();
    673676#if INFEAS==1
    674     sum += numberTimesUpInfeasible_ * (distanceToCutoff / (upCost + 1.0e-12));
     677    sum += INFEAS_MULTIPLIER*numberTimesUpInfeasible_ * (distanceToCutoff / (upCost + 1.0e-12));
    675678#endif
    676679#endif
     
    10971100        if (distanceToCutoff > 1.0e20)
    10981101            distanceToCutoff = 10.0 + fabs(originalValue);
    1099         sum += numberTimesDownInfeasible_ * CoinMax(distanceToCutoff, 1.0e-12 * (1.0 + fabs(originalValue)));
     1102        sum += INFEAS_MULTIPLIER*numberTimesDownInfeasible_ * CoinMax(distanceToCutoff, 1.0e-12 * (1.0 + fabs(originalValue)));
    11001103        setDownDynamicPseudoCost(sum / static_cast<double> (number));
    11011104#endif
     
    11601163        if (distanceToCutoff > 1.0e20)
    11611164            distanceToCutoff = 10.0 + fabs(originalValue);
    1162         sum += numberTimesUpInfeasible_ * CoinMax(distanceToCutoff, 1.0e-12 * (1.0 + fabs(originalValue)));
     1165        sum += INFEAS_MULTIPLIER*numberTimesUpInfeasible_ * CoinMax(distanceToCutoff, 1.0e-12 * (1.0 + fabs(originalValue)));
    11631166        setUpDynamicPseudoCost(sum / static_cast<double> (number));
    11641167#endif
     
    12761279        sum = sumDownCost();
    12771280        number = numberTimesDown();
    1278         sum += numberTimesDownInfeasible() * (distanceToCutoff / (downCost + 1.0e-12));
     1281        sum += INFEAS_MULTIPLIER*numberTimesDownInfeasible() * (distanceToCutoff / (downCost + 1.0e-12));
    12791282        if (number > 0)
    12801283            downCost *= sum / static_cast<double> (number);
     
    12851288        sum = sumUpCost();
    12861289        number = numberTimesUp();
    1287         sum += numberTimesUpInfeasible() * (distanceToCutoff / (upCost + 1.0e-12));
     1290        sum += INFEAS_MULTIPLIER*numberTimesUpInfeasible() * (distanceToCutoff / (upCost + 1.0e-12));
    12881291        if (number > 0)
    12891292            upCost *= sum / static_cast<double> (number);
Note: See TracChangeset for help on using the changeset viewer.