Skip to content

Commit

Permalink
Check col feasibility earlier; trial inward integer rounding.
Browse files Browse the repository at this point in the history
  • Loading branch information
BenChampion committed Dec 9, 2024
1 parent 0d06adc commit f9c020d
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/mip/HighsFeasibilityJump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,25 @@ void HighsMipSolverData::feasibilityJump() {
} else {
fjVarType = external_feasibilityjump::VarType::Integer;
}
// TODO(BenChampion): do we handle sense of objective correctly?
solver.addVar(fjVarType, model->col_lower_[col], model->col_upper_[col],
model->col_cost_[col]);
// TODO(BenChampion): inward integer rounding will be done elsewhere
double lower = std::ceil(model->col_lower_[col]);
double upper = std::floor(model->col_upper_[col]);
// TODO(BenChampion): what about other infeasibilities/unboundedness?
if (model->col_lower_[col] > model->col_upper_[col]) {
if (lower > upper) {
highsLogUser(
log_options, HighsLogType::kInfo,
"Detected infeasible column bounds. Skipping Feasibility Jump");
"Detected infeasible column bounds. Skipping Feasibility Jump.\n");
return;
}
// TODO(BenChampion): do we handle sense of objective correctly?
// (even if FJ has zero objective weight at the moment)
solver.addVar(fjVarType, lower, upper, model->col_cost_[col]);
// TODO(BenChampion): any other cases where infinite bounds are problematic?
double initial_assignment = 0;
if (std::isfinite(model->col_lower_[col])) {
initial_assignment = model->col_lower_[col];
} else if (std::isfinite(model->col_upper_[col])) {
initial_assignment = model->col_upper_[col];
if (std::isfinite(lower)) {
initial_assignment = lower;
} else if (std::isfinite(upper)) {
initial_assignment = upper;
}
col_value[col] = initial_assignment;
}
Expand Down

0 comments on commit f9c020d

Please sign in to comment.