oopnet.utils.getters package

Submodules

oopnet.utils.getters.element_lists module

oopnet.utils.getters.element_lists.get_controls(network)

Gets all Controls in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[Control]

Returns:

list of Controls

oopnet.utils.getters.element_lists.get_curve_ids(network)

Gets all Curve IDs in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[str]

Returns:

list of Curve IDs

oopnet.utils.getters.element_lists.get_curves(network)

Gets all Curves in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[Curve]

Returns:

list of Curves

oopnet.utils.getters.element_lists.get_energy_entries(network)

Gets all Energy entries in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[Energy]

Returns:

list of Energy entries

oopnet.utils.getters.element_lists.get_inflow_node_ids(network)

Gets all IDs of Nodes that act is inflows into the system.

Parameters:

network (Network) – OOPNET network object

Return type:

list[str]

Returns:

ID list of Tanks, Reservoirs and Junctions with a base demand < 0

oopnet.utils.getters.element_lists.get_inflow_nodes(network)

Gets all Nodes that act is inflows into the system.

Parameters:

network (Network) – OOPNET network object

Return type:

list[Node]

Returns:

list of Tanks, Reservoirs and Junctions with either a base demand < 0 or if any demand category is < 0 if demand categories are used as demand.

oopnet.utils.getters.element_lists.get_junction_ids(network)

Gets all Junction IDs in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[str]

Returns:

list of Junction IDs

oopnet.utils.getters.element_lists.get_junctions(network)

Gets all Junctions in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[Junction]

Returns:

list of Junctions

Gets all Link IDs in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[str]

Returns:

list of Link IDs

Gets all Links (Pipes, Pumps and Valves) in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[Link]

Returns:

list of Links

oopnet.utils.getters.element_lists.get_node_ids(network)

Gets all Node IDs in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[str]

Returns:

list of Node IDs

oopnet.utils.getters.element_lists.get_nodes(network)

Gets all Nodes (Junctions, Reservoirs and Tanks) in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[Node]

Returns:

list of Nodes

oopnet.utils.getters.element_lists.get_pattern_ids(network)

Gets all Pattern IDs in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[str]

Returns:

list of Pattern IDs

oopnet.utils.getters.element_lists.get_patterns(network)

Gets all Patterns in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[Pattern]

Returns:

list of Patterns

oopnet.utils.getters.element_lists.get_pipe_ids(network)

Gets all Pipe IDs in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[str]

Returns:

list of Pipe IDs

oopnet.utils.getters.element_lists.get_pipes(network)

Gets all Pipes in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[Pipe]

Returns:

list of Pipes

oopnet.utils.getters.element_lists.get_pump_ids(network)

Gets all Pump IDs in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[str]

Returns:

list of Pump IDs

oopnet.utils.getters.element_lists.get_pumps(network)

Gets all Pumps in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[Pump]

Returns:

list of Pumps

oopnet.utils.getters.element_lists.get_reservoir_ids(network)

Gets all Reservoir IDs in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[str]

Returns:

list of Reservoir IDs

oopnet.utils.getters.element_lists.get_reservoirs(network)

Gets all Reservoirs in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[Reservoir]

Returns:

list of Reservoirs

oopnet.utils.getters.element_lists.get_rule_ids(network)

Gets all Rule IDs in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[str]

Returns:

list of Rule IDs

oopnet.utils.getters.element_lists.get_rules(network)

Gets all Rules in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[Rule]

Returns:

list of Rules

oopnet.utils.getters.element_lists.get_tank_ids(network)

Gets all Tank IDs in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[str]

Returns:

list of Tank IDs

oopnet.utils.getters.element_lists.get_tanks(network)

Gets all Tanks in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[Tank]

Returns:

list of Tanks

oopnet.utils.getters.element_lists.get_valve_ids(network)

Gets all Valve IDs in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[str]

Returns:

list of Valve IDs

oopnet.utils.getters.element_lists.get_valves(network)

Gets all Valves in a network.

Parameters:

network (Network) – OOPNET network object

Return type:

list[Valve]

Returns:

list of Valves

oopnet.utils.getters.get_by_id module

oopnet.utils.getters.get_by_id.get_curve(network, id)

Gets a specific Curve from the network with a specific ID.

Parameters:
  • network (Network) – OOPNET network object

  • id (str) – ID of the Curve

