hydrowizard package
Subpackages
Submodules
hydrowizard.basin module
- class hydrowizard.basin.Basin(basin_config=None, nodes_config=None, flows_config=None, objectives_config=None, basin_data_dir=None, output_dir=None)[source]
Bases:
object
- static calculate_power_generation(flow_rate, reservoir_head, turbine_head, efficiency, max_power, rho=1000, g=9.81)[source]
Calculate the power generation based on inflow rate, reservoir head, turbine head, efficiency, and max power.
- compute_annual_hydropower_generation(df_flow_rates, df_node_volumes, node_name, round_decimals=2)[source]
Compute the annual hydropower generation for each hydropower plant.
- compute_quantile_monthly_demand_deficit(df_flow_rates, flow_name, quantile, round_decimals=2)[source]
- static create_basin_from_yaml(filepath, simulation_horizon=None, integration_interval_duration=None, output_dir='outputs/')[source]
- create_evaporation_rates_of_evaporation_flows_for_cyclostationarity_interval_number_dataframe()[source]
- export_basin_graphs_for_intervals(interval_list, df_flow_rates, df_node_volumes, output_dir=None, format='pdf')[source]
- get_policy_outputs_for_interval(policy_function, df_flow_rates, df_node_volumes, interval_index)[source]
- static read_bathymetry_data(filepath)[source]
Reads bathymetry data from an Excel file and returns a DataFrame with renamed columns.
Args: filepath (str): Path to the Excel file containing bathymetry data.
Returns: pd.DataFrame: DataFrame containing the bathymetry data with renamed columns.
- static read_mean_monthly_values_from_file(filepath, round_decimals=2)[source]
Creates a list of mean values from a given Excel file.
Args: filepath (str): Path to the Excel file containing flow data.
Returns: list: List of mean values for each month.
- set_reservoir_node_parameters()[source]
Sets bathymetry, max_volume, and initial_volumes for reservoir nodes in the basin.
Args: nodes_config (list): List of node configurations. basin_data_dir (str): Directory path where the data files are located.
- simulate_basin(policy_function, end_interval=None, print_progress=True, export_results=False, output_dir=None)[source]
hydrowizard.db_logging module
- hydrowizard.db_logging.get_combined_pareto_front(basin, include_intermediate_results=False)[source]