Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IIS #1895

Draft
wants to merge 9 commits into
base: latest
Choose a base branch
from
Draft

Add IIS #1895

Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Formatted
  • Loading branch information
jajhall committed Aug 28, 2024
commit 17e59ae5515276b5479093dfb249cf4690099601
11 changes: 6 additions & 5 deletions src/lp_data/HighsIis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options,
bool drop_lower = false;

HighsInt num_run_call = 0;
const HighsInt check_run_call = 154;//kHighsIInf;
const HighsInt check_run_call = 154; // kHighsIInf;

// Lambda for gathering data when solving an LP
auto solveLp = [&]() -> HighsStatus {
Expand All @@ -258,10 +258,10 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options,
iis_info.simplex_iterations = -info.simplex_iteration_count;
bool output_flag;
HighsInt log_dev_level;
HighsInt highs_analysis_level;
highs.getOptionValue("output_flag", output_flag);
HighsInt highs_analysis_level;
highs.getOptionValue("output_flag", output_flag);
highs.getOptionValue("log_dev_level", log_dev_level);
highs.getOptionValue("highs_analysis_level", highs_analysis_level);
highs.getOptionValue("highs_analysis_level", highs_analysis_level);

num_run_call++;
if (num_run_call == check_run_call) {
Expand Down Expand Up @@ -401,7 +401,8 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options,
// Record whether the upper bound has been dropped due to the lower bound
// being kept
if (check_type == type && check_ix == iX) {
printf("CheckType %s, index %d, will be num_run_call = %d\n", check_type.c_str(), int(check_ix), int(num_run_call+1));
printf("CheckType %s, index %d, will be num_run_call = %d\n",
check_type.c_str(), int(check_ix), int(num_run_call + 1));
}
if (lower > -kHighsInf) {
// Drop the lower bound temporarily
Expand Down
14 changes: 8 additions & 6 deletions src/lp_data/HighsInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2138,11 +2138,12 @@ HighsStatus Highs::elasticityFilter(
if (lp.col_upper_[iCol] == 0) {
num_enforced_col_ecol++;
printf(
"Col e-col %4d (column %4d) corresponds to column %4d (%8s) with bound "
"Col e-col %4d (column %4d) corresponds to column %4d (%8s) with "
"bound "
"%11.4g "
"and is enforced\n",
int(eCol), int(iCol), int(original_col),
has_col_names ? lp.col_names_[original_col].c_str(): "",
has_col_names ? lp.col_names_[original_col].c_str() : "",
bound_of_col_of_ecol[eCol]);
}
}
Expand All @@ -2155,15 +2156,16 @@ HighsStatus Highs::elasticityFilter(
assert(original_row < original_num_row);
const HighsInt iCol = row_ecol_offset + eCol;
if (lp.col_upper_[iCol] == 0) {
assert(!in_infeasible_row_subset[original_row]);
assert(!in_infeasible_row_subset[original_row]);
num_enforced_row_ecol++;
infeasible_row_subset.push_back(original_row);
if (kIisDevReportBrief)
printf(
"Row e-col %4d (column %4d) corresponds to row %4d (%8s) with bound %11.4g "
"and is enforced\n",
"Row e-col %4d (column %4d) corresponds to row %4d (%8s) with "
"bound %11.4g "
"and is enforced\n",
int(eCol), int(iCol), int(original_row),
has_row_names ? lp.row_names_[original_row].c_str(): "",
has_row_names ? lp.row_names_[original_row].c_str() : "",
bound_of_row_of_ecol[eCol]);
}
}
Expand Down
Loading