ResSimpy.Nexus.DataModels.Network.NexusNodeConnections.NexusNodeConnections
- class ResSimpy.Nexus.DataModels.Network.NexusNodeConnections.NexusNodeConnections(parent_network: 'NexusNetwork')[source]
Bases:
NodeConnectionsPublic Data Attributes:
Start of the Node definition table.
End of the Node definition table.
Inherited from
NetworkOperationsMixIntable_headertable_footerMethods:
__init__(parent_network)get_all()get_by_name(connection_name)get_df()Creates a dataframe representing all processed node connection data in a surface file :returns: DataFrame -- of the properties of the connections through time with each row representing a node.
get_overview()load(surface_file, start_date, default_units)Calls load connections and appends the list of discovered NodeConnections into the NexusNodeConnection object.
remove(obj_to_remove)Remove a wellbore from the network based on the properties matching a dictionary or id.
add(obj_to_remove)Adds a connection to a network, taking a dictionary with properties for the new connection.
modify(obj_to_modify, new_properties)Modifies an existing connection based on a matching dictionary of properties.
__repr__()Return repr(self).
__eq__(other)Return self==value.
Inherited from
NodeConnections__init__(*[, _NodeConnections__connections])__repr__()Return repr(self).
__eq__(other)Return self==value.
Inherited from
NetworkOperationsMixIn__init__(parent_network)get_all()get_by_name(name)get_df()get_overview()load(file, start_date, default_units)remove(obj_to_remove)add(obj_to_add)modify(obj_to_modify, new_properties)
- __init__(parent_network: NexusNetwork) None[source]
- property table_header: str
Start of the Node definition table.
End of the Node definition table.
- get_df() pandas.DataFrame[source]
Creates a dataframe representing all processed node connection data in a surface file :returns: DataFrame – of the properties of the connections through time with each row representing a node.
- load(surface_file: File, start_date: str, default_units: UnitSystem) None[source]
Calls load connections and appends the list of discovered NodeConnections into the NexusNodeConnection object.
- remove(obj_to_remove: dict[str, None | str | float | int] | UUID) None[source]
Remove a wellbore from the network based on the properties matching a dictionary or id.
- Parameters:
obj_to_remove (UUID | dict[str, None | str | float | int]) – UUID of the wellbore to remove or a dictionary with sufficient matching parameters to uniquely identify a wellbore
- add(obj_to_remove: dict[str, None | str | float | int]) None[source]
Adds a connection to a network, taking a dictionary with properties for the new connection.
- Parameters:
obj_to_remove (dict[str, None | str | float | int]) – dictionary taking all the properties for the new
connection. –
name. (Requires date and a) –
- modify(obj_to_modify: dict[str, None | str | float | int], new_properties: dict[str, None | str | float | int]) None[source]
Modifies an existing connection based on a matching dictionary of properties. (partial matches allowed if precisely 1 matching node is found). Updates the properties with properties in the new_properties dictionary.
- Parameters:
obj_to_modify (dict[str, None | str | float | int]) – dictionary containing attributes to match in the
connections. (existing) –
new_properties (dict[str, None | str | float | int]) – properties to switch to in the new connection