From 487de354ee2005174e4bfb3ecfc2c6a0fd1db3a3 Mon Sep 17 00:00:00 2001 From: Joseph McKinsey Date: Fri, 22 Nov 2024 11:11:42 -0700 Subject: [PATCH 1/4] Add basic documentation and remove empty quick start guide --- docs/make.jl | 1 - docs/src/index.md | 49 ++++++++++++++++++++++++++++++-- docs/src/quick_start_guide.md | 3 -- docs/src/tutorials/intro_page.md | 2 ++ 4 files changed, 48 insertions(+), 7 deletions(-) delete mode 100644 docs/src/quick_start_guide.md diff --git a/docs/make.jl b/docs/make.jl index b214afc..ad33534 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -3,7 +3,6 @@ import OrderedCollections: OrderedDict pages = OrderedDict( "Welcome Page" => "index.md", - "Quick Start Guide" => "quick_start_guide.md", "Tutorials" => "tutorials/intro_page.md", "Public API Reference" => "api/public.md", "Internal API Reference" => "api/internal.md", diff --git a/docs/src/index.md b/docs/src/index.md index ae3faae..4ebf324 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,12 +1,55 @@ -# PowerSystems.jl +# PRASInterface.jl ```@meta CurrentModule = PRASInterface ``` -## Overview +## About + +`PRASInterface.jl` is a [`Julia`](http://www.julialang.org) package that provides an interface to [`PRAS.jl`](https://nrel.github.io/PRAS) from [Sienna](https://www.nrel.gov/analysis/sienna.html)'s [`PowerSystem.jl`](https://github.com/NREL-Sienna/PowerSystems.jl)'s `System` data model. + +The Probabilistic Resource Adequacy Suite (PRAS) analyzes the resource adequacy of a bulk power system using monte carlo methods. + +## Getting Started + +To use `PRASInterface.jl`, you first need a `System` from `PowerSystems.jl` + +1. Install + +```julia +] add PRASInterface +``` + +2. Add outage information to generators + +```julia +using PowerSystems +transition_data = GeometricDistributionForcedOutage(; + mean_time_to_recovery=10, # Units of hours + outage_transition_probability=0.005 # Probability for outage per hour +) +component = get_component(Generator, sys, "test_generator") +add_supplemental_attribute!(sys, component, transition_data) +``` + +2. Calculate Shortfalls and Expected Unserved Energy on System + +```julia +using PRASInterface +method = SequentialMonteCarlo(samples=10_000, seed=1) +shortfalls, = assess(sys, PowerSystems.Area, sequential_monte_carlo, Shortfall()) +eue = EUE(shortfalls) +``` + +## Documentation + +- [PRAS Documentation](https://nrel.github.io/PRAS/) + +```@contents +Pages = ["api/public.md", "tutorials"] +Depth = 2 +``` -`PRASInterface.jl` is a [`Julia`](http://www.julialang.org) package that provides blah blah * * * diff --git a/docs/src/quick_start_guide.md b/docs/src/quick_start_guide.md deleted file mode 100644 index 73e38d1..0000000 --- a/docs/src/quick_start_guide.md +++ /dev/null @@ -1,3 +0,0 @@ -# Quick Start Guide - -PRASInterface.jl is structured to enable stuff diff --git a/docs/src/tutorials/intro_page.md b/docs/src/tutorials/intro_page.md index df635b4..99da9e8 100644 --- a/docs/src/tutorials/intro_page.md +++ b/docs/src/tutorials/intro_page.md @@ -1 +1,3 @@ # Examples + +Tutorials to be created soon. \ No newline at end of file From 9d27fb3e835b6dff5f7e39d3ae61c3ed6d827200 Mon Sep 17 00:00:00 2001 From: Joseph McKinsey Date: Fri, 22 Nov 2024 14:45:09 -0700 Subject: [PATCH 2/4] Fix format error and respond to comments on github --- docs/src/index.md | 15 +++++++-------- docs/src/tutorials/intro_page.md | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 4ebf324..1346d3e 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -8,31 +8,31 @@ CurrentModule = PRASInterface `PRASInterface.jl` is a [`Julia`](http://www.julialang.org) package that provides an interface to [`PRAS.jl`](https://nrel.github.io/PRAS) from [Sienna](https://www.nrel.gov/analysis/sienna.html)'s [`PowerSystem.jl`](https://github.com/NREL-Sienna/PowerSystems.jl)'s `System` data model. -The Probabilistic Resource Adequacy Suite (PRAS) analyzes the resource adequacy of a bulk power system using monte carlo methods. +The Probabilistic Resource Adequacy Suite (PRAS) analyzes the resource adequacy of a bulk power system using Monte Carlo methods. ## Getting Started To use `PRASInterface.jl`, you first need a `System` from `PowerSystems.jl` -1. Install + 1. Install -```julia +``` ] add PRASInterface ``` -2. Add outage information to generators + 2. Add outage information to generators using the supplemental attribute [`GeometricDistributionForcedOutage`](https://nrel-sienna.github.io/PowerSystems.jl/stable/api/public/#PowerSystems.GeometricDistributionForcedOutage). ```julia using PowerSystems transition_data = GeometricDistributionForcedOutage(; mean_time_to_recovery=10, # Units of hours - outage_transition_probability=0.005 # Probability for outage per hour + outage_transition_probability=0.005, # Probability for outage per hour ) component = get_component(Generator, sys, "test_generator") add_supplemental_attribute!(sys, component, transition_data) ``` -2. Calculate Shortfalls and Expected Unserved Energy on System + 2. Calculate Shortfalls and Expected Unserved Energy on System ```julia using PRASInterface @@ -43,14 +43,13 @@ eue = EUE(shortfalls) ## Documentation -- [PRAS Documentation](https://nrel.github.io/PRAS/) + - [PRAS Documentation](https://nrel.github.io/PRAS/) ```@contents Pages = ["api/public.md", "tutorials"] Depth = 2 ``` - * * * PRASInterface has been developed as part of the Transmission Planning Tools Maintenance project at the U.S. Department of Energy's National Renewable Energy diff --git a/docs/src/tutorials/intro_page.md b/docs/src/tutorials/intro_page.md index 99da9e8..bd23062 100644 --- a/docs/src/tutorials/intro_page.md +++ b/docs/src/tutorials/intro_page.md @@ -1,3 +1,3 @@ # Examples -Tutorials to be created soon. \ No newline at end of file +Tutorials to be created soon. From 1737c884425e78ba0acdad2b29c91958e5aba3c4 Mon Sep 17 00:00:00 2001 From: Joseph McKinsey Date: Fri, 22 Nov 2024 15:00:47 -0700 Subject: [PATCH 3/4] Fix the numbering on the getting started intro --- docs/src/index.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 1346d3e..2442522 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -14,25 +14,27 @@ The Probabilistic Resource Adequacy Suite (PRAS) analyzes the resource adequacy To use `PRASInterface.jl`, you first need a `System` from `PowerSystems.jl` - 1. Install +### 1. Install ``` ] add PRASInterface ``` - 2. Add outage information to generators using the supplemental attribute [`GeometricDistributionForcedOutage`](https://nrel-sienna.github.io/PowerSystems.jl/stable/api/public/#PowerSystems.GeometricDistributionForcedOutage). +### 2. Add Data + +Add outage information to generators using the supplemental attribute [`GeometricDistributionForcedOutage`](https://nrel-sienna.github.io/PowerSystems.jl/stable/api/public/#PowerSystems.GeometricDistributionForcedOutage). ```julia using PowerSystems transition_data = GeometricDistributionForcedOutage(; mean_time_to_recovery=10, # Units of hours - outage_transition_probability=0.005, # Probability for outage per hour + outage_transition_probability=0.005 # Probability for outage per hour ) component = get_component(Generator, sys, "test_generator") add_supplemental_attribute!(sys, component, transition_data) ``` - 2. Calculate Shortfalls and Expected Unserved Energy on System +### 3. Calculate Shortfalls and Expected Unserved Energy on System ```julia using PRASInterface @@ -43,13 +45,14 @@ eue = EUE(shortfalls) ## Documentation - - [PRAS Documentation](https://nrel.github.io/PRAS/) +- [PRAS Documentation](https://nrel.github.io/PRAS/) ```@contents Pages = ["api/public.md", "tutorials"] Depth = 2 ``` + * * * PRASInterface has been developed as part of the Transmission Planning Tools Maintenance project at the U.S. Department of Energy's National Renewable Energy From 96cf54ff2e67a339d4b51d79fd5203d6d051af49 Mon Sep 17 00:00:00 2001 From: Joseph McKinsey <31461013+josephmckinsey@users.noreply.github.com> Date: Fri, 22 Nov 2024 15:06:04 -0700 Subject: [PATCH 4/4] Apply suggestions from review dog code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- docs/src/index.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 2442522..c718188 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -28,7 +28,7 @@ Add outage information to generators using the supplemental attribute [`Geometri using PowerSystems transition_data = GeometricDistributionForcedOutage(; mean_time_to_recovery=10, # Units of hours - outage_transition_probability=0.005 # Probability for outage per hour + outage_transition_probability=0.005, # Probability for outage per hour ) component = get_component(Generator, sys, "test_generator") add_supplemental_attribute!(sys, component, transition_data) @@ -45,14 +45,13 @@ eue = EUE(shortfalls) ## Documentation -- [PRAS Documentation](https://nrel.github.io/PRAS/) + - [PRAS Documentation](https://nrel.github.io/PRAS/) ```@contents Pages = ["api/public.md", "tutorials"] Depth = 2 ``` - * * * PRASInterface has been developed as part of the Transmission Planning Tools Maintenance project at the U.S. Department of Energy's National Renewable Energy