Catchment Model¶
- class morl4water.core.models.catchment.Catchment(name: str, all_water_accumulated: list[float])¶
Bases:
Facility
- determine_consumption() float ¶
Abstract method to calculate the facility’s water consumption.
- Returns:
The calculated water consumption for the current timestep.
- Return type:
float
- Raises:
NotImplementedError – If this method is not implemented in a subclass.
- determine_info() dict ¶
Method to gather information about the facility’s state.
- Returns:
A dictionary containing information about the facility.
- Return type:
dict
- Raises:
NotImplementedError – If this method is not implemented in a subclass.
- determine_reward() float ¶
Abstract method to compute the reward based on the facility’s performance.
- Returns:
The computed reward for the current timestep.
- Return type:
float
- Raises:
NotImplementedError – If this method is not implemented in a subclass.
- get_inflow(timestep: int) float ¶
Retrieves the inflow value for a specific timestep.
- Parameters:
timestep (int) – The timestep index for which to retrieve the inflow.
- Returns:
The inflow value for the specified timestep.
- Return type:
float
- Raises:
IndexError – If the timestep is out of bounds.
- is_truncated() bool ¶
Checks if the facility simulation has been truncated.
- Returns:
Always returns False for the base Facility class; override in subclasses as needed.
- Return type:
bool