Skip to content

Commit 46687d3

Browse files
authored
Merge pull request #1143 from kdayday/missing_docstrings
Add missing docstrings, update to Documenter 1.7, format markdown files
2 parents 86d9c12 + 98b1aa7 commit 46687d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1448
-970
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ assignees: ''
1010
**If this is a question, something isn't working or an idea please start a Q&A discussion in the [Discussion tab](https://github.com/NREL-Sienna/PowerSimulations.jl/discussions)**
1111
Open a bug report only if you can provide the details below
1212

13-
1413
**Describe the bug**
1514
A clear and concise description of what the bug is.
1615

CONTRIBUTING.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Contributing
22

33
Community driven development of this package is encouraged. To maintain code quality standards, please adhere to the following guidelines when contributing:
4-
- To get started, <a href="https://www.clahub.com/agreements/NREL/PowerSimulations.jl">sign the Contributor License Agreement</a>.
5-
- Please do your best to adhere to the lengthy [Julia style guide](https://docs.julialang.org/en/latest/manual/style-guide/).
6-
- To submit code contributions, [fork](https://help.github.com/articles/fork-a-repo/) the repository, commit your changes, and [submit a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/).
4+
5+
- To get started, <a href="https://www.clahub.com/agreements/NREL/PowerSimulations.jl">sign the Contributor License Agreement</a>.
6+
- Please do your best to adhere to the lengthy [Julia style guide](https://docs.julialang.org/en/latest/manual/style-guide/).
7+
- To submit code contributions, [fork](https://help.github.com/articles/fork-a-repo/) the repository, commit your changes, and [submit a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/).

README.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,23 @@
99

1010
`PowerSimulations.jl` is a Julia package for power system modeling and simulation of Power Systems operations. The objectives of the package are:
1111

12-
- Provide a flexible modeling framework that can accommodate problems of different complexity and at different time-scales.
12+
- Provide a flexible modeling framework that can accommodate problems of different complexity and at different time-scales.
1313

14-
- Streamline the construction of large scale optimization problems to avoid repetition of work when adding/modifying model details.
15-
16-
- Exploit Julia's capabilities to improve computational performance of large scale power system quasi-static simulations.
14+
- Streamline the construction of large scale optimization problems to avoid repetition of work when adding/modifying model details.
15+
- Exploit Julia's capabilities to improve computational performance of large scale power system quasi-static simulations.
1716

1817
The flexible modeling framework is enabled through a modular set of capabilities that enable scalable power system analysis and exploration of new analysis methods. The modularity of PowerSimulations results from the structure of the simulations enabled by the package:
1918

20-
- _Simulations_ define a set of problems that can be solved using numerical techniques.
19+
- _Simulations_ define a set of problems that can be solved using numerical techniques.
2120

2221
For example, an annual production cost modeling simulation can be created by formulating a unit commitment model against system data to assemble a set of 365 daily time-coupled scheduling problems.
2322

2423
## Simulations enabled by PowerSimulations
2524

26-
- Integrated Resource Planning
27-
- Production Cost Modeling
28-
- Market Simulations
29-
25+
- Integrated Resource Planning
26+
- Production Cost Modeling
27+
- Market Simulations
28+
3029
## Installation
3130

3231
```julia
@@ -50,4 +49,4 @@ Contributions to the development and enhancement of PowerSimulations is welcome.
5049

5150
## License
5251

53-
PowerSimulations is released under a BSD [license](https://github.com/NREL-Sienna/PowerSimulations.jl/blob/main/LICENSE). PowerSimulations has been developed as part of the Scalable Integrated Infrastructure Planning (SIIP) initiative at the U.S. Department of Energy's National Renewable Energy Laboratory ([NREL](https://www.nrel.gov/)) Software Record SWR-23-104.
52+
PowerSimulations is released under a BSD [license](https://github.com/NREL-Sienna/PowerSimulations.jl/blob/main/LICENSE). PowerSimulations has been developed as part of the Scalable Integrated Infrastructure Planning (SIIP) initiative at the U.S. Department of Energy's National Renewable Energy Laboratory ([NREL](https://www.nrel.gov/)) Software Record SWR-23-104.

docs/Project.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ PowerSystems = "bcd98974-b02a-5e2f-9ee0-a103f5c450dd"
1616
TimeSeries = "9e3dc215-6440-5c97-bce1-76c03772f85e"
1717

1818
[compat]
19-
Documenter = "0.27"
19+
Documenter = "^1.7"
2020
InfrastructureSystems = "2"
2121
julia = "^1.6"
22-
Latexify = "=0.16.3"

docs/make.jl

+5-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ pages = OrderedDict(
2929
"Code Base Developer Guide" => Any[
3030
"Developer Guide" => "code_base_developer_guide/developer.md",
3131
"Troubleshooting" => "code_base_developer_guide/troubleshooting.md",
32+
"Internals" => "code_base_developer_guide/internal.md",
3233
],
3334
"Formulation Library" => Any[
3435
"Introduction" => "formulation_library/Introduction.md",
@@ -47,9 +48,11 @@ pages = OrderedDict(
4748

4849
makedocs(;
4950
modules = [PowerSimulations],
50-
format = Documenter.HTML(; prettyurls = haskey(ENV, "GITHUB_ACTIONS")),
51+
format = Documenter.HTML(;
52+
prettyurls = haskey(ENV, "GITHUB_ACTIONS"),
53+
size_threshold = nothing),
5154
sitename = "PowerSimulations.jl",
52-
authors = "Jose Daniel Lara, Daniel Thom and Clayton Barrows",
55+
authors = "Jose Daniel Lara, Daniel Thom, Kate Doubleday, Rodrigo Henriquez-Auba, and Clayton Barrows",
5356
pages = Any[p for p in pages],
5457
)
5558

docs/src/api/PowerSimulations.md

+105-45
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,10 @@ end
77

88
# API Reference
99

10-
## Table of Contents
11-
12-
* [Device Models](#Device-Models)
13-
* [Formulations](#Formulations)
14-
* [Problem Templates](#Problem-Templates)
15-
* [Decision Models](#Decision-Models)
16-
* [Emulation Models](#Emulation-Models)
17-
* [Service Models](#Service-Models)
18-
* [Simulation Models](#Simulation-Models)
19-
* [Variables](#Variables)
20-
* [Common Variables](#Common-Variables)
21-
* [Thermal Unit Variables](#Thermal-Unit-Variables)
22-
* [Storage Unit Variables](#Storage-Unit-Variables)
23-
* [Branches and Network Variables](#Branches-and-Network-Variables)
24-
* [Services Variables](#Services-Variables)
25-
* [Feedforward Variables](#Feedforward-Variables)
26-
* [Constraints](#Constraints)
27-
* [Common Constraints](#Common-Constraints)
28-
* [Network Constraints](#Network-Constraints)
29-
* [Power Variable Limit Constraints](#Power-Variable-Limit-Constraints)
30-
* [Services Constraints](#Services-Constraints)
31-
* [Thermal Unit Constraints](#Thermal-Unit-Constraints)
32-
* [Renewable Unit Constraints](#Renewable-Unit-Constraints)
33-
* [Branches Constraints](#Branches-Constraints)
34-
* [Feedforward Constraints](#Feedforward-Constraints)
35-
* [Parameters](#Parameters)
36-
* [Time Series Parameters](#Time-Series-Parameters)
37-
* [Variable Value Parameters](#Variable-Value-Parameters)
38-
* [Objective Function Parameters](#Objective-Function-Parameters)
10+
```@contents
11+
Pages = ["PowerSimulations.md"]
12+
Depth = 3
13+
```
3914

4015
```@raw html
4116
&nbsp;
@@ -56,32 +31,40 @@ Refer to the [Formulations Page](@ref formulation_library) for each Abstract Dev
5631

5732
### Problem Templates
5833

59-
Refer to the [Problem Templates Page](@ref op_problem_template) for available `ProblemTemplate`s.
60-
34+
```@autodocs
35+
Modules = [PowerSimulations]
36+
Pages = ["problem_template.jl",
37+
"operation_problem_templates.jl",
38+
]
39+
Order = [:type, :function]
40+
Public = true
41+
Private = false
42+
```
6143

6244
```@raw html
6345
&nbsp;
6446
&nbsp;
6547
```
6648

67-
---
49+
* * *
6850

6951
## Decision Models
7052

71-
```@docs
72-
DecisionModel
73-
DecisionModel(::Type{M} where {M <: DecisionProblem}, ::ProblemTemplate, ::PSY.System, ::Union{Nothing, JuMP.Model})
74-
DecisionModel(::AbstractString, ::MOI.OptimizerWithAttributes)
75-
build!(::DecisionModel)
76-
solve!(::DecisionModel)
53+
```@autodocs
54+
Modules = [PowerSimulations]
55+
Pages = ["decision_model.jl",
56+
]
57+
Order = [:type, :function]
58+
Public = true
59+
Private = false
7760
```
7861

7962
```@raw html
8063
&nbsp;
8164
&nbsp;
8265
```
8366

84-
---
67+
* * *
8568

8669
## Emulation Models
8770

@@ -91,14 +74,15 @@ EmulationModel(::Type{M} where {M <: EmulationProblem}, ::ProblemTemplate, ::PSY
9174
EmulationModel(::AbstractString, ::MOI.OptimizerWithAttributes)
9275
build!(::EmulationModel)
9376
run!(::EmulationModel)
77+
solve!(::Int, ::EmulationModel{<:EmulationProblem}, ::Dates.DateTime, ::SimulationStore)
9478
```
9579

9680
```@raw html
9781
&nbsp;
9882
&nbsp;
9983
```
10084

101-
---
85+
* * *
10286

10387
## Service Models
10488

@@ -113,13 +97,14 @@ ServiceModel
11397
&nbsp;
11498
```
11599

116-
---
100+
* * *
117101

118102
## Simulation Models
119103

120104
Refer to the [Simulations Page](@ref running_a_simulation) to explanations on how to setup a Simulation, with Sequencing and Feedforwards.
121105

122106
```@docs
107+
InitialCondition
123108
SimulationModels
124109
SimulationSequence
125110
Simulation
@@ -128,16 +113,37 @@ build!(::Simulation)
128113
execute!(::Simulation)
129114
```
130115

116+
```@autodocs
117+
Modules = [PowerSimulations]
118+
Pages = ["simulation_partitions.jl",
119+
]
120+
Order = [:type, :function]
121+
Public = true
122+
Private = false
123+
```
124+
131125
```@raw html
132126
&nbsp;
133127
&nbsp;
134128
```
135129

136-
---
130+
## Chronology Models
137131

138-
# Variables
132+
```@autodocs
133+
Modules = [PowerSimulations]
134+
Pages = ["initial_condition_chronologies.jl",
135+
]
136+
Order = [:type, :function]
137+
Public = true
138+
Private = false
139+
```
140+
141+
* * *
142+
143+
## Variables
139144

140145
For a list of variables for each device refer to its Formulations page.
146+
141147
### Common Variables
142148

143149
```@docs
@@ -165,6 +171,9 @@ PowerOutput
165171

166172
```@docs
167173
ReservationVariable
174+
EnergyVariable
175+
ActivePowerOutVariable
176+
ActivePowerInVariable
168177
```
169178

170179
### Branches and Network Variables
@@ -208,7 +217,7 @@ LowerBoundFeedForwardSlack
208217
&nbsp;
209218
```
210219

211-
---
220+
* * *
212221

213222
## Constraints
214223

@@ -225,6 +234,7 @@ PieceWiseLinearCostConstraint
225234
CopperPlateBalanceConstraint
226235
NodalBalanceActiveConstraint
227236
NodalBalanceReactiveConstraint
237+
AreaParticipationAssignmentConstraint
228238
```
229239

230240
### Power Variable Limit Constraints
@@ -289,7 +299,7 @@ FeedforwardLowerBoundConstraint
289299
&nbsp;
290300
```
291301

292-
---
302+
* * *
293303

294304
## Parameters
295305

@@ -315,3 +325,53 @@ FixValueParameter
315325
```@docs
316326
CostFunctionParameter
317327
```
328+
329+
## Results
330+
331+
### Acessing Optimization Model
332+
333+
```@autodocs
334+
Modules = [PowerSimulations]
335+
Pages = ["optimization_container.jl",
336+
"optimization_debugging.jl"
337+
]
338+
Order = [:type, :function]
339+
Public = true
340+
Private = false
341+
```
342+
343+
### Accessing Problem Results
344+
345+
```@autodocs
346+
Modules = [PowerSimulations]
347+
Pages = ["operation/problem_results.jl",
348+
]
349+
Order = [:type, :function]
350+
Public = true
351+
Private = false
352+
```
353+
354+
### Accessing Simulation Results
355+
356+
```@autodocs
357+
Modules = [PowerSimulations]
358+
Pages = ["simulation_results.jl",
359+
"simulation_problem_results.jl",
360+
"simulation_partition_results.jl",
361+
"hdf_simulation_store.jl"
362+
]
363+
Order = [:type, :function]
364+
Public = true
365+
Private = false
366+
```
367+
368+
## Simulation Recorder
369+
370+
```@autodocs
371+
Modules = [PowerSimulations]
372+
Pages = ["utils/recorder_events.jl",
373+
]
374+
Order = [:type, :function]
375+
Public = true
376+
Private = false
377+
```

docs/src/code_base_developer_guide/developer.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ In order to contribute to `PowerSystems.jl` repository please read the following
44
[`InfrastructureSystems.jl`](https://github.com/NREL-Sienna/InfrastructureSystems.jl)
55
documentation in detail:
66

7-
1. [Style Guide](https://nrel-Sienna.github.io/InfrastructureSystems.jl/stable/style/)
8-
2. [Contributing Guidelines](https://github.com/NREL-Sienna/PowerSystems.jl/blob/main/CONTRIBUTING.md)
7+
1. [Style Guide](https://nrel-Sienna.github.io/InfrastructureSystems.jl/stable/style/)
8+
2. [Contributing Guidelines](https://github.com/NREL-Sienna/PowerSystems.jl/blob/main/CONTRIBUTING.md)
99

1010
Pull requests are always welcome to fix bugs or add additional modeling capabilities.
1111

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
```@meta
2+
CollapsedDocStrings = true
3+
```
4+
5+
# Internal API
6+
7+
```@autodocs
8+
Modules = [PowerSimulations]
9+
Public = false
10+
```

0 commit comments

Comments
 (0)