Skip to content

Commit e5fb885

Browse files
committed
Cleared out some redundant and debugging code
1 parent 14b02bc commit e5fb885

File tree

4 files changed

+6
-21
lines changed

4 files changed

+6
-21
lines changed

highs/lp_data/Highs.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3983,7 +3983,6 @@ HighsStatus Highs::callSolveLp(HighsLp& lp, const string message) {
39833983
assert(model_.lp_.a_matrix_.isColwise());
39843984

39853985
// Solve the LP
3986-
HighsInt simplex_strategy = options_.simplex_strategy;
39873986
return_status = solveLp(solver_object, message);
39883987
// Extract the model status
39893988
model_status_ = solver_object.model_status_;

highs/lp_data/HighsInterface.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2896,17 +2896,6 @@ HighsStatus Highs::lpKktCheck(const HighsLp& lp, const std::string& message) {
28962896
int(info.num_relative_dual_residual_errors),
28972897
info.max_relative_dual_residual_error, dual_residual_tolerance);
28982898
}
2899-
if (info.num_complementarity_violations) {
2900-
if (!this->options_.output_flag) {
2901-
printf(
2902-
"Highs::lpKktCheck With basis num_complementarity_violations = "
2903-
"%d\n",
2904-
int(info.num_complementarity_violations));
2905-
this->options_.output_flag = true;
2906-
this->writeSolution("", 1);
2907-
this->lpKktCheck(lp, message);
2908-
}
2909-
}
29102899
assert(info.num_complementarity_violations == 0);
29112900
assert(info.primal_dual_objective_error <= optimality_tolerance);
29122901
if (have_residual_errors) {

highs/lp_data/HighsSolution.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void getLpKktFailures(const HighsOptions& options, const HighsLp& lp,
6464
HighsPrimalDualErrors& primal_dual_errors,
6565
const bool get_residuals) {
6666
getKktFailures(options, false, lp, lp.col_cost_, solution, highs_info,
67-
get_residuals, basis.valid);
67+
get_residuals);
6868
getPrimalDualBasisErrors(options, lp, solution, basis, primal_dual_errors);
6969
getPrimalDualGlpsolErrors(options, lp, lp.col_cost_, solution,
7070
primal_dual_errors);
@@ -73,7 +73,7 @@ void getLpKktFailures(const HighsOptions& options, const HighsLp& lp,
7373
void getKktFailures(const HighsOptions& options, const bool is_qp,
7474
const HighsLp& lp, const std::vector<double>& gradient,
7575
const HighsSolution& solution, HighsInfo& highs_info,
76-
const bool get_residuals, const bool basic_solution) {
76+
const bool get_residuals) {
7777
double primal_feasibility_tolerance = options.primal_feasibility_tolerance;
7878
double dual_feasibility_tolerance = options.dual_feasibility_tolerance;
7979
double primal_residual_tolerance = options.primal_residual_tolerance;
@@ -444,7 +444,7 @@ void getKktFailures(const HighsOptions& options, const bool is_qp,
444444
// Determine the sum of complementarity violations
445445
const bool have_values = getComplementarityViolations(
446446
lp, solution, optimality_tolerance, num_complementarity_violation,
447-
max_complementarity_violation, basic_solution);
447+
max_complementarity_violation);
448448
assert(have_values);
449449
}
450450

@@ -955,8 +955,7 @@ bool getComplementarityViolations(const HighsLp& lp,
955955
const HighsSolution& solution,
956956
const double optimality_tolerance,
957957
HighsInt& num_complementarity_violation,
958-
double& max_complementarity_violation,
959-
const bool basic_solution) {
958+
double& max_complementarity_violation) {
960959
num_complementarity_violation = kHighsIllegalComplementarityCount;
961960
max_complementarity_violation = kHighsIllegalComplementarityViolation;
962961
if (!solution.dual_valid) return false;

highs/lp_data/HighsSolution.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ void getLpKktFailures(const HighsOptions& options, const HighsLp& lp,
8282
void getKktFailures(const HighsOptions& options, const bool is_qp,
8383
const HighsLp& lp, const std::vector<double>& gradient,
8484
const HighsSolution& solution, HighsInfo& highs_info,
85-
const bool get_residuals, // = false,
86-
const bool basic_solution = false);
85+
const bool get_residuals = false);
8786

8887
void getVariableKktFailures(const double primal_feasibility_tolerance,
8988
const double dual_feasibility_tolerance,
@@ -108,8 +107,7 @@ bool getComplementarityViolations(const HighsLp& lp,
108107
const HighsSolution& solution,
109108
const double optimality_tolerance,
110109
HighsInt& num_complementarity_violations,
111-
double& max_complementarity_violation,
112-
const bool basic_solution = false);
110+
double& max_complementarity_violation);
113111

114112
bool computeDualObjectiveValue(const HighsModel& model,
115113
const HighsSolution& solution,

0 commit comments

Comments
 (0)