Return type:

Curve

Returns:

Curve with property ID

oopnet.utils.getters.get_by_id.get_junction(network, id)

Gets a specific Junction from the network with a specific ID.

Parameters:
  • network (Network) – OOPNET network object

  • id (str) – ID of the Junction

Return type:

Junction

Returns:

Junction with property ID

Gets a specific Link from the network with a specific ID.

Parameters:
  • network (Network) – OOPNET network object

  • id (str) – ID of the Link

Return type:

Link

Returns:

Link with property ID

oopnet.utils.getters.get_by_id.get_node(network, id)

Gets a specific Node from the network with a specific ID.

Parameters:
  • network (Network) – OOPNET network object

  • id (str) – ID of the Node

Return type:

Node

Returns:

Node with property ID

oopnet.utils.getters.get_by_id.get_pattern(network, id)

Gets a specific Pattern from the network with a specific ID.

Parameters:
  • network (Network) – OOPNET network object

  • id (str) – ID of the Pattern

Return type:

Pattern

Returns:

Pattern with property ID

oopnet.utils.getters.get_by_id.get_pipe(network, id)

Gets a specific Pipe from the network with a specific ID.

Parameters:
  • network (Network) – OOPNET network object

  • id (str) – ID of the Pipe

Return type:

Pipe

Returns:

Pipe with property ID

oopnet.utils.getters.get_by_id.get_pump(network, id)

Gets a specific Pump from the network with a specific ID.

Parameters:
  • network (Network) – OOPNET network object

  • id (str) – ID of the Pump

Return type:

Pump

Returns:

Pump with property ID

oopnet.utils.getters.get_by_id.get_reservoir(network, id)

Gets a specific Reservoir from the network with a specific ID.

Parameters:
  • network (Network) – OOPNET network object

  • id (str) – ID of the Reservoir

Return type:

Reservoir

Returns:

Reservoir with property ID

oopnet.utils.getters.get_by_id.get_rule(network, id)

Gets a specific Rule from the network with a specific ID.

Parameters:
  • network (Network) – OOPNET network object

  • id (str) – ID of the Rule

Return type:

Rule

Returns:

Rule with property ID

oopnet.utils.getters.get_by_id.get_tank(network, id)

Gets a specific Tank from the network with a specific ID.

Parameters:
  • network (Network) – OOPNET network object

  • id (str) – ID of the Tank

Return type:

Tank

Returns:

Tank with property ID

oopnet.utils.getters.get_by_id.get_valve(network, id)

Gets a specific Valve from the network with a specific ID.

Parameters:
  • network (Network) – OOPNET network object

  • id (str) – ID of the Valve

Return type:

Valve

Returns:

Valve with property ID

oopnet.utils.getters.property_getters module

oopnet.utils.getters.property_getters.get_basedemand(network)

Gets all base demand values of all Junctions in the Network as a pandas Series.

Builds the sum if more than one base demand exists for a single junction.

Parameters:

network (Network) – OOPNET Network object

Return type:

Series

Returns:

Pandas Series with Node IDs as index and base demands as values.

oopnet.utils.getters.property_getters.get_coordinates(network)

Gets all x and y coordinate values of all Nodes in the Network as a pandas Dataframe

Parameters:

network (Network) – OOPNET Network object

Return type:

DataFrame

Returns:

Pandas DataFrame with Node IDs as index and x and y coordinates as columns.

oopnet.utils.getters.property_getters.get_diameter(network)

Gets all diameter values of all Pipes and Valves in the Network as a pandas Series.

Parameters:

network (Network) – OOPNET Network object

Return type:

Series

Returns:

Pandas Series with Pipe/Valve IDs as index and diameters as values.

oopnet.utils.getters.property_getters.get_elevation(network)

Gets all elevation values of all Nodes in the Network as a pandas Series.

Parameters:

network (Network) – OOPNET Network object

Return type:

Series

Returns:

Pandas Series with Node IDs as index and elevations as values.

oopnet.utils.getters.property_getters.get_endnodes(network)

Gets all end nodes of all Links in the Network as a pandas Series..

Parameters:

network (Network) – OOPNET Network object

Return type:

Series

Returns:

Pandas Series with Link IDs as index and end nodes as values.

oopnet.utils.getters.property_getters.get_length(network)

