Skip to content

Commit

Permalink
Fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
andreArtelt committed Mar 17, 2024
1 parent 9adfe7f commit 8a4d892
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions epyt_flow/simulation/scenario_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ def set_node_quality_sensors(self, sensor_locations: list[str]) -> None:
def set_link_quality_sensors(self, sensor_locations: list[str]) -> None:
"""
Sets the link quality sensors -- i.e. measuring the water quality
(e.g. age, chlorine concentration, etc.) at some links/pipes in the network.
(e.g. age, chlorine concentration, etc.) at some links/pipes in the network.
Parameters
----------
Expand Down Expand Up @@ -757,8 +757,8 @@ def run_simulation_as_generator(self, hyd_export: str = None, verbose: bool = Fa

self.epanet_api.openHydraulicAnalysis()
self.epanet_api.openQualityAnalysis()
self.epanet_api.initializeHydraulicAnalysis(self.epanet_api.ToolkitConstants.EN_SAVE)
self.epanet_api.initializeQualityAnalysis(self.epanet_api.ToolkitConstants.EN_SAVE)
self.epanet_api.initializeHydraulicAnalysis(ToolkitConstants.EN_SAVE)
self.epanet_api.initializeQualityAnalysis(ToolkitConstants.EN_SAVE)

tmp_file = self.__find_temporary_file()

Expand Down Expand Up @@ -1049,7 +1049,7 @@ def __warn_if_quality_set(self):
def enable_waterage_analysis(self) -> None:
"""
Sets water age analysis -- i.e. estimates the water age (in hours) at
all places in the network.
all places in the network.
"""
self.__warn_if_quality_set()
self.set_general_parameters(quality_model={"type": "age"})
Expand Down Expand Up @@ -1089,7 +1089,8 @@ def add_quality_source(self, node_id: str, pattern: np.ndarray, source_type: int
pattern : `numpy.ndarray`
1d source pattern.
source_type : `int`,
Types of the external water quality source -- must be of the following:
Types of the external water quality source -- must be of the following
EPANET toolkit constants:
- EN_CONCEN = 0
- EN_MASS = 1
Expand Down Expand Up @@ -1138,7 +1139,7 @@ def add_quality_source(self, node_id: str, pattern: np.ndarray, source_type: int
self.epanet_api.setNodeSourceQuality(node_idx, source_strength)
self.epanet_api.setNodeSourcePatternIndex(node_idx, pattern_idx)

def enable_sourcetracing_analysis(self, trace_node_id: str):
def enable_sourcetracing_analysis(self, trace_node_id: str) -> None:
"""
Set source tracing analysis -- i.e. tracks the percentage of flow from a given node
reaching all other nodes over time.
Expand Down

0 comments on commit 8a4d892

Please sign in to comment.