Ignore:
Timestamp:
Jan 14, 2009 4:19:37 PM (11 years ago)
Author:
forrest
Message:

compiler warnings, deterministic parallel and stability

File:
1 edited

Legend:

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

    r1088 r1121  
    530530    // probably best to use pseudo duals
    531531    double value = lastNonZero-firstNonZero+1;
    532     value *= 0.5/((double) numberMembers_);
     532    value *= 0.5/static_cast<double> (numberMembers_);
    533533    // adjust??
    534534    return value;
     
    724724      if (numberTimesDown_)
    725725        downCost *= downDynamicPseudoRatio_/
    726           ((double) numberTimesDown_);
     726          static_cast<double> (numberTimesDown_);
    727727      if (numberTimesUp_)
    728728        upCost *= upDynamicPseudoRatio_/
    729           ((double) numberTimesUp_);
     729          static_cast<double> (numberTimesUp_);
    730730#define WEIGHT_AFTER 0.7
    731731#define WEIGHT_BEFORE 0.1
     
    749749    } else {
    750750      double value = lastNonZero-firstNonZero+1;
    751       value *= 0.5/((double) numberMembers_);
     751      value *= 0.5/static_cast<double> (numberMembers_);
    752752      return value;
    753753    }
     
    30863086          if (numberNext<numberUnsatisfied) {
    30873087            int numberUp = numberUnsatisfied - numberInfeasibilitiesUp[i];
    3088             double perUnsatisfied = changeUp[i]/(double) numberUp;
     3088            double perUnsatisfied = changeUp[i]/static_cast<double> (numberUp);
    30893089            double estimatedObjective = objectiveValue + numberUnsatisfied * perUnsatisfied;
    30903090            if (estimatedObjective<cutoff)
     
    30943094          if (numberNext<numberUnsatisfied) {
    30953095            int numberDown = numberUnsatisfied - numberInfeasibilitiesDown[i];
    3096             double perUnsatisfied = changeDown[i]/(double) numberDown;
     3096            double perUnsatisfied = changeDown[i]/static_cast<double> (numberDown);
    30973097            double estimatedObjective = objectiveValue + numberUnsatisfied * perUnsatisfied;
    30983098            if (estimatedObjective<cutoff)
     
    32113211        if (numberNext<numberUnsatisfied) {
    32123212          int numberUp = numberUnsatisfied - numberInfeasibilitiesUp[i];
    3213           double perUnsatisfied = changeUp[i]/(double) numberUp;
     3213          double perUnsatisfied = changeUp[i]/static_cast<double> (numberUp);
    32143214          double estimatedObjective = objectiveValue + numberUnsatisfied * perUnsatisfied;
    32153215          if (estimatedObjective<bestEstimate) {
     
    32223222        if (numberNext<numberUnsatisfied) {
    32233223          int numberDown = numberUnsatisfied - numberInfeasibilitiesDown[i];
    3224           double perUnsatisfied = changeDown[i]/(double) numberDown;
     3224          double perUnsatisfied = changeDown[i]/static_cast<double> (numberDown);
    32253225          double estimatedObjective = objectiveValue + numberUnsatisfied * perUnsatisfied;
    32263226          if (estimatedObjective<bestEstimate) {
     
    33513351        }
    33523352        if (good)
    3353           rhs_[i]=(int) value;
     3353          rhs_[i]=static_cast<int> (value);
    33543354      }
    33553355    }
     
    34423442            numberUnsatisfied++;
    34433443        } else {
    3444           rhsValue -= (int)(value*floor(solValue+0.5));
     3444          rhsValue -= static_cast<int>(value*floor(solValue+0.5));
    34453445        }
    34463446      }
     
    46364636#endif
    46374637      for (int i=0;i<numberIntegers;i++) {
     4638#ifndef NDEBUG
    46384639        CbcSimpleIntegerDynamicPseudoCost * obj =
    46394640          dynamic_cast <CbcSimpleIntegerDynamicPseudoCost *>(objects[i]) ;
    46404641        assert (obj&&obj->columnNumber()==integerVariable[i]);
     4642#else
     4643        CbcSimpleIntegerDynamicPseudoCost * obj =
     4644          static_cast <CbcSimpleIntegerDynamicPseudoCost *>(objects[i]) ;
     4645#endif
    46414646        if (info->numberUp_[i]>0) {
    46424647          if (info->downPseudo_[i]>largest)
Note: See TracChangeset for help on using the changeset viewer.