Link#
module wntr.network.base
- class Link[source]#
Bases:
object
Base class for links.
For details about the different subclasses, see one of the following:
Pipe
,Pump
, andValve
Constructor
This is an abstract class and should not be instantiated directly.
- Parameters:
wn (
WaterNetworkModel
) – WaterNetworkModel objectlink_name (string) – Name of the link
start_node_name (string) – Name of the start node
end_node_name (string) – Name of the end node
Attributes
The link name (read-only)
the link type (read only)
The start node object.
The name of the start node (read only)
The end node object.
The name of the end node (read only)
The initial status (Opened, Closed, Active) of the Link
The initial setting for the link (if Active)
A tag or label for this link
A list of curve points, in the direction of start node to end node.
Read-only simulation results
The following attributes are read-only. The values are the final calculated value from a simulation.
(read-only) current simulated flow 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
- property initial_status#
The initial status (Opened, Closed, Active) of the Link
- Type:
- abstract property status#
(abstract) current status of the link
- Type:
- 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.