Skip to content

Commit b220b5e

Browse files
Add hyperplanes immediately
1 parent 5ad83e9 commit b220b5e

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/Tasks/TaskPerformConvexBounding.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ TaskPerformConvexBounding::TaskPerformConvexBounding(EnvironmentPtr envPtr, bool
5151
if(static_cast<ES_HyperplaneCutStrategy>(env->settings->getSetting<int>("CutStrategy", "Dual"))
5252
== ES_HyperplaneCutStrategy::ESH)
5353
{
54-
tUpdateInteriorPoint = std::make_shared<TaskUpdateInteriorPoint>(env);
54+
taskUpdateInteriorPoint = std::make_shared<TaskUpdateInteriorPoint>(env);
5555
taskSelectHPPts = std::make_shared<TaskSelectHyperplanePointsESH>(env);
5656
}
5757
else
@@ -95,6 +95,8 @@ TaskPerformConvexBounding::TaskPerformConvexBounding(EnvironmentPtr envPtr, bool
9595
taskCreateMIPProblem = std::make_shared<TaskCreateMIPProblem>(env, MIPSolver, env->reformulatedProblem);
9696
taskCreateMIPProblem->run();
9797

98+
taskAddHyperplanes = std::make_shared<TaskAddHyperplanes>(env);
99+
98100
env->timing->stopTimer("ConvexBounding");
99101
}
100102

@@ -211,19 +213,22 @@ void TaskPerformConvexBounding::run()
211213
if(static_cast<ES_HyperplaneCutStrategy>(env->settings->getSetting<int>("CutStrategy", "Dual"))
212214
== ES_HyperplaneCutStrategy::ESH)
213215
{
214-
tUpdateInteriorPoint->run();
216+
taskUpdateInteriorPoint->run();
215217
static_cast<TaskSelectHyperplanePointsESH*>(taskSelectHPPts.get())->run(solutionPoints);
216218
}
217219
else
218220
{
219221
static_cast<TaskSelectHyperplanePointsECP*>(taskSelectHPPts.get())->run(solutionPoints);
220222
}
223+
224+
taskAddHyperplanes->run();
221225
}
222226

223227
if(env->reformulatedProblem->objectiveFunction->properties.classification
224228
> E_ObjectiveFunctionClassification::Quadratic)
225229
{
226230
taskSelectHPPtsByObjectiveRootsearch->run(solutionPoints);
231+
taskAddHyperplanes->run();
227232
}
228233

229234
int hyperplanesAfter = env->solutionStatistics.numberOfHyperplanesWithConvexSource

src/Tasks/TaskPerformConvexBounding.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include "TaskCreateMIPProblem.h"
1818

19+
#include "TaskAddHyperplanes.h"
1920
#include "TaskSelectHyperplanePointsObjectiveFunction.h"
2021
#include "TaskSelectHyperplanePointsESH.h"
2122
#include "TaskSelectHyperplanePointsECP.h"
@@ -43,7 +44,8 @@ class TaskPerformConvexBounding : public TaskBase
4344

4445
std::shared_ptr<TaskBase> taskSelectHPPts;
4546
std::shared_ptr<TaskSelectHyperplanePointsObjectiveFunction> taskSelectHPPtsByObjectiveRootsearch;
46-
std::shared_ptr<TaskUpdateInteriorPoint> tUpdateInteriorPoint;
47+
std::shared_ptr<TaskUpdateInteriorPoint> taskUpdateInteriorPoint;
48+
std::shared_ptr<TaskAddHyperplanes> taskAddHyperplanes;
4749

4850
MIPSolverPtr MIPSolver;
4951
};

0 commit comments

Comments
 (0)