Gets all length values of all Pipes in the Network as a pandas Series.

Parameters:

network (Network) – OOPNET Network object

Return type:

Series

Returns:

Pandas Series with Pink IDs as index and lengths as values.

Gets all comments of all Links in the Network as a pandas Series.

Parameters:

network (Network) – OOPNET Network object

Return type:

Series

Returns:

Pandas Series with Link IDs as index and comments as values.

oopnet.utils.getters.property_getters.get_linkcenter_coordinates(network)

Get the center coordinates of all Links in the Network as a pandas Dataframe.

Parameters:

network (Network) – OOPNET Network object

Return type:

DataFrame

Returns:

Pandas DataFrame with Link IDs as index and the Links’ center x and y coordinates as columns.

oopnet.utils.getters.property_getters.get_minorloss(network)

Gets all minor loss coefficient values of all Pipes in the Network as a pandas Series.

Parameters:

network (Network) – OOPNET Network object

Return type:

Series

Returns:

Pandas Series with Pipe IDs as index and minor loss coefficients as values.

oopnet.utils.getters.property_getters.get_node_comment(network)

Gets all comments of all Nodes in the Network as a pandas Series.

Parameters:

network (Network) – OOPNET Network object

Return type:

Series

Returns:

Pandas Series with Node IDs as index and comments as values.

oopnet.utils.getters.property_getters.get_roughness(network)

Gets all roughness values of all Pipes in the Network as a pandas Series.

Parameters:

network (Network) – OOPNET Network object

Return type:

Series

Returns:

Pandas Series with Pipe IDs as index and roughness values as values.

oopnet.utils.getters.property_getters.get_setting(network)

Gets all settings of all Pumps and Valves in the Network as a pandas Series.

Parameters:

network (Network) – OOPNET Network object

Return type:

Series

Returns:

Pandas Series with Pump/Valve IDs as index and settings as values.

oopnet.utils.getters.property_getters.get_startendcoordinates(network)

Gets all start and end coordinates of all Links in the Network as a pandas DataFrame.

Parameters:

network (Network) – OOPNET Network object

Return type:

DataFrame

Returns:

Pandas DataFrame with Link IDs as index and a column for start and end node x and y coordinates respectively.

oopnet.utils.getters.property_getters.get_startendnodes(network)

Gets all start and endnodes of all Links in the Network as a pandas DataFrame.

Parameters:

network (Network) – OOPNET Network object

Return type:

DataFrame

Returns:

Pandas DataFrame with Link IDs as index and a column for start and end nodes respectively.

oopnet.utils.getters.property_getters.get_startnodes(network)

Gets all start nodes of all Links in the Network as a pandas Series.

Parameters:

network (Network) – OOPNET Network object

Return type:

Series

Returns:

Pandas Series with Link IDs as index and start nodes as values.

oopnet.utils.getters.property_getters.get_status(network)

Gets all status of all Links in the Network as a pandas Series.

Parameters:

network (Network) – OOPNET Network object

Return type:

Series

Returns:

Pandas Series with Link IDs as index and status as values.

oopnet.utils.getters.property_getters.get_xcoordinate(network)

Gets all x coordinate values of all Nodes in the Network as a pandas Series.

Parameters:

network (Network) – OOPNET Network object

Return type:

Series

Returns:

Pandas Series with Node IDs as index and x coordinates as values.

oopnet.utils.getters.property_getters.get_ycoordinate(network)

Gets all y coordinate values of all Nodes in the Network as a pandas Series.

Parameters:

network (Network) – OOPNET Network object

Return type:

Series

Returns:

Pandas Series with Node IDs as index and y coordinates as values.

oopnet.utils.getters.topology_getters module

Gets Links that are connected to query_node.

Parameters:
  • network (Network) – Network in which the query is executed

  • query_node (Node) – Node that the query is based on

Return type:

list[Link]

Returns:

list of Links that are connected to the passed Node

oopnet.utils.getters.topology_getters.get_inflow_neighbor_nodes(network)

Gets Nodes that are connected to the inflow Nodes with any sort of Link.

Parameters:

network (Network) – Network in which the query is executed

Return type:

list[Node]

Returns:

list of Nodes that are connected with Network’s inflow Nodes

Gets Links that share a Node with the passed Link.

