Skip to content

Commit 74f6695

Browse files
committed
Created stem for lnsCarrara
1 parent ab8f7f7 commit 74f6695

File tree

5 files changed

+20
-0
lines changed

5 files changed

+20
-0
lines changed

highs/lp_data/HighsOptions.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ struct HighsOptionsStruct {
445445
bool mip_heuristic_run_root_reduced_cost;
446446
bool mip_heuristic_run_zi_round;
447447
bool mip_heuristic_run_shifting;
448+
bool mip_heuristic_run_lns_carrara;
448449
double mip_min_logging_interval;
449450

450451
#ifdef HIGHS_DEBUGSOL
@@ -596,6 +597,7 @@ struct HighsOptionsStruct {
596597
mip_heuristic_run_root_reduced_cost(false),
597598
mip_heuristic_run_zi_round(false),
598599
mip_heuristic_run_shifting(false),
600+
mip_heuristic_run_lns_carrara(false),
599601
mip_min_logging_interval(0.0),
600602
#ifdef HIGHS_DEBUGSOL
601603
mip_debug_solution_file(""),
@@ -1168,6 +1170,12 @@ class HighsOptions : public HighsOptionsStruct {
11681170
&mip_heuristic_run_shifting, false);
11691171
records.push_back(record_bool);
11701172

1173+
record_bool = new OptionRecordBool(
1174+
"mip_heuristic_run_lns_carrara",
1175+
"Use the large neighbourhood search (carrara) heuristic", advanced,
1176+
&mip_heuristic_run_lns_carrara, false);
1177+
records.push_back(record_bool);
1178+
11711179
record_double = new OptionRecordDouble(
11721180
"mip_rel_gap",
11731181
"Tolerance on relative gap, |ub-lb|/|ub|, to determine whether "

highs/mip/HighsMipSolverData.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,6 +1768,10 @@ HighsLpRelaxation::Status HighsMipSolverData::evaluateRootLp() {
17681768
mipsolver.options_mip_->mip_heuristic_run_zi_round)
17691769
heuristics.ziRound(lp.getLpSolver().getSolution().col_value);
17701770

1771+
if (status == HighsLpRelaxation::Status::kOptimal &&
1772+
mipsolver.options_mip_->mip_heuristic_run_lns_carrara)
1773+
heuristics.lnsCarrara(lp.getLpSolver().getSolution().col_value);
1774+
17711775
} else
17721776
status = lp.getStatus();
17731777

highs/mip/HighsPrimalHeuristics.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,6 +1634,9 @@ void HighsPrimalHeuristics::clique() {
16341634
}
16351635
#endif
16361636

1637+
void HighsPrimalHeuristics::lnsCarrara(
1638+
const std::vector<double>& relaxationsol) {}
1639+
16371640
void HighsPrimalHeuristics::flushStatistics() {
16381641
mipsolver.mipdata_->total_repair_lp += total_repair_lp;
16391642
mipsolver.mipdata_->total_repair_lp_feasible += total_repair_lp_feasible;

highs/mip/HighsPrimalHeuristics.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ class HighsPrimalHeuristics {
6969
void shifting(const std::vector<double>& relaxationsol);
7070

7171
void ziRound(const std::vector<double>& relaxationsol);
72+
73+
void lnsCarrara(const std::vector<double>& relaxationsol);
7274
};
7375

7476
#endif

highs/mip/MipTimer.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ enum iClockMip {
2222
kMipClockRunPresolve,
2323
kMipClockRunSetup,
2424
kMipClockFeasibilityJump,
25+
kMipClockLnsCarrara,
2526
kMipClockTrivialHeuristics,
2627
kMipClockEvaluateRootNode,
2728
kMipClockPerformAging0,
@@ -138,6 +139,7 @@ class MipTimer {
138139
clock[kMipClockRunSetup] = timer_pointer->clock_def("Run setup");
139140
clock[kMipClockFeasibilityJump] =
140141
timer_pointer->clock_def("Feasibility jump");
142+
clock[kMipClockLnsCarrara] = timer_pointer->clock_def("LNS (carrara)");
141143
clock[kMipClockTrivialHeuristics] =
142144
timer_pointer->clock_def("Trivial heuristics");
143145
clock[kMipClockEvaluateRootNode] =
@@ -324,6 +326,7 @@ class MipTimer {
324326
kMipClockRunPresolve,
325327
kMipClockRunSetup,
326328
kMipClockFeasibilityJump,
329+
kMipClockLnsCarrara,
327330
kMipClockTrivialHeuristics,
328331
kMipClockEvaluateRootNode,
329332
kMipClockPerformAging0,

0 commit comments

Comments
 (0)