Skip to content

Commit 58c351e

Browse files
committed
Upload pyRAVT code
Upload pyRAVT code
1 parent 943c63b commit 58c351e

6 files changed

Lines changed: 3407 additions & 20 deletions

File tree

Copyright.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Software:
2+
Open-Source Resource Adequacy Viewer Tool in Python (pyRAVT)
3+
Version 2025.0.1.0
4+
5+
Developed for:
6+
EPRI, Inc.
7+
3420 Hillview Ave.
8+
Palo Alto, CA 94304
9+
10+
Support:
11+
This software is provided by EPRI "AS IS" and without customer support beyond such
12+
program, embodiments, or versions within the distribution of this software that may
13+
or may not provide such support.
14+
15+
Copyright:
16+
Copyright © 2025 EPRI, Inc. All Rights Reserved.
17+
18+
Disclaimer:
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
20+
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
22+
SHALL EPRI BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
25+
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

LICENSE.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright (c) 2025, EPRI, Inc.
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions are met:
5+
6+
1. Redistributions of source code must retain the above copyright notice, this
7+
list of conditions and the following disclaimer.
8+
9+
2. Redistributions in binary form must reproduce the above copyright notice,
10+
this list of conditions and the following disclaimer in the documentation
11+
and/or other materials provided with the distribution.
12+
13+
3. Neither the name of the copyright holder nor the names of its
14+
contributors may be used to endorse or promote products derived from
15+
this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 59 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,59 @@
1-
# Introduction
2-
TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.
3-
4-
# Getting Started
5-
TODO: Guide users through getting your code up and running on their own system. In this section you can talk about:
6-
1. Installation process
7-
2. Software dependencies
8-
3. Latest releases
9-
4. API references
10-
11-
# Build and Test
12-
TODO: Describe and show how to build your code and run the tests.
13-
14-
# Contribute
15-
TODO: Explain how other users and developers can contribute to make your code better.
16-
17-
If you want to learn more about creating good readme files then refer the following [guidelines](https://docs.microsoft.com/en-us/azure/devops/repos/git/create-a-readme?view=azure-devops). You can also seek inspiration from the below readme files:
18-
- [ASP.NET Core](https://github.com/aspnet/Home)
19-
- [Visual Studio Code](https://github.com/Microsoft/vscode)
20-
- [Chakra Core](https://github.com/Microsoft/ChakraCore)
1+
# Resource Adequacy Viewer Tool in Python (pyRAVT)
2+
3+
<p align="center">
4+
<img alt="pyRAVT" src="pyRAVT_logo.png">
5+
</p>
6+
7+
## Introduction
8+
9+
The pyRAVT GitHub repository contains the Python code to run EPRI's Resource Adequacy Viewer Tool ([RAVT](https://www.epri.com/research/products/000000003002026144)). This tool calculates and visualizes various metrics used in resource adequacy (RA) assessments.
10+
11+
Developed and maintained by EPRI's [Transmission Operations & Planning](https://top.epri.com/research-area/resource-adequacy) group, pyRAVT is a Python version of the original tool, which was built in R and can be accessed [here](https://ravt.epri.com).
12+
13+
## Resource Adequacy Metrics
14+
15+
RA metrics are used to measure whether a power system has adequate resources—including generation, demand-side contributions, and power imports—to meet electricity demand and maintain reliable service under various conditions. The following metrics are reported in pyRAVT:
16+
17+
1. `LOLH` stands for Loss of Load Hours. This is the average event-hours per year across all of the simulated random samples. The unit of LOLH is hours/year.
18+
2. `LOLD` stands for Loss of Load Days. This is defined as the average number of event-periods per year across all of the random samples simulated. The LOLD metric can be applied to any time period length and must be clearly defined by the user. The unit of LOLD is days/year. In some regions, LOLD is assumed the same as LOLE or Loss of Load Expectation.
19+
3. `LOLP` stands for Loss of Load Probability. This is calculated as the total number of event-periods divided by the total number of time periods sampled. The LOLP metric can be applied to any time period length and study horizon, and must be clearly defined by the user. The unit of LOLP is %.
20+
4. `LOLEv` stands for Loss of Load Events. This is defined as the average number of events per year across all the simulated random samples. The unit of LOLEv is events/year.
21+
5. `EUE` stands for Expected Unserved Energy. This is the average load not served per year due to shortfall events across all the simulated random samples. The unit of EUE is MWh/year.
22+
6. `CVaR` stands for Conditional Value at Risk. This is the average event-hours or unserved load per year during extreme shortfall events. This is a metric calculated from the most severe or "tail-end" samples in a simulation.
23+
24+
More information on RA metrics is available [here](https://msites.epri.com/resource-adequacy/metrics).
25+
26+
## Getting Started
27+
### Installation Process
28+
To install pyRAVT, users have two options: cloning the GitHub repository or downloading a ZIP file.
29+
30+
1. Cloning the Repository: To clone the repository using the command prompt (on Windows) or terminal, use the following command: `git clone https://github.com/epri-dev/XXXXXX`. This will create a local copy of the project.
31+
2. Downloading a ZIP file: If users prefer to download the files directly, navigate to the GitHub page and click the `Code` button, then select `Download ZIP`. Once the download is complete, extract the contents of the ZIP file to your preferred location.
32+
33+
### Dependencies
34+
- pandas
35+
- seaborn
36+
- matplotlib
37+
- numpy
38+
- plotly
39+
40+
### Running pyRAVT
41+
After installation,
42+
1. Open the `input` folder.
43+
2. Save the hourly unserved energy results to the file unserved_energy.csv within the `input` folder. Make sure the file includes nine column headers: Scenario_Name, Weather_Year, Sample_Number, Zone_Name, Year, Month, Day, Hour, and Unserved_Energy_MWh.
44+
3. Open Visual Studio Code.
45+
4. Open the `pyRAVT` notebook in Visual Studio Code.
46+
5. Update the inputs to the following parameters: `no_samples`, `no_weather_years`, `start_weather_year`, `end_weather_year`, `figure_width`, `figure_height`, `no_columns`, and `CVaR_alpha`.
47+
6. Save the `pyRAVT` notebook.
48+
7. Execute the `Run All` command within the environment.
49+
8. Output files will be generated in the `output` folder.
50+
51+
### Version History
52+
#### Version 0.1.0
53+
Initial version
54+
55+
## Contacts
56+
For more information, please contact:
57+
- Jo Ann Rañola, [jranola@epri.com](mailto:JRanola@epri.com)
58+
- Irene Danti Lopez, [jranola@epri.com](mailto:IDantiLopez@epri.com)
59+
- Anna Lafoyiannis, [ALafoyiannis@epri.com](mailto:ALafoyiannis@epri.com)

0 commit comments

Comments
 (0)