Skip to content

Commit

Permalink
Use CoinBronKerbosch::PivotingStrategy enum
Browse files Browse the repository at this point in the history
  • Loading branch information
a-andre authored and tkralphs committed Aug 13, 2024
1 parent 50c612f commit 38e3568
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/CbcSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,8 @@ int CbcMain1(std::deque<std::string> inputQueue, CbcModel &model,
std::string cgraphMode = "on";
std::string clqstrMode = "after";
CglBKClique bkCliqueGen;
int bkPivotingStrategy = 3, maxCallsBK = 1000, bkClqExtMethod = 4;
CoinBronKerbosch::PivotingStrategy bkPivotingStrategy = CoinBronKerbosch::PivotingStrategy::Weight;
int maxCallsBK = 1000, bkClqExtMethod = 4;
int cliqueMode = parameters[CbcParam::CLIQUECUTS]->modeVal();
int oldCliqueMode = cliqueMode;
CglOddWheel oddWheelGen;
Expand Down Expand Up @@ -2205,7 +2206,7 @@ int CbcMain1(std::deque<std::string> inputQueue, CbcModel &model,
} else if (cbcParamCode == CbcParam::AGGREGATEMIXED) {
mixedRoundStrategy = iValue;
} else if (cbcParamCode == CbcParam::BKPIVOTINGSTRATEGY) {
bkPivotingStrategy = iValue;
bkPivotingStrategy = static_cast<CoinBronKerbosch::PivotingStrategy>(iValue);
} else if (cbcParamCode == CbcParam::BKMAXCALLS) {
maxCallsBK = iValue;
} else if (cbcParamCode == CbcParam::BKCLQEXTMETHOD) {
Expand Down Expand Up @@ -3690,7 +3691,7 @@ int CbcMain1(std::deque<std::string> inputQueue, CbcModel &model,
CglBKClique bkClique;
bkClique.setMaxCallsBK(1000);
bkClique.setExtendingMethod(4);
bkClique.setPivotingStrategy(3);
bkClique.setPivotingStrategy(CoinBronKerbosch::PivotingStrategy::Weight);
cbcModel->addCutGenerator(&bkClique, -98, "Clique", true,
false, false, -100, -1, -1);
cbcModel->cutGenerator(numCutGens++)->setTiming(true);
Expand Down
4 changes: 2 additions & 2 deletions src/CbcStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void CbcStrategyDefault::setupCutGenerators(CbcModel &model)
CglBKClique generator5;
generator5.setMaxCallsBK(1000);
generator5.setExtendingMethod(4);
generator5.setPivotingStrategy(3);
generator5.setPivotingStrategy(CoinBronKerbosch::PivotingStrategy::Weight);

CglMixedIntegerRounding2 mixedGen;
CglFlowCover flowGen;
Expand Down Expand Up @@ -711,7 +711,7 @@ void CbcStrategyDefaultSubTree::setupCutGenerators(CbcModel &model)
CglBKClique generator5;
generator5.setMaxCallsBK(1000);
generator5.setExtendingMethod(4);
generator5.setPivotingStrategy(3);
generator5.setPivotingStrategy(CoinBronKerbosch::PivotingStrategy::Weight);

CglMixedIntegerRounding2 mixedGen;
CglFlowCover flowGen;
Expand Down

0 comments on commit 38e3568

Please sign in to comment.