Changeset 1236


Ignore:
Timestamp:
Sep 29, 2009 1:52:40 PM (10 years ago)
Author:
forrest
Message:

add pivot and complement

Location:
trunk/Cbc/src
Files:
2 added
3 edited

Legend:

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

    r1232 r1236  
    166166#include "CbcHeuristicLocal.hpp"
    167167#include "CbcHeuristicPivotAndFix.hpp"
     168#include "CbcHeuristicPivotAndComplement.hpp"
    168169#include "CbcHeuristicRandRound.hpp"
    169170#include "CbcHeuristicGreedy.hpp"
     
    522523  parameters_[whichParam(COMBINE,numberParameters_,parameters_)].setCurrentOption("on");
    523524  parameters_[whichParam(CROSSOVER2,numberParameters_,parameters_)].setCurrentOption("off");
     525  parameters_[whichParam(PIVOTANDCOMPLEMENT,numberParameters_,parameters_)].setCurrentOption("off");
    524526  parameters_[whichParam(PIVOTANDFIX,numberParameters_,parameters_)].setCurrentOption("off");
    525527  parameters_[whichParam(RANDROUND,numberParameters_,parameters_)].setCurrentOption("off");
     
    32583260  parameters[whichParam(COMBINE,numberParameters,parameters)].setCurrentOption("on");
    32593261  parameters[whichParam(CROSSOVER2,numberParameters,parameters)].setCurrentOption("off");
     3262  parameters[whichParam(PIVOTANDCOMPLEMENT,numberParameters,parameters)].setCurrentOption("off");
    32603263  parameters[whichParam(PIVOTANDFIX,numberParameters,parameters)].setCurrentOption("off");
    32613264  parameters[whichParam(RANDROUND,numberParameters,parameters)].setCurrentOption("off");
     
    32953298  int useCombine = parameters_[whichParam(COMBINE,numberParameters_,parameters_)].currentOptionAsInteger();
    32963299  int useCrossover = parameters_[whichParam(CROSSOVER2,numberParameters_,parameters_)].currentOptionAsInteger();
    3297   int usePivot = parameters_[whichParam(PIVOTANDFIX,numberParameters_,parameters_)].currentOptionAsInteger();
     3300  int usePivotC = parameters_[whichParam(PIVOTANDCOMPLEMENT,numberParameters_,parameters_)].currentOptionAsInteger();
     3301  int usePivotF = parameters_[whichParam(PIVOTANDFIX,numberParameters_,parameters_)].currentOptionAsInteger();
    32983302  int useRand = parameters_[whichParam(RANDROUND,numberParameters_,parameters_)].currentOptionAsInteger();
    32993303  int useRINS = parameters_[whichParam(RINS,numberParameters_,parameters_)].currentOptionAsInteger();
     
    36073611    anyToDo=true;
    36083612  }
    3609   if (usePivot>=type&&usePivot<=kType+1) {
     3613  if (usePivotC>=type&&usePivotC<=kType+1) {
     3614    CbcHeuristicPivotAndComplement heuristic(*model);
     3615    heuristic.setHeuristicName("pivot and complement");
     3616    heuristic.setFractionSmall(10.0); // normally 0.5
     3617    model->addHeuristic(&heuristic);
     3618    anyToDo=true;
     3619  }
     3620  if (usePivotF>=type&&usePivotF<=kType+1) {
    36103621    CbcHeuristicPivotAndFix heuristic(*model);
    36113622    heuristic.setHeuristicName("pivot and fix");
     
    50795090            case DIVINGV:
    50805091            case COMBINE:
     5092            case PIVOTANDCOMPLEMENT:
    50815093            case PIVOTANDFIX:
    50825094            case RANDROUND:
  • trunk/Cbc/src/Makefile.am

    r1166 r1236  
    4646        CbcHeuristicLocal.cpp CbcHeuristicLocal.hpp \
    4747        CbcHeuristicPivotAndFix.cpp CbcHeuristicPivotAndFix.hpp \
     48        CbcHeuristicPivotAndComplement.cpp CbcHeuristicPivotAndComplement.hpp \
    4849        CbcHeuristicRandRound.cpp CbcHeuristicRandRound.hpp \
    4950        CbcHeuristicRINS.cpp CbcHeuristicRINS.hpp \
     
    331332        CbcHeuristicLocal.hpp \
    332333        CbcHeuristicPivotAndFix.hpp \
     334        CbcHeuristicPivotAndComplement.hpp \
    333335        CbcHeuristicRandRound.hpp \
    334336        CbcHeuristicRINS.hpp \
  • trunk/Cbc/src/Makefile.in

    r1210 r1236  
    172172        CbcHeuristicDiveVectorLength.lo CbcHeuristicFPump.lo \
    173173        CbcHeuristicGreedy.lo CbcHeuristicLocal.lo \
    174         CbcHeuristicPivotAndFix.lo CbcHeuristicRandRound.lo \
    175         CbcHeuristicRINS.lo CbcMessage.lo CbcModel.lo CbcNode.lo \
    176         CbcStatistics.lo CbcStrategy.lo CbcTree.lo CbcTreeLocal.lo
     174        CbcHeuristicPivotAndFix.lo CbcHeuristicPivotAndComplement.lo \
     175        CbcHeuristicRandRound.lo CbcHeuristicRINS.lo CbcMessage.lo \
     176        CbcModel.lo CbcNode.lo CbcStatistics.lo CbcStrategy.lo \
     177        CbcTree.lo CbcTreeLocal.lo
    177178libCbc_la_OBJECTS = $(am_libCbc_la_OBJECTS)
    178179libCbcSolver_la_LIBADD =
     
    533534        CbcHeuristicLocal.cpp CbcHeuristicLocal.hpp \
    534535        CbcHeuristicPivotAndFix.cpp CbcHeuristicPivotAndFix.hpp \
     536        CbcHeuristicPivotAndComplement.cpp CbcHeuristicPivotAndComplement.hpp \
    535537        CbcHeuristicRandRound.cpp CbcHeuristicRandRound.hpp \
    536538        CbcHeuristicRINS.cpp CbcHeuristicRINS.hpp \
     
    680682        CbcHeuristicLocal.hpp \
    681683        CbcHeuristicPivotAndFix.hpp \
     684        CbcHeuristicPivotAndComplement.hpp \
    682685        CbcHeuristicRandRound.hpp \
    683686        CbcHeuristicRINS.hpp \
     
    840843@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CbcHeuristicGreedy.Plo@am__quote@
    841844@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CbcHeuristicLocal.Plo@am__quote@
     845@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CbcHeuristicPivotAndComplement.Plo@am__quote@
    842846@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CbcHeuristicPivotAndFix.Plo@am__quote@
    843847@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CbcHeuristicRINS.Plo@am__quote@
Note: See TracChangeset for help on using the changeset viewer.