cobald.decorator.standardiser module
- class cobald.decorator.standardiser.Standardiser(target: Pool, minimum: float = -inf, maximum: float = inf, granularity: int = 1, backlog: float = inf, surplus: float = inf)[source]
Bases:
PoolDecorator
Limits for changes to the demand of a pool
- Parameters
target – the pool on which changes are standardised
minimum – minimum
target.demand
allowedmaximum – maximum
target.demand
allowedgranularity – granularity of
target.demand
surplus – how much
target.demand
may be abovetarget.supply
backlog – how much
target.demand
may be belowtarget.supply
The
supply
andbacklog
clamp thedemand
such thatsupply - backlog <= demand <= supply + surplus
holds.The default values apply no limits at all so that isolated limits may be used. When several limits are set,
granularity
has the weakest priority, bothsurplus
andbacklog
may limit the result ofgranularity
, andminimum
andmaximum
overrule all other limits.