Parameters:
  • network (Network) – Network in which the query is executed

  • query_link (Link) – Link that the query is based on

Return type:

list[Link]

Returns:

list of Links that are connected to the passed Link

oopnet.utils.getters.topology_getters.get_neighbor_nodes(network, query_node)

Gets Nodes that are connected to query_node with any sort of Link.

Parameters:
  • network (Network) – Network in which the query is executed

  • query_node (Node) – Node that the query is based on

Return type:

list[Node]

Returns:

list of Nodes that are connected to the passed Node

Gets Links that share a Node with the neighbors of the passed Link.

Parameters:
  • network (Network) – Network in which the query is executed

  • query_link (Link) – Link that the query is based on

Return type:

list[Link]

Returns:

list of Links that are connected to the passed Link

oopnet.utils.getters.topology_getters.get_next_neighbor_nodes(network, query_node)

Gets Nodes that are connected to neighbor Nodes of query_node with any sort of Link.

Parameters:
  • network (Network) – Network in which the query is executed

  • query_node (Node) – Node that the query is based on

Return type:

list[Node]

Returns:

list of Nodes that are connected to the passed Node’s neighbors

oopnet.utils.getters.vectors module

oopnet.utils.getters.vectors.v_demand(network)

Gets all emitter coefficients values of all junctions in the network as a numpy array

Parameters:

network (Network) – OOPNET network object

Return type:

array

Returns:

demand as numpy.ndarray

oopnet.utils.getters.vectors.v_diameter(network)

Gets all diameter values of all Pipes and valves in the network as a numpy array

Parameters:

network (Network) – OOPNET network object

Return type:

array

Returns:

diameter as numpy.ndarray

oopnet.utils.getters.vectors.v_elevation(network)

Gets all elevation values of all nodes in the network as a numpy array

Parameters:

network (Network) – OOPNET network object

Return type:

array

Returns:

elevation as numpy.ndarray

oopnet.utils.getters.vectors.v_emittercoefficient(network)

Gets all emitter coefficients values of all junctions in the network as a numpy array

Parameters:

network (Network) – OOPNET network object

Return type:

array

Returns:

elevation as numpy.ndarray

oopnet.utils.getters.vectors.v_head(network)

Gets all head values of all reservoir in the network as a numpy array

Parameters:

network (Network) – OOPNET network object

Return type:

array

Returns:

head as numpy.ndarray

oopnet.utils.getters.vectors.v_initlevel(network)

Gets all initial levels of all tanks in the network as a numpy array

Parameters:

network (Network) – OOPNET network object

Return type:

array

Returns:

initial levels as numpy.ndarray

oopnet.utils.getters.vectors.v_length(network)

Gets all length values of all Pipes in the network as a numpy array

Parameters:

network (Network) – OOPNET network object

Return type:

array

Returns:

length as numpy.ndarray

oopnet.utils.getters.vectors.v_maxlevel(network)

Gets all maximum levels of all tanks in the network as a numpy array

Parameters:

network (Network) – OOPNET network object

Return type:

array

Returns:

maximum levels as numpy.ndarray

oopnet.utils.getters.vectors.v_minlevel(network)

Gets all minimum levels of all tanks in the network as a numpy array

Parameters:

network (Network) – OOPNET network object

Return type:

array

Returns:

minimum levels as numpy.ndarray

oopnet.utils.getters.vectors.v_minorloss(network)

Gets all minor loss coefficient values of all Pipes in the network as a numpy array

Parameters:

network (Network) – OOPNET network object

Return type:

array

Returns:

minor loss coefficient as numpy.ndarray

oopnet.utils.getters.vectors.v_minvolume(network)

Gets all minimal volumes of all tanks in the network as a numpy array

Parameters:

network (Network) – OOPNET network object

Return type:

array

Returns:

minimal volumes as numpy.ndarray

oopnet.utils.getters.vectors.v_roughness(network)

Gets all roughness values of all Pipes in the network as a numpy array

Parameters:

network (Network) – OOPNET network object

Return type:

array

Returns:

roughness as numpy.ndarray

oopnet.utils.getters.vectors.v_tankdiameter(network)

Gets all diameters of all tanks in the network as a numpy array

Parameters:

network (Network) – OOPNET network object

Return type:

array

Returns:

tank diameters as numpy.ndarray

Module contents