diff --git a/src/solver/infeasible-problem-analysis/include/antares/solver/infeasible-problem-analysis/report.h b/src/solver/infeasible-problem-analysis/include/antares/solver/infeasible-problem-analysis/report.h index ea62adb347..898f4df359 100644 --- a/src/solver/infeasible-problem-analysis/include/antares/solver/infeasible-problem-analysis/report.h +++ b/src/solver/infeasible-problem-analysis/include/antares/solver/infeasible-problem-analysis/report.h @@ -44,7 +44,7 @@ class InfeasibleProblemReport private: void turnSlackVarsIntoConstraints( const std::vector& slackVariables); - void sortConstraints(); + void sortConstraintsBySlackValue(); void trimConstraints(); void sortConstraintsByType(); void logSuspiciousConstraints(); diff --git a/src/solver/infeasible-problem-analysis/report.cpp b/src/solver/infeasible-problem-analysis/report.cpp index 33c0b68491..b038aa8823 100644 --- a/src/solver/infeasible-problem-analysis/report.cpp +++ b/src/solver/infeasible-problem-analysis/report.cpp @@ -43,8 +43,9 @@ InfeasibleProblemReport::InfeasibleProblemReport( const std::vector& slackVariables) { turnSlackVarsIntoConstraints(slackVariables); - sortConstraints(); + sortConstraintsBySlackValue(); trimConstraints(); + sortConstraintsByType(); } void InfeasibleProblemReport::turnSlackVarsIntoConstraints( @@ -56,7 +57,7 @@ void InfeasibleProblemReport::turnSlackVarsIntoConstraints( } } -void InfeasibleProblemReport::sortConstraints() +void InfeasibleProblemReport::sortConstraintsBySlackValue() { std::sort(std::begin(constraints_), std::end(constraints_), ::compareSlackSolutions); } @@ -119,7 +120,6 @@ void InfeasibleProblemReport::logInfeasibilityCauses() void InfeasibleProblemReport::prettyPrint() { - sortConstraintsByType(); logSuspiciousConstraints(); logInfeasibilityCauses(); }