Giter Club home page Giter Club logo

gdrom's Introduction

Generic Data-driven Reservoir Operation Model (GDROM)

1. Overview

This repository contains scripts for running our generic data-driven reservoir operation model (GDROM), which is published on Advances in Water Resources. The GDROM couples hidden Markov Model and decision tree to extract representative operation modules and model the module applications. Please refer to our paper for model details.

We have applied the GDROM to 452 large reservoirs with long-term operation records available across the Contiguous United States (CONUS). The trained model for individual reservoir has been converted to if-then statements for easy implementation with large-scale hydrological and water resources models. The inventory of the empirical operation rules is shared via our HydroShare repository.

The model is written purely in Python, with hmmlearn package for the hidden Markov part and scikit-learn package for the decision tree part.

2. What's in this repository?

  • base_code folder: modified base code files for Python hmmlearn package. The modification is contributed by Dr. Qiankun Zhao.
  • notebook folder:
    • a Jupyter notebook GDROM (written by Yanan Chen) for going through the model training procedure, as well as the post-process. An example reservoir (Echo Reservoir, ID: 449) is attached (449.csv) for you to go through the notebook.
    • a Jupyter notebook export_rules for exporting the trained operation rules to the if-then statements.
  • environment.yml file that contains the dependencies of our running environment. You can directly copy to your Python environment.

3. How to set up the Python environment?

3.1. Install all dependencies from the environment.yml file

A virtual environment is strongly recommended. All dependencies can be installed from the environment.yml by running the following command:

3.2. Add modified base code to site packages

Since we have modified base code for hmmlearn package to couple hidden Markov Model and decision tree, you need to add the modified code files to the site package folder to replace the original one.

To find the location of the package, start a Python kernal and activate the environment, then execute:

import hmmlearn
print(hmmlearn.__file__)

Then you should be able to see the absolute path to the __init__.py. Go to its parent folder and paste the modified base code files there.

Note: the hmmlearn-0.2.3 we used can not be installed on Mac with M1 chip. In this case, you may run Python on Rosetta, or use the latest release for hmmlearn but at your own risk since we didn't test it with the latest version.

4. Major contributors and contact information

Donghui Li - [email protected]
Yanan Chen - [email protected]
Qiankun Zhao 

5. Other information

The full dataset containing all training data and extracted models for the 450+ reservoirs is hosted in Hydroshare (link). A more detailed description of the model, data preprocess, and model output can be found there.

References of related papers

  • Zhao, Q., and Cai, X. (2020). Deriving representative reservoir operation rules using a hidden Markov-decision tree model. Advances in Water Resources, 146, 103753. (link)
  • Chen, Y., Li, D., Zhao, Q., & Cai, X. (2022). Developing a generic data-driven reservoir operation model. Advances in Water Resources, 167, 104274. (link)
  • Li, D., Chen Y., Lyu, L., & Cai, X. Operation rules and patterns for 452 large reservoirs in the Contiguous United States (Under Revision, WRR)

gdrom's People

Contributors

lidh966 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.