Skip to content

Commit 8529619

Browse files
author
Julian Hall
committed
Silenced test chuzc4
1 parent 3b82c5d commit 8529619

File tree

6 files changed

+53
-48
lines changed

6 files changed

+53
-48
lines changed

check/TestLpSolvers.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -560,11 +560,9 @@ TEST_CASE("chuzc4", "[highs_lp_solver]") {
560560
// "/srv/miplib2017/irp.mps.gz";
561561
// "/srv/miplib2017/nw04.mps.gz";
562562
Highs h;
563-
// h.setOptionValue("output_flag", dev_run);
563+
h.setOptionValue("output_flag", dev_run);
564564
h.readModel(model_file);
565-
h.setOptionValue("highs_analysis_level", 2 + 8);
566-
h.setOptionValue("presolve", kHighsOffString);
567-
h.setOptionValue("solve_relaxation", true);
565+
if (dev_run) h.setOptionValue("highs_analysis_level", 2 + 8);
568566
for (HighsInt k = 0; k < 3; k++) {
569567
if (k == 0) {
570568
h.setOptionValue("dual_simplex_chuzc_strategy",
@@ -577,8 +575,9 @@ TEST_CASE("chuzc4", "[highs_lp_solver]") {
577575
kDualSimplexChuzcStrategyHeap);
578576
}
579577
h.clearSolver();
580-
h.zeroAllClocks();
578+
if (dev_run) h.zeroAllClocks();
581579
h.run();
580+
REQUIRE(h.getModelStatus() == HighsModelStatus::kOptimal);
582581
}
583582
h.resetGlobalScheduler(true);
584583
}

highs/lp_data/HConst.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ const HighsInt kMaxAllowedMatrixPow2Scale = 30;
334334

335335
// Illegal values of simplex iteration information to check whether
336336
// they have been set
337-
const double kHighsIllegalSimplexInterationDoubleValue = -kHighsInf;
338-
const HighsInt kHighsIllegalSimplexInterationIntValue = -kHighsIInf;
337+
const double kHighsIllegalSimplexIterationDoubleValue = -kHighsInf;
338+
const HighsInt kHighsIllegalSimplexIterationIntValue = -kHighsIInf;
339339

340340
// Illegal values of num/max/sum infeasibility - used to indicate that true
341341
// values aren't known

highs/simplex/HEkkDual.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,18 +1015,18 @@ void HEkkDual::solvePhase2() {
10151015

10161016
void HEkkDual::initialiseIterationInfo() {
10171017
// integers
1018-
this->row_out = kHighsIllegalSimplexInterationIntValue;
1019-
this->variable_out = kHighsIllegalSimplexInterationIntValue;
1020-
this->move_out = kHighsIllegalSimplexInterationIntValue;
1021-
this->variable_in = kHighsIllegalSimplexInterationIntValue;
1018+
this->row_out = kHighsIllegalSimplexIterationIntValue;
1019+
this->variable_out = kHighsIllegalSimplexIterationIntValue;
1020+
this->move_out = kHighsIllegalSimplexIterationIntValue;
1021+
this->variable_in = kHighsIllegalSimplexIterationIntValue;
10221022
// doubles
1023-
this->delta_primal = kHighsIllegalSimplexInterationDoubleValue;
1024-
this->theta_dual = kHighsIllegalSimplexInterationDoubleValue;
1025-
this->theta_primal = kHighsIllegalSimplexInterationDoubleValue;
1026-
this->alpha_col = kHighsIllegalSimplexInterationDoubleValue;
1027-
this->alpha_row = kHighsIllegalSimplexInterationDoubleValue;
1028-
this->numericalTrouble = kHighsIllegalSimplexInterationDoubleValue;
1029-
this->computed_edge_weight = kHighsIllegalSimplexInterationDoubleValue;
1023+
this->delta_primal = kHighsIllegalSimplexIterationDoubleValue;
1024+
this->theta_dual = kHighsIllegalSimplexIterationDoubleValue;
1025+
this->theta_primal = kHighsIllegalSimplexIterationDoubleValue;
1026+
this->alpha_col = kHighsIllegalSimplexIterationDoubleValue;
1027+
this->alpha_row = kHighsIllegalSimplexIterationDoubleValue;
1028+
this->numericalTrouble = kHighsIllegalSimplexIterationDoubleValue;
1029+
this->computed_edge_weight = kHighsIllegalSimplexIterationDoubleValue;
10301030
}
10311031

10321032
void HEkkDual::rebuild() {
@@ -1340,9 +1340,9 @@ void HEkkDual::iterationAnalysisData() {
13401340
analysis->leaving_variable = variable_out;
13411341
analysis->entering_variable = variable_in;
13421342
analysis->rebuild_reason = rebuild_reason;
1343-
analysis->reduced_rhs_value = kHighsIllegalSimplexInterationDoubleValue;
1344-
analysis->reduced_cost_value = kHighsIllegalSimplexInterationDoubleValue;
1345-
analysis->edge_weight = kHighsIllegalSimplexInterationDoubleValue;
1343+
analysis->reduced_rhs_value = kHighsIllegalSimplexIterationDoubleValue;
1344+
analysis->reduced_cost_value = kHighsIllegalSimplexIterationDoubleValue;
1345+
analysis->edge_weight = kHighsIllegalSimplexIterationDoubleValue;
13461346
analysis->primal_delta = delta_primal;
13471347
analysis->primal_step = theta_primal;
13481348
analysis->dual_step = theta_dual * cost_scale_factor;

highs/simplex/HEkkPrimal.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -648,18 +648,18 @@ void HEkkPrimal::solvePhase2() {
648648

649649
void HEkkPrimal::initialiseIterationInfo() {
650650
// integers
651-
this->variable_in = kHighsIllegalSimplexInterationIntValue;
652-
this->move_in = kHighsIllegalSimplexInterationIntValue;
653-
this->row_out = kHighsIllegalSimplexInterationIntValue;
654-
this->variable_out = kHighsIllegalSimplexInterationIntValue;
655-
this->move_out = kHighsIllegalSimplexInterationIntValue;
651+
this->variable_in = kHighsIllegalSimplexIterationIntValue;
652+
this->move_in = kHighsIllegalSimplexIterationIntValue;
653+
this->row_out = kHighsIllegalSimplexIterationIntValue;
654+
this->variable_out = kHighsIllegalSimplexIterationIntValue;
655+
this->move_out = kHighsIllegalSimplexIterationIntValue;
656656
// doubles
657-
this->theta_dual = kHighsIllegalSimplexInterationDoubleValue;
658-
this->theta_primal = kHighsIllegalSimplexInterationDoubleValue;
659-
this->value_in = kHighsIllegalSimplexInterationDoubleValue;
660-
this->alpha_col = kHighsIllegalSimplexInterationDoubleValue;
661-
this->alpha_row = kHighsIllegalSimplexInterationDoubleValue;
662-
this->numericalTrouble = kHighsIllegalSimplexInterationDoubleValue;
657+
this->theta_dual = kHighsIllegalSimplexIterationDoubleValue;
658+
this->theta_primal = kHighsIllegalSimplexIterationDoubleValue;
659+
this->value_in = kHighsIllegalSimplexIterationDoubleValue;
660+
this->alpha_col = kHighsIllegalSimplexIterationDoubleValue;
661+
this->alpha_row = kHighsIllegalSimplexIterationDoubleValue;
662+
this->numericalTrouble = kHighsIllegalSimplexIterationDoubleValue;
663663
}
664664

665665
void HEkkPrimal::cleanup() {
@@ -2607,10 +2607,10 @@ void HEkkPrimal::iterationAnalysisData() {
26072607
analysis->leaving_variable = variable_out;
26082608
analysis->entering_variable = variable_in;
26092609
analysis->rebuild_reason = rebuild_reason;
2610-
analysis->reduced_rhs_value = kHighsIllegalSimplexInterationDoubleValue;
2611-
analysis->reduced_cost_value = kHighsIllegalSimplexInterationDoubleValue;
2612-
analysis->edge_weight = kHighsIllegalSimplexInterationDoubleValue;
2613-
analysis->primal_delta = kHighsIllegalSimplexInterationDoubleValue;
2610+
analysis->reduced_rhs_value = kHighsIllegalSimplexIterationDoubleValue;
2611+
analysis->reduced_cost_value = kHighsIllegalSimplexIterationDoubleValue;
2612+
analysis->edge_weight = kHighsIllegalSimplexIterationDoubleValue;
2613+
analysis->primal_delta = kHighsIllegalSimplexIterationDoubleValue;
26142614
analysis->primal_step = theta_primal;
26152615
analysis->dual_step = theta_dual;
26162616
analysis->pivot_value_from_column = alpha_col;

highs/simplex/HighsSimplexAnalysis.cpp

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -685,19 +685,28 @@ void HighsSimplexAnalysis::iterationRecord() {
685685
}
686686
}
687687
AnIterPrevIt = AnIterCuIt;
688-
updateValueDistribution(primal_step, cleanup_primal_step_distribution);
689-
updateValueDistribution(dual_step, cleanup_dual_step_distribution);
690-
updateValueDistribution(primal_step, primal_step_distribution);
691-
updateValueDistribution(dual_step, dual_step_distribution);
692-
updateValueDistribution(pivot_value_from_column, simplex_pivot_distribution);
693-
updateValueDistribution(factor_pivot_threshold,
694-
factor_pivot_threshold_distribution);
688+
if (primal_step != kHighsIllegalSimplexIterationDoubleValue)
689+
updateValueDistribution(primal_step, cleanup_primal_step_distribution);
690+
if (dual_step != kHighsIllegalSimplexIterationDoubleValue)
691+
updateValueDistribution(dual_step, cleanup_dual_step_distribution);
692+
if (primal_step != kHighsIllegalSimplexIterationDoubleValue)
693+
updateValueDistribution(primal_step, primal_step_distribution);
694+
if (dual_step != kHighsIllegalSimplexIterationDoubleValue)
695+
updateValueDistribution(dual_step, dual_step_distribution);
696+
if (pivot_value_from_column != kHighsIllegalSimplexIterationDoubleValue)
697+
updateValueDistribution(pivot_value_from_column,
698+
simplex_pivot_distribution);
699+
if (factor_pivot_threshold != kHighsIllegalSimplexIterationDoubleValue)
700+
updateValueDistribution(factor_pivot_threshold,
701+
factor_pivot_threshold_distribution);
695702
// Only update the distribution of legal values for
696703
// numerical_trouble. Illegal values are set in PAMI since it's not
697704
// known in minor iterations
698-
if (numerical_trouble >= 0)
705+
if (numerical_trouble >= 0 &&
706+
numerical_trouble != kHighsIllegalSimplexIterationDoubleValue)
699707
updateValueDistribution(numerical_trouble, numerical_trouble_distribution);
700-
updateValueDistribution(edge_weight_error, edge_weight_error_distribution);
708+
if (edge_weight_error != kHighsIllegalSimplexIterationDoubleValue)
709+
updateValueDistribution(edge_weight_error, edge_weight_error_distribution);
701710
}
702711

703712
void HighsSimplexAnalysis::iterationRecordMajor() {

highs/util/HighsUtils.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -751,9 +751,6 @@ bool updateValueDistribution(const double value,
751751
if (value_distribution.num_count_ < 0) return false;
752752
value_distribution.sum_count_++;
753753
const double abs_value = fabs(value);
754-
printf("updateValueDistribution abs_value = %g\n", abs_value);
755-
printf("updateValueDistribution value_distribution.min_value_ = %g\n",
756-
value_distribution.min_value_);
757754
value_distribution.min_value_ =
758755
std::min(abs_value, value_distribution.min_value_);
759756
value_distribution.max_value_ =

0 commit comments

Comments
 (0)