Skip to content

Commit

Permalink
Merge branch 'missing_docstrings' into docs_cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kdayday committed Sep 16, 2024
2 parents a7ada48 + ecab80f commit 25c4141
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 14 deletions.
18 changes: 5 additions & 13 deletions docs/src/api/public.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Pages = ["PowerSystems.jl",
"topological_elements.jl",
"dynamic_models.jl",
"static_models.jl",
"subsystems.jl",
"static_injection_subsystem.jl",
"dynamic_models.jl",
"operational_cost.jl",
Expand Down Expand Up @@ -76,17 +77,6 @@ Private = false
Filter = t -> t ∈ [System]
```

```@autodocs
Modules = [PowerSystems]
Pages = ["parsers/power_system_table_data.jl",
"parsers/power_models_data.jl",
"parsers/TAMU_data.jl",
"parsers/psse_dynamic_data.jl"]
Public = true
Private = false
Filter = t -> t ∈ [System]
```

```@autodocs
Modules = [PowerSystems]
Pages = ["base.jl"]
Expand All @@ -97,7 +87,8 @@ Filter = t -> t ∉ [System]

```@autodocs
Modules = [PowerSystems]
Pages = ["utils/print.jl"]
Pages = ["utils/print.jl",
"utils/generate_struct_files.jl"]
Public = true
Private = false
Filter = t -> t ∉ [System]
Expand All @@ -119,7 +110,8 @@ Modules = [PowerSystems]
Pages = ["parsers/power_system_table_data.jl",
"parsers/power_models_data.jl",
"parsers/TAMU_data.jl",
"parsers/psse_dynamic_data.jl"]
"parsers/psse_dynamic_data.jl",
"parsers/pm_io/common.jl"]
Public = true
Private = false
Filter = t -> t ∉ [System]
Expand Down
74 changes: 74 additions & 0 deletions docs/src/model_library/outer_control.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Public = true
Private = false
```

## Active Power Controllers

### Virtual Inertia

```@autodocs
Expand All @@ -20,6 +22,48 @@ Public = true
Private = false
```

### Active Power Droop

```@autodocs
Modules = [PowerSystems]
Pages = ["generated/ActivePowerDroop.jl"]
Order = [:type, :function]
Public = true
Private = false
```

### Active Power PI

```@autodocs
Modules = [PowerSystems]
Pages = ["generated/ActivePowerPI.jl"]
Order = [:type, :function]
Public = true
Private = false
```

### Active Virtual Oscillator

```@autodocs
Modules = [PowerSystems]
Pages = ["generated/ActiveVirtualOscillator.jl"]
Order = [:type, :function]
Public = true
Private = false
```

### Active Renewable Controller Type AB

```@autodocs
Modules = [PowerSystems]
Pages = ["generated/ActiveRenewableControllerAB.jl"]
Order = [:type, :function]
Public = true
Private = false
```

## Reactive Power Controllers

### Reactive Power Droop

```@autodocs
Expand All @@ -29,3 +73,33 @@ Order = [:type, :function]
Public = true
Private = false
```

### Reactive Power PI

```@autodocs
Modules = [PowerSystems]
Pages = ["generated/ReactivePowerPI.jl"]
Order = [:type, :function]
Public = true
Private = false
```

### Reactive Virtual Oscillator

```@autodocs
Modules = [PowerSystems]
Pages = ["generated/ReactiveVirtualOscillator.jl"]
Order = [:type, :function]
Public = true
Private = false
```

### Reactive Renewable Controller Type AB

```@autodocs
Modules = [PowerSystems]
Pages = ["generated/ReactiveRenewableControllerAB.jl"]
Order = [:type, :function]
Public = true
Private = false
```
13 changes: 13 additions & 0 deletions src/models/OuterControl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,21 @@ function OuterControl(;
return OuterControl(active_power_control, reactive_power_control, ext, states, n_states)
end

"""Get `active_power_control` from [`OuterControl`](@ref)."""
get_active_power_control(value::OuterControl) = value.active_power_control
"""Get `reactive_power_control` from [`OuterControl`](@ref)."""
get_reactive_power_control(value::OuterControl) = value.reactive_power_control
"""Get `ext` from [`OuterControl`](@ref)."""
get_ext(value::OuterControl) = value.ext
"""Get `states` from [`OuterControl`](@ref)."""
get_states(value::OuterControl) = value.states
"""Get `n_states` from [`OuterControl`](@ref)."""
get_n_states(value::OuterControl) = value.n_states
"""Set [`OuterControl`](@ref) `active_power_control`."""
set_active_power_control!(value::OuterControl, val) =
value.active_power_control = val
"""Set [`OuterControl`](@ref) `reactive_power_control`."""
set_reactive_power_control!(value::OuterControl, val) =
value.reactive_power_control = val
"""Set [`OuterControl`](@ref) `ext`."""
set_ext!(value::OuterControl, val) = value.ext = val
7 changes: 6 additions & 1 deletion src/parsers/pm_io/common.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
"""
parse_file(file; import_all)
parse_file(
file;
import_all = false,
validate = true,
correct_branch_rating = true,
)
Parses a Matpower .m `file` or PTI (PSS(R)E-v33) .raw `file` into a
PowerModels data structure. All fields from PTI files will be imported if
Expand Down

0 comments on commit 25c4141

Please sign in to comment.