Skip to content

Commit

Permalink
Accept empty group / no group for binding constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
flomnes committed Jul 27, 2023
1 parent d6aa849 commit 2c07f3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,19 +152,6 @@ std::vector<std::shared_ptr<BindingConstraint>> BindingConstraintLoader::load(En
<< "]: Invalid operator [less,greater,equal,both]";
return {};
}
if (bc->group_.empty())
{
if (env.version >= version870)
{
logs.error() << env.iniFilename << ": in [" << env.section->name
<< "]: Missing mandatory binding constraint group";
return {};
}
else
{
bc->group_ = "legacy_study_group";
}
}

// The binding constraint can not be enabled if there is no weight in the table
if (bc->pLinkWeights.empty() && bc->pClusterWeights.empty())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ bool BindingConstraintSaver::saveToEnv(EnvForSaving& env, const BindingConstrain
env.section->add("filter-year-by-year", datePrecisionIntoString(bindingConstraint->pFilterYearByYear));
env.section->add("filter-synthesis", datePrecisionIntoString(bindingConstraint->pFilterSynthesis));

env.section->add("group", bindingConstraint->group());

if (!bindingConstraint->pComments.empty())
env.section->add("comments", bindingConstraint->pComments);

Expand Down

0 comments on commit 2c07f3a

Please sign in to comment.