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 the package
pip install -r requirements.txt
- 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.
- 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.
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
- 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
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