1 EdgeTable

EdgeTable()

Defines the connections between nodes.

1.1 Attributes

Name Description
df
filepath
model_config

1.2 Methods

Name Description
add Add an edge between nodes. The type of the edge (flow or control)
columns Retrieve column names.
plot Plot the edges of the model.
set_filepath Set the filepath of this instance.
sort
tablename Retrieve tablename based on attached Schema.
tableschema Retrieve Pandera Schema.

1.2.1 add

EdgeTable.add(from_node, to_node, geometry=None, name='', subnetwork_id=None, edge_id=None, **kwargs)

Add an edge between nodes. The type of the edge (flow or control) is automatically inferred from the type of the from_node.

1.2.1.1 Parameters

Name Type Description Default
from_node NodeData A node indexed by its node ID, e.g. model.basin[1] required
to_node NodeData A node indexed by its node ID, e.g. model.linear_resistance[1] required
geometry LineString | MultiLineString | None The geometry of a line. If not supplied, it creates a straight line between the nodes. None
name str An optional name for the edge. ''
subnetwork_id int | None An optional subnetwork id for the edge. This edge indicates a source for the allocation algorithm, and should thus not be set for every edge in a subnetwork. None
**kwargs Dict {}

1.2.2 columns

EdgeTable.columns()

Retrieve column names.

1.2.3 plot

EdgeTable.plot(**kwargs)

Plot the edges of the model.

1.2.3.1 Parameters

Name Type Description Default
**kwargs Dict Supported: ‘ax’, ‘color_flow’, ‘color_control’ {}

1.2.4 set_filepath

EdgeTable.set_filepath(filepath)

Set the filepath of this instance.

Args: filepath (Path): The filepath to set.

1.2.5 sort

EdgeTable.sort()

1.2.6 tablename

EdgeTable.tablename()

Retrieve tablename based on attached Schema.

NodeSchema -> Schema TabularRatingCurveStaticSchema -> TabularRatingCurve / Static

1.2.7 tableschema

EdgeTable.tableschema()

Retrieve Pandera Schema.

The type of the field df is known to always be an DataFrame[TableT]]] | None