Changeset 195 for trunk/CbcStrategy.cpp


Ignore:
Timestamp:
Oct 13, 2005 3:29:40 PM (14 years ago)
Author:
forrest
Message:

stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CbcStrategy.cpp

    r182 r195  
    2222#include "CglClique.hpp"
    2323#include "CglFlowCover.hpp"
    24 #include "CglMixedIntegerRounding.hpp"
     24#include "CglMixedIntegerRounding2.hpp"
    2525
    2626// Heuristics
     
    111111  generator5.setRowCliqueReport(false);
    112112
    113   CglMixedIntegerRounding mixedGen;
     113  CglMixedIntegerRounding2 mixedGen;
    114114  CglFlowCover flowGen;
    115115 
     
    178178  for (iGenerator=0;iGenerator<numberGenerators;iGenerator++) {
    179179    CglCutGenerator * generator = model.cutGenerator(iGenerator)->generator();
    180     CglMixedIntegerRounding * cgl = dynamic_cast<CglMixedIntegerRounding *>(generator);
    181     if (cgl) {
    182       found=true;
    183       break;
    184     }
    185   }
    186   if (!found)
    187     model.addCutGenerator(&mixedGen,setting,"MixedIntegerRounding");
     180    CglMixedIntegerRounding2 * cgl = dynamic_cast<CglMixedIntegerRounding2 *>(generator);
     181    if (cgl) {
     182      found=true;
     183      break;
     184    }
     185  }
     186  if (!found)
     187    model.addCutGenerator(&mixedGen,setting,"MixedIntegerRounding2");
    188188  // Say we want timings
    189189  int newNumberGenerators = model.numberCutGenerators();
     
    321321  generator5.setRowCliqueReport(false);
    322322
    323   CglMixedIntegerRounding mixedGen;
     323  CglMixedIntegerRounding2 mixedGen;
    324324  CglFlowCover flowGen;
    325325 
     
    331331  bool found;
    332332  found=false;
     333  int howOften=0;
    333334  for (iGenerator=0;iGenerator<numberParentGenerators;iGenerator++) {
    334335    CglCutGenerator * generator = parentModel_->cutGenerator(iGenerator)->generator();
     
    336337    if (cgl) {
    337338      found=true;
    338       break;
    339     }
    340   }
    341   if (found) {
     339      howOften = parentModel_->cutGenerator(iGenerator)->howOften();
     340      break;
     341    }
     342  }
     343  if (found&&howOften>=0) {
    342344    found=false;
    343345    for (iGenerator=0;iGenerator<numberGenerators;iGenerator++) {
     
    358360    if (cgl) {
    359361      found=true;
    360       break;
    361     }
    362   }
    363   if (found) {
     362      howOften = parentModel_->cutGenerator(iGenerator)->howOften();
     363      break;
     364    }
     365  }
     366  if (found&&howOften>=0) {
    364367    found=false;
    365368    for (iGenerator=0;iGenerator<numberGenerators;iGenerator++) {
     
    380383    if (cgl) {
    381384      found=true;
    382       break;
    383     }
    384   }
    385   if (found) {
     385      howOften = parentModel_->cutGenerator(iGenerator)->howOften();
     386      break;
     387    }
     388  }
     389  if (found&&howOften>=0) {
    386390    found=false;
    387391    for (iGenerator=0;iGenerator<numberGenerators;iGenerator++) {
     
    402406    if (cgl) {
    403407      found=true;
    404       break;
    405     }
    406   }
    407   if (found) {
     408      howOften = parentModel_->cutGenerator(iGenerator)->howOften();
     409      break;
     410    }
     411  }
     412  if (found&&howOften>=0) {
    408413    found=false;
    409414    for (iGenerator=0;iGenerator<numberGenerators;iGenerator++) {
     
    424429    if (cgl) {
    425430      found=true;
    426       break;
    427     }
    428   }
    429   if (found) {
     431      howOften = parentModel_->cutGenerator(iGenerator)->howOften();
     432      break;
     433    }
     434  }
     435  if (found&&howOften>=0) {
    430436    found=false;
    431437    for (iGenerator=0;iGenerator<numberGenerators;iGenerator++) {
     
    443449  for (iGenerator=0;iGenerator<numberParentGenerators;iGenerator++) {
    444450    CglCutGenerator * generator = parentModel_->cutGenerator(iGenerator)->generator();
    445     CglMixedIntegerRounding * cgl = dynamic_cast<CglMixedIntegerRounding *>(generator);
    446     if (cgl) {
    447       found=true;
    448       break;
    449     }
    450   }
    451   if (found) {
     451    CglMixedIntegerRounding2 * cgl = dynamic_cast<CglMixedIntegerRounding2 *>(generator);
     452    if (cgl) {
     453      found=true;
     454      howOften = parentModel_->cutGenerator(iGenerator)->howOften();
     455      break;
     456    }
     457  }
     458  if (found&&howOften>=0) {
    452459    found=false;
    453460    for (iGenerator=0;iGenerator<numberGenerators;iGenerator++) {
    454461      CglCutGenerator * generator = model.cutGenerator(iGenerator)->generator();
    455       CglMixedIntegerRounding * cgl = dynamic_cast<CglMixedIntegerRounding *>(generator);
     462      CglMixedIntegerRounding2 * cgl = dynamic_cast<CglMixedIntegerRounding2 *>(generator);
    456463      if (cgl) {
    457464        found=true;
     
    460467    }
    461468    if (!found)
    462       model.addCutGenerator(&mixedGen,setting,"MixedIntegerRounding");
     469      model.addCutGenerator(&mixedGen,setting,"MixedIntegerRounding2");
    463470  }
    464471  // Say we want timings
Note: See TracChangeset for help on using the changeset viewer.