Skip to content

Commit

Permalink
Infeasibility - to more changeability : move call to sortConstraintsB…
Browse files Browse the repository at this point in the history
…yType with his friends
  • Loading branch information
guilpier-code committed Jul 3, 2024
1 parent aefc114 commit 28afee5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class InfeasibleProblemReport
private:
void turnSlackVarsIntoConstraints(
const std::vector<const operations_research::MPVariable*>& slackVariables);
void sortConstraints();
void sortConstraintsBySlackValue();
void trimConstraints();
void sortConstraintsByType();
void logSuspiciousConstraints();
Expand Down
6 changes: 3 additions & 3 deletions src/solver/infeasible-problem-analysis/report.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ InfeasibleProblemReport::InfeasibleProblemReport(
const std::vector<const MPVariable*>& slackVariables)
{
turnSlackVarsIntoConstraints(slackVariables);
sortConstraints();
sortConstraintsBySlackValue();
trimConstraints();
sortConstraintsByType();
}

void InfeasibleProblemReport::turnSlackVarsIntoConstraints(
Expand All @@ -56,7 +57,7 @@ void InfeasibleProblemReport::turnSlackVarsIntoConstraints(
}
}

void InfeasibleProblemReport::sortConstraints()
void InfeasibleProblemReport::sortConstraintsBySlackValue()
{
std::sort(std::begin(constraints_), std::end(constraints_), ::compareSlackSolutions);
}
Expand Down Expand Up @@ -119,7 +120,6 @@ void InfeasibleProblemReport::logInfeasibilityCauses()

void InfeasibleProblemReport::prettyPrint()
{
sortConstraintsByType();
logSuspiciousConstraints();
logInfeasibilityCauses();
}
Expand Down

0 comments on commit 28afee5

Please sign in to comment.