-
Notifications
You must be signed in to change notification settings - Fork 70
/
Area.jl
77 lines (68 loc) · 3.03 KB
/
Area.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#=
This file is auto-generated. Do not edit.
=#
#! format: off
"""
mutable struct Area <: AggregationTopology
name::String
peak_active_power::Float64
peak_reactive_power::Float64
load_response::Float64
time_series_container::InfrastructureSystems.TimeSeriesContainer
internal::InfrastructureSystemsInternal
end
A collection of buses for control purposes.
# Arguments
- `name::String`
- `peak_active_power::Float64`
- `peak_reactive_power::Float64`
- `load_response::Float64`
- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage
- `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify
"""
mutable struct Area <: AggregationTopology
name::String
peak_active_power::Float64
peak_reactive_power::Float64
load_response::Float64
"internal time_series storage"
time_series_container::InfrastructureSystems.TimeSeriesContainer
"power system internal reference, do not modify"
internal::InfrastructureSystemsInternal
end
function Area(name, peak_active_power=0.0, peak_reactive_power=0.0, load_response=0.0, time_series_container=InfrastructureSystems.TimeSeriesContainer(), )
Area(name, peak_active_power, peak_reactive_power, load_response, time_series_container, InfrastructureSystemsInternal(), )
end
function Area(; name, peak_active_power=0.0, peak_reactive_power=0.0, load_response=0.0, time_series_container=InfrastructureSystems.TimeSeriesContainer(), internal=InfrastructureSystemsInternal(), )
Area(name, peak_active_power, peak_reactive_power, load_response, time_series_container, internal, )
end
# Constructor for demo purposes; non-functional.
function Area(::Nothing)
Area(;
name="init",
peak_active_power=0.0,
peak_reactive_power=0.0,
load_response=0.0,
time_series_container=InfrastructureSystems.TimeSeriesContainer(),
)
end
"""Get [`Area`](@ref) `name`."""
get_name(value::Area) = value.name
"""Get [`Area`](@ref) `peak_active_power`."""
get_peak_active_power(value::Area) = get_value(value, value.peak_active_power)
"""Get [`Area`](@ref) `peak_reactive_power`."""
get_peak_reactive_power(value::Area) = get_value(value, value.peak_reactive_power)
"""Get [`Area`](@ref) `load_response`."""
get_load_response(value::Area) = value.load_response
"""Get [`Area`](@ref) `time_series_container`."""
get_time_series_container(value::Area) = value.time_series_container
"""Get [`Area`](@ref) `internal`."""
get_internal(value::Area) = value.internal
"""Set [`Area`](@ref) `peak_active_power`."""
set_peak_active_power!(value::Area, val) = value.peak_active_power = set_value(value, val)
"""Set [`Area`](@ref) `peak_reactive_power`."""
set_peak_reactive_power!(value::Area, val) = value.peak_reactive_power = set_value(value, val)
"""Set [`Area`](@ref) `load_response`."""
set_load_response!(value::Area, val) = value.load_response = val
"""Set [`Area`](@ref) `time_series_container`."""
set_time_series_container!(value::Area, val) = value.time_series_container = val