ResSimpy.Nexus.DataModels.Network.NexusTarget.NexusTarget
- class ResSimpy.Nexus.DataModels.Network.NexusTarget.NexusTarget(properties_dict: 'dict[str, None | int | str | float]')[source]
Bases:
TargetPublic Data Attributes:
Inherited from
Targetnamecontrol_quantitycontrol_conditionscontrol_connectionscontrol_methodcalculation_methodcalculation_conditionscalculation_connectionsvalueadd_valueregionpriorityminimum_rateminimum_rate_no_shutguide_ratemax_change_pressurerank_dtcontrol_typecalculation_typeInherited from
DataObjectMixinidUnique identifier for each object.
Methods:
__init__(properties_dict)__repr__()Return repr(self).
Gets the mapping of nexus keywords to attribute definitions.
update(new_data[, nones_overwrite])Updates attributes in the object based on the dictionary provided.
__eq__(other)Return self==value.
Inherited from
Target__init__([_DataObjectMixin__id, name, ...])__repr__()Return repr(self).
__eq__(other)Return self==value.
Inherited from
DataObjectMixin__init__(properties_dict)to_dict([keys_in_keyword_style, add_date, ...])Returns a dictionary of the attributes of the object.
to_table_line(headers)Takes a generic Nexus object and returns the attribute values as a string in the order of headers provided.
get_keyword_mapping()Gets the mapping of keywords to attribute definitions.
__repr__()Return repr(self).
__eq__(other)Return self==value.
- static get_keyword_mapping() dict[str, tuple[str, type]][source]
Gets the mapping of nexus keywords to attribute definitions.
- update(new_data: dict[str, None | int | str | float | ResSimpy.Enums.UnitsEnum.UnitSystem], nones_overwrite: bool = False)[source]
Updates attributes in the object based on the dictionary provided.
- property id: UUID
Unique identifier for each object.
- to_dict(keys_in_keyword_style: bool = False, add_date: bool = True, add_units: bool = True, include_nones: bool = True) dict[str, None | str | int | float]
Returns a dictionary of the attributes of the object.
- Parameters:
include_nones (bool) –
keys_in_keyword_style (bool) – if True returns the key values as simulator keywords, otherwise returns the attribute name as stored by ressimpy.
- Returns:
a dictionary keyed by attributes and values as the value of the attribute
- to_table_line(headers: list[str]) str
Takes a generic Nexus object and returns the attribute values as a string in the order of headers provided. Requires an implemented to_dict method and get_keyword_mapping() method.
- Parameters:
headers (list[str]) – list of header values in keyword format
- Returns:
string of the values in the order of the headers provided.