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.
- 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.
- oopnet.utils.getters.element_lists.get_energy_entries(network)¶
Gets all Energy entries in a network.
- 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.
- 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.
- oopnet.utils.getters.element_lists.get_link_ids(network)¶
Gets all Link IDs in a network.
- Parameters:
network (
Network
) – OOPNET network object- Return type:
list
[str
]- Returns:
list of Link IDs
- oopnet.utils.getters.element_lists.get_links(network)¶
Gets all Links (Pipes, Pumps and Valves) in a network.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
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.
- oopnet.utils.getters.get_by_id.get_junction(network, id)¶
Gets a specific Junction from the network with a specific ID.
- oopnet.utils.getters.get_by_id.get_link(network, id)¶
Gets a specific Link from the network with a specific ID.
- oopnet.utils.getters.get_by_id.get_node(network, id)¶
Gets a specific Node from the network with a specific ID.
- oopnet.utils.getters.get_by_id.get_pattern(network, id)¶
Gets a specific Pattern from the network with a specific ID.
- oopnet.utils.getters.get_by_id.get_pipe(network, id)¶
Gets a specific Pipe from the network with a specific ID.
- oopnet.utils.getters.get_by_id.get_pump(network, id)¶
Gets a specific Pump from the network with a specific ID.
- oopnet.utils.getters.get_by_id.get_reservoir(network, id)¶
Gets a specific Reservoir from the network with a specific ID.
- oopnet.utils.getters.get_by_id.get_rule(network, id)¶
Gets a specific Rule from the network with a specific ID.
- oopnet.utils.getters.get_by_id.get_tank(network, id)¶
Gets a specific Tank from the network with a specific 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.
- oopnet.utils.getters.property_getters.get_link_comment(network)¶
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.topology_getters module¶
- oopnet.utils.getters.topology_getters.get_adjacent_links(network, query_node)¶
Gets Links that are connected to query_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.
- oopnet.utils.getters.topology_getters.get_neighbor_links(network, query_link)¶
Gets Links that share a Node with 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.
- oopnet.utils.getters.topology_getters.get_next_neighbor_links(network, query_link)¶
Gets Links that share a Node with the neighbors of 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.
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