Skip to content

alwaysbyx/e2e-DR-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

e2e-DR-learning

Paper

For more details, please see our paper Demand Response Model Identification and Behavior Forecast with OptNet: a Gradient-based Approach which has been accepted at ACM E-energy, 2022. If this is useful for your work, please cite our paper:

@inproceedings{bian2022demand,
  title={Demand response model identification and behavior forecast with OptNet: a gradient-based approach},
  author={Bian, Yuexin and Zheng, Ningkun and Zheng, Yang and Xu, Bolun and Shi, Yuanyuan},
  booktitle={Proceedings of the Thirteenth ACM International Conference on Future Energy Systems},
  pages={418--429},
  year={2022}
}

Install Package

Install the package

pip install -r requirements.txt

Energy storage model

  • ESID-data: NYISO 2019 real-time electricity price data.
  • Results: Contain 10 random generated data: data1-data10. Figures and post-processing data also in this folder.
  • data_generation.py: generate random ground truth parameters. Random select dates in real-time price data to generate true dispatch data for training and validation.
  • main.py: using OptNet to learn parameters with training data, check validation loss with learned parameters.
  • MLP.py: baseline, using three-layer forward ReLU network, return validation losses of differet data and iteration numbers.
  • plot.py: make figures for energy storage models.
  • post_processing.py: using differernt iteration numbers OptNet learned parameters to calculate validation loss.
  • utils.py: functions used in other scripts.

Building model

  • dataset: contain price and ambient data, from Fernández-Blanco, R., Morales, J. M., & Pineda, S. (2020). Forecasting the Price-Response of a Pool of Buildings via Homothetic Inverse Optimization (https://github.com/groupoasys/homothetic)
  • baseline_NN.py: Neural network as baseline to predict the power consumation
  • gradient_method.py: Our approach
  • utils.py: contain the solve function and etc.

Usage

You can use --num to determine the number of experiments, --choice to determine whether the model learns the indoor temperature, --save to determine whether to save the identified model parameters.

python gradient_method.py # default experiment setting
python gradient_method.py --num 10 --save True --seed 1234 --choice 2

Electricity consumer model

  • dataset: contain all the input data in the experiments
  • baseline_IO.py: reproducing code for Inverse optimization approach to the identification of electricity consumer models
  • baselines.py: RNN and MLP model
  • gradient_method.py: our model for DR identification

Usage

You can use --K to determine the number of loads, --noise to determine the noise level, --save to determine whether to save the identified model parameters.

python gradient_method.py # default experiment setting
python gradient_method.py --K 3 --noise 2 --save True

For baseline comparison, you can use the following method to save the identified model parameters.

python baseline_IO.py --K --noise 2 --save True

About

Code for our paper Demand Response Model Identification and Behavior Forecast with OptNet: a Gradient-based Approach.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published