Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding constraints on injection-witdrawal cumulation with constant RHS [ANT-1885] #2535

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update
a-zakir committed Dec 18, 2024
commit f7878b01f7d2dee5a0f26b6512bbf44ac88b4f60
Original file line number Diff line number Diff line change
@@ -107,13 +107,13 @@ std::unique_ptr<CumulationConstraint> cumulationConstraintFromVariable(const std
throw std::invalid_argument("Invalid cumulation constraint type");
}

char ConvertSign(const std::string& sign)
char ConvertSense(const std::string& sense)
{
if (sign == "greater")
if (sense == "greater")
{
return '>';
}
else if (sign == "less")
else if (sense == "less")
{
return '<';
}
@@ -151,7 +151,7 @@ void ShortTermStorageCumulation::add(int pays)
builder.updateHourWithinWeek(hour - 1);
constraintHelper->build(builder, index, storage);
}
builder.SetOperator(ConvertSign(constraint.operatorType)).build();
builder.SetOperator(ConvertSense(constraint.operatorType)).build();
}
}
}