Skip to content

Commit

Permalink
Update wtw.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobson committed Feb 29, 2024
1 parent 82c7455 commit 2f6b545
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions wsimod/nodes/wtw.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
from typing import Any, Dict

class WTW(Node):
""""""
"""A generic Water Treatment Works (WTW) node.
This class is a generic water treatment works node. It is intended to be
subclassed into freshwater and wastewater treatment works (FWTW and WWTW
respectively).
"""

def __init__(
self,
Expand Down Expand Up @@ -122,7 +127,12 @@ def liquor_multiplier(self, value):
self.process_parameters["volume"]["constant"] = self.calculate_volume()

def apply_overrides(self, overrides = Dict[str, Any]):
"""Apply overrides to the process parameters and liquor multipliers.
"""Override parameters.
Enables a user to override any of the following parameters:
percent_solids, treatment_throughput_capacity, process_parameters (the
entire dict does not need to be redefined, only changed values need to
be included), liquor_multiplier (as with process_parameters).
Args:
overrides (Dict[str, Any]): Dict describing which parameters should
Expand Down Expand Up @@ -211,7 +221,7 @@ def end_timestep(self):


class WWTW(WTW):
""""""
"""Wastewater Treatment Works (WWTW) node."""

def __init__(
self,
Expand Down Expand Up @@ -288,6 +298,13 @@ def __init__(

def apply_overrides(self, overrides=Dict[str, Any]):
"""Apply overrides to the stormwater tank and WWTW.
Enables a user to override any parameter of the stormwater tank, and
then calls any overrides in WTW.
Args:
overrides (Dict[str, Any]): Dict describing which parameters should
be overridden (keys) and new values (values). Defaults to {}.
"""
self.stormwater_storage_capacity = overrides.pop(
"stormwater_storage_capacity",
Expand Down

0 comments on commit 2f6b545

Please sign in to comment.