Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaslundell committed Jan 2, 2025
1 parent d0ce461 commit 137a6ab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ enum class ES_PrimalNLPStrategy
enum class ES_ReductionCutStrategy
{
Fraction,
GoldenSection
GoldenRatio
};

enum class ES_ReformulationBinaryMonomials
Expand Down
2 changes: 1 addition & 1 deletion src/Solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ void Solver::initializeSettings()

VectorString enumReductionCutStrategy;
enumReductionCutStrategy.push_back("Fraction");
enumReductionCutStrategy.push_back("GoldenSection");
enumReductionCutStrategy.push_back("GoldenRatio");

ES_ReductionCutStrategy reductionCutStrategy;

Expand Down
7 changes: 6 additions & 1 deletion src/Tasks/TaskAddPrimalReductionCut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void TaskAddPrimalReductionCut::run()
}
}
else if(env->settings->getSetting<int>("ReductionCut.Strategy", "Dual")
== (int)ES_ReductionCutStrategy::GoldenSection)
== (int)ES_ReductionCutStrategy::GoldenRatio)
{
double factor = 0.618;

Expand Down Expand Up @@ -134,6 +134,11 @@ void TaskAddPrimalReductionCut::run()
std::cout << " Primal improv. after red. cut: "
<< env->solutionStatistics.numberOfPrimalImprovementsAfterReductionCut << std::endl;
}
else
{
env->tasks->setNextTask(taskIDIfFalse);
return;
}

env->dualSolver->cutOffToUse = cutOffToUse;

Expand Down

0 comments on commit 137a6ab

Please sign in to comment.