Skip to content

Commit

Permalink
Update src/solver/optimisation/LegacyFiller.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Florian Omnès <[email protected]>
  • Loading branch information
pet-mit and flomnes authored Oct 15, 2024
1 parent 9d9dcfe commit 0c7d054
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/solver/optimisation/LegacyFiller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ void LegacyFiller::CopyVariables(ILinearProblem& pb) const
void LegacyFiller::UpdateContraints(unsigned idxRow, ILinearProblem& pb) const
{
double bMin = -pb.infinity(), bMax = pb.infinity();
if (problemeSimplexe_->Sens[idxRow] == '=')
switch (problemeSimplexe_->Sens[idxRow])
{
case '=':
bMin = bMax = problemeSimplexe_->SecondMembre[idxRow];
}
else if (problemeSimplexe_->Sens[idxRow] == '<')
{
break;
case '<':
bMax = problemeSimplexe_->SecondMembre[idxRow];
}
else if (problemeSimplexe_->Sens[idxRow] == '>')
{
break;
case: '>':
bMin = problemeSimplexe_->SecondMembre[idxRow];
break;
}

pb.addConstraint(bMin, bMax, constraintNameManager_.GetName(idxRow));
Expand Down

0 comments on commit 0c7d054

Please sign in to comment.