23namespace Antares::Data
42 pComments = newcomments;
47 return (uint)pLinkWeights.size();
52 return std::ranges::count_if(pClusterWeights,
53 [](
const std::pair<const Data::ThermalCluster*, double>& coeff)
54 {
return coeff.first->isActive(); });
62inline BindingConstraint::Operator BindingConstraint::operatorType()
const
80inline bool BindingConstraint::skipped()
const
85inline bool BindingConstraint::isActive()
const
92 return pLinkWeights.begin();
97 return pLinkWeights.end();
102 return pLinkWeights.begin();
107 return pLinkWeights.end();
111inline std::string BindingConstraint::timeSeriesFileName(
const Env& env)
const
113 switch (operatorType())
115 case BindingConstraint::opLess:
116 return std::string() + env.folder.c_str() + Yuni::IO::Separator +
id().c_str() +
"_lt"
118 case BindingConstraint::opGreater:
119 return std::string() + env.folder.c_str() + Yuni::IO::Separator +
id().c_str() +
"_gt"
121 case BindingConstraint::opEquality:
122 return std::string() + env.folder.c_str() + Yuni::IO::Separator +
id().c_str() +
"_eq"
125 logs.error(
"Cannot load/save time series of type other that eq/gt/lt");
const YString & comments() const
Get the comments.
Definition BindingConstraint.hxx:35
void setTimeGranularity(Type t)
Set the type of the binding constraint.
Definition BindingConstraint.hxx:72
uint clusterCount() const
Get how many thermal clusters the binding constraint contains.
Definition BindingConstraint.hxx:50
bool enabled() const
Get if the binding constraint is enabled.
Definition BindingConstraint.hxx:57
const ConstraintName & id() const
Get the ID of the binding constraint.
Definition BindingConstraint.hxx:30
linkWeightMap::iterator iterator
Iterator.
Definition BindingConstraint.h:90
Type type() const
Get the type of the binding constraint.
Definition BindingConstraint.hxx:67
linkWeightMap::const_iterator const_iterator
Const iterator.
Definition BindingConstraint.h:92
Type
Definition BindingConstraint.h:55
@ typeMax
The maximum number of types.
Definition BindingConstraint.h:65
@ typeUnknown
Unknown status.
Definition BindingConstraint.h:57
const ConstraintName & name() const
Get the name of the binding constraint.
Definition BindingConstraint.hxx:25
uint linkCount() const
Get how many links the binding constraint contains.
Definition BindingConstraint.hxx:45