Ignore:
Timestamp:
Mar 16, 2009 6:30:25 AM (10 years ago)
Author:
forrest
Message:

chnages to try and make faster

File:
1 edited

Legend:

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

    r1121 r1132  
    8989
    9090// Default Constructor
    91 CbcStrategyDefault::CbcStrategyDefault(bool cutsOnlyAtRoot,
     91CbcStrategyDefault::CbcStrategyDefault(int cutsOnlyAtRoot,
    9292                                       int numberStrong,
    9393                                       int numberBeforeTrust,
     
    134134CbcStrategyDefault::setupCutGenerators(CbcModel & model)
    135135{
     136  if (cutsOnlyAtRoot_<0)
     137    return; // no cuts wanted
    136138  // Set up some cut generators and defaults
    137139  // Probing first as gets tight bounds on continuous
     
    592594  fprintf(fp,"0#include \"CbcStrategy.hpp\"\n");
    593595  fprintf(fp,"3  CbcStrategyDefault strategy(%s,%d,%d,%d);\n",
    594           cutsOnlyAtRoot_ ? "true" : "false",
     596          cutsOnlyAtRoot_ ? "1" : "0",
    595597          numberStrong_,
    596598          numberBeforeTrust_,
     
    601603// Default Constructor
    602604CbcStrategyDefaultSubTree::CbcStrategyDefaultSubTree(CbcModel * parent ,
    603                                                      bool cutsOnlyAtRoot,
     605                                                     int cutsOnlyAtRoot,
    604606                                       int numberStrong,
    605607                                       int numberBeforeTrust,
     
    645647{
    646648  // Set up some cut generators and defaults
     649  if (cutsOnlyAtRoot_<0)
     650    return; // no cuts wanted
    647651  // Probing first as gets tight bounds on continuous
    648652
     
    694698    }
    695699  }
    696   if (found&&howOften>=0) {
     700
     701  if (found&&(howOften>=-1||howOften==-98)) {
    697702    found=false;
    698703    for (iGenerator=0;iGenerator<numberGenerators;iGenerator++) {
     
    704709      }
    705710    }
    706     if (!found)
     711    if (!found) {
     712      if (howOften==-1)
     713        howOften=-98;
     714      else if (howOften==-98)
     715        howOften=-99;
    707716      model.addCutGenerator(&generator1,setting,"Probing");
     717      CbcCutGenerator * generator =
     718        model.cutGenerator(numberGenerators);
     719      generator->setHowOften(howOften);
     720      numberGenerators++;
     721    }
    708722  }
    709723  found=false;
Note: See TracChangeset for help on using the changeset viewer.