Skip to content

Commit 3031756

Browse files
committed
Allow FJ to use an incumbent
1 parent e51eff2 commit 3031756

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

highs/mip/HighsFeasibilityJump.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ HighsModelStatus HighsMipSolverData::feasibilityJump() {
2727
std::vector<double> col_value(model->num_col_, 0.0);
2828
double objective_function_value;
2929

30+
const bool use_incumbent = !incumbent.empty();
31+
3032
// Configure Feasibility Jump and pass it the problem
3133
auto solver = external_feasibilityjump::FeasibilityJumpSolver(
3234
log_options,
@@ -66,10 +68,14 @@ HighsModelStatus HighsMipSolverData::feasibilityJump() {
6668
sense_multiplier * model->col_cost_[col]);
6769

6870
double initial_assignment = 0.0;
69-
if (std::isfinite(lower)) {
70-
initial_assignment = lower;
71-
} else if (std::isfinite(upper)) {
72-
initial_assignment = upper;
71+
if (use_incumbent && std::isfinite(incumbent[col])) {
72+
initial_assignment = std::max(lower, std::min(upper, incumbent[col]));
73+
} else {
74+
if (std::isfinite(lower)) {
75+
initial_assignment = lower;
76+
} else if (std::isfinite(upper)) {
77+
initial_assignment = upper;
78+
}
7379
}
7480
col_value[col] = initial_assignment;
7581
}

0 commit comments

Comments
 (0)