Valve#
module wntr.network.elements
- class Valve[source]#
Bases:
Link
Valve class, inherited from Link.
For details about the subclasses, please see one of the following:
PRValve
,PSValve
,PBValve
,FCValve
,TCValve
, andGPValve
.Constructor
This class is intended to be instantiated through the
add_valve
method. Direct creation through the constructor is highly discouraged.- Parameters:
name (string) – Name of the valve
start_node_name (string) – Name of the start node
end_node_name (string) – Name of the end node
wn (
WaterNetworkModel
) – The water network model this valve will belong to.
Attributes
The link name (read-only)
returns
"Valve"
The start node object.
The name of the start node (read only)
The end node object.
The name of the end node (read only)
returns
None
because this is an abstact classThe initial status (Opened, Closed, Active) of the Link
The initial setting for the link (if Active)
A list of curve points, in the direction of start node to end node.
A tag or label for this link
Result attributes
(read-only) current simulated flow through the link
(read-only) current simulated velocity through the link
(read-only) current simulated headloss
(read-only) current simulated average link quality
(abstract) current status of the link
(read-only) current simulated setting of the link
- to_dict()#
Dictionary representation of the link
- to_ref()#
- property initial_status#
The initial status (Opened, Closed, Active) of the Link
- Type:
- property link_type#
returns
"Valve"
- property status#
(abstract) current status of the link
- Type:
- property valve_type#
returns
None
because this is an abstact class
- property vertices#
A list of curve points, in the direction of start node to end node.
The vertices should be listed as a list of (x,y) tuples when setting.