Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
a-zakir committed Dec 16, 2024
1 parent 3addd90 commit f141935
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ void ShortTermStorageCumulation::add(int pays){
for (const auto& storage: data.ShortTermStorage[pays])
{
// TODO global index for constraints for data.CorrespondanceCntNativesCntOptimHebdomadaires.ShortTermStorageCumulation[index]
for(const auto& constraint: storage.additional_constraints){

for (const auto& constraint: storage.additional_constraints)
{
//sum (var[h]) sign rhs, h in list provied by user
auto [constraintType,memberFunction] = getMemberFunction(constraint.variable);
namer.ShortTermStorageCumulation(constraintType,
Expand All @@ -94,12 +94,13 @@ void ShortTermStorageCumulation::add(int pays){
.globalIndex]
= builder.data.nombreDeContraintes;

for (const auto& hour: constraint.hours){
builder.updateHourWithinWeek(hour-1);
(this->*memberFunction)(index, storage);
builder.SetOperator(ConvertSign(constraint.operatorType))
.build();
for (const auto& hour: constraint.hours)
{
builder.updateHourWithinWeek(hour - 1);
(this->*memberFunction)(index, storage);
}
builder.SetOperator(ConvertSign(constraint.operatorType))
.build();
}
}
}

0 comments on commit f141935

Please sign in to comment.