TankLevelCondition#

module wntr.network.controls

class TankLevelCondition[source]#

Bases: ValueCondition

A special type of ValueCondition for tank levels/heads/pressures.


__init__(source_obj, source_attr, relation, threshold)[source]#
static __new__(cls, source_obj, source_attr, relation, threshold)#
evaluate()[source]#

Check if the condition is satisfied.

Returns:

check

Return type:

bool

requires()#

Returns a set of objects required to evaluate this condition

Returns:

required_objects

Return type:

OrderedSet of object

property backtrack#

The amount of time by which the simulation should be backed up. Should be updated by the evaluate method if appropriate.

Returns:

backtrack

Return type:

int

property name#

Returns the string representation of the condition.

Returns:

name

Return type:

str