Skip to content

Commit

Permalink
Remove unused setting
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaslundell committed Jan 3, 2025
1 parent 137a6ab commit d138bb0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
3 changes: 0 additions & 3 deletions src/Solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1154,9 +1154,6 @@ void Solver::initializeSettings()
"Which formulation to use in eigenvalue decomposition", enumEigenValueStrategy, 0);
enumEigenValueStrategy.clear();

env->settings->createSetting("Reformulation.Quadratics.EigenValueDecomposition.Method", "Model", false,
"Whether to use the eigen value decomposition of convex quadratic functions");

env->settings->createSetting("Reformulation.Quadratics.EigenValueDecomposition.Tolerance", "Model", 1e-6,
"Variables with eigenvalues smaller than this value will be ignored", 0.0, SHOT_DBL_MAX);

Expand Down
17 changes: 10 additions & 7 deletions src/Tasks/TaskAddPrimalReductionCut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,16 @@ void TaskAddPrimalReductionCut::run()

cutOffToUse = (1 - factor) * currentLowerBoundForReductionCut + factor * env->results->currentPrimalBound;

std::cout << " Cut off diff: " << std::abs(currentLowerBoundForReductionCut - cutOffToUse) << std::endl;
if(std::abs(currentLowerBoundForReductionCut - cutOffToUse) < 1e-4)
env->output->outputInfo(fmt::format(
" {} {}", "Cut off difference:", std::abs(currentLowerBoundForReductionCut - cutOffToUse)));

if(std::abs(currentLowerBoundForReductionCut - cutOffToUse) < 1e-6)
{
env->tasks->setNextTask(taskIDIfFalse);
return;
}

currentLowerBoundForReductionCut = cutOffToUse;
std::cout << " Cut off to use: " << cutOffToUse << std::endl;
std::cout << " Primal improv. after repair: "
<< env->solutionStatistics.numberOfPrimalImprovementsAfterInfeasibilityRepair << std::endl;
std::cout << " Primal improv. after red. cut: "
<< env->solutionStatistics.numberOfPrimalImprovementsAfterReductionCut << std::endl;
}
else
{
Expand All @@ -142,6 +139,12 @@ void TaskAddPrimalReductionCut::run()

env->dualSolver->cutOffToUse = cutOffToUse;

env->output->outputInfo(fmt::format(" {} {}", "Cut off used:", cutOffToUse));
env->output->outputInfo(fmt::format(" {} {}", "Primal improvements after repair:",
env->solutionStatistics.numberOfPrimalImprovementsAfterInfeasibilityRepair));
env->output->outputInfo(fmt::format(" {} {}", "Primal improvements after reduction cut:",
env->solutionStatistics.numberOfPrimalImprovementsAfterReductionCut));

if(env->reformulatedProblem->objectiveFunction->properties.isMinimize)
{
env->results->currentDualBound = SHOT_DBL_MIN;
Expand Down

0 comments on commit d138bb0

Please sign in to comment.