OptiDamTool
About
OptiDamTool is a Python package designed for analytics and decision-making in dam management. Conceptualized and released on May 29, 2025, the package offers tools for modeling and analyzing hydrological flow across a network of connected dams.
Leveraging functionalities from the open-source GeoAnalyze package, OptiDamTool provides classes that that assist users in preparing inputs for simulating water erosion and sediment transport, and supports decision-making in dam network deployment aimed at environmental sustainability.
Classes
OptiDamTool.WatemSedem
Provides tools to prepare inputs for the WaTEM/SEDEM model, which simulates soil erosion, sediment transport capacity, and sediment delivery to stream networks at the watershed scale. While this class includes built-in methods for generating most required inputs, it is still recommended to consult the GeoAnalyze documentation for any geospatial operations not covered by its methods.
- Convert Digital Elevation Model (DEM) data into the stream files required for the WaTEM/SEDEM model with the
river routing = 1extension enabled. - Extend input rasters beyond the model region and fills NoData cells with valid values, as WaTEM/SEDEM does not support NoData.
- Perform reprojection, clipping, resolution rescaling, and reclassification of rasters.
- Processe open-source Esri land cover data.
- Generate a land management factor raster from land cover inputs.
- Compute the product of soil erodibility and rainfall erosivity factors.
- Convert raster files to the Idrisi raster format, with the
.rstfile extension. - Generate effective upstream drainage area polygons for selected dam locations within a stream network.
OptiDamTool.Network
Offers methods for establishing hydrological and sedimentation flow connectivity between dams using the stream network.
- Identify connectivity between adjacent upstream and downstream dams.
- Compute the controlled upstream drainage areas for selected dam locations within a stream network.
- Estimate sediment inflow to dams based on controlled upstream drainage areas.
- Simulate storage dynamics of individual dams in a system due to sedimentation, using a mass balance approach.
- Generate updated dam location points and their corresponding controlled drainage polygons when dams become inactive during system-wide storage dynamics simulation.
OptiDamTool.Analysis
Provides methods for analyzing simulation outputs and generating insights.
- Integrate sediment delivery to stream segments.
- Generate stream shapefiles with comprehensive information of each segment's drainage area and sediment input.
- Summarize total sediment dynamics for the model region.
- Assign a Coordinate Reference System and the default
GTiffdriver to output Idrisi raster files from a WaTEM/SEDEM simulation.
OptiDamTool.SystemDesign
Provides methods for optimizing dam systems within a watershed using a multi-objective evolutionary computation framework.
- For a fixed number of dams, it determines optimal locations and storage capacities based on annual sediment inflows along watershed drainage pathways.
- Retrieve detailed simulation results for a selected solution scenario.
OptiDamTool.Visual
Provides methods for visualizing simulation outputs.
-
Produces a figure showing sediment inflow percentages to stream segments, relative to the total sediment input across all stream segments.
-
Creates a figure showing dam locations along the stream path.
-
Produces a figure showing dam system-level statistics, including controlled drainage area, remaining storage, sediment trapped, and sediment released.
-
Displays figures illustrating the annual variability of key features for each dam in the system:
Controlled drainage area: Percentage of the drainage area managed by each dam, relative to the total stream drainage area, evaluated at the start of the simulation year.Remaining storage: Percentage of storage capacity remaining relative to the dam’s initial storage, evaluated at the start of the simulation year.Trap efficiency: Efficiency of sediment trapping expressed as a percentage, evaluated at the start of the simulation year.Trapped sediment: Percentage of sediment retained by the dam, relative to the total sediment input across all stream segments, evaluated at the end of the simulation year.
-
Generates Pareto front visualizations to support the analysis of multi-objective optimization results, including parallel coordinate plots and two-dimensional trade-off projections.
The examples below show typical outputs produced by these visualization methods:
Installation
To install, use pip:
pip install OptiDamTool
Quickstart
A brief example of how to start:
import OptiDamTool
watem_sedem = OptiDamTool.WatemSedem()
network = OptiDamTool.Network()
Documentation
For detailed information, see the documentation.
Support
If this project has been helpful and you'd like to contribute to its development, consider sponsoring with a coffee! Support will help maintain, improve, and expand this open-source project, ensuring continued valuable tools for the community.
Metadata
Release files for OptiDamTool 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| optidamtool-0.6.0.tar.gz | 54.2 kB | Without provenance | Details for optidamtool-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| optidamtool-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for optidamtool-0.6.0-py3-none-any.whl |
Total release size: 105.1 kB
Release files / optidamtool-0.6.0.tar.gz
| Download URL | optidamtool-0.6.0.tar.gz |
|---|---|
| Size | 54.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f91262a6e90a7b90eb4577cff8035184c893c683fb035f816778a7c9330f11ba
|
|
BLAKE2b-256 checksum How to use checksums |
57bf697ba4bf93c4e04b525da4ae3e7fec84690507df1a96251a47f233035b9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / optidamtool-0.6.0-py3-none-any.whl
| Download URL | optidamtool-0.6.0-py3-none-any.whl |
|---|---|
| Size | 50.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd1d8dc692f17e4891014fb578694c702351284da160acc4bdf71f0858876685
|
|
BLAKE2b-256 checksum How to use checksums |
78ca4776d9d3e18b79edf93f5cf8ebe693f8eefe6cf3df2ee01495c8ae8eb9fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for OptiDamTool 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.