-
Notifications
You must be signed in to change notification settings - Fork 70
/
topological_elements.jl
59 lines (53 loc) · 1.34 KB
/
topological_elements.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
"""
Abstract type to represent the structure and interconnectedness of the system
"""
abstract type Topology <: Component end
"""
Represents a geographical region of system components.
All subtypes must implement the method `get_aggregation_topology_accessor`.
"""
abstract type AggregationTopology <: Topology end
"""
Abstract type to represent any type of Bus, AC or DC.
"""
abstract type Bus <: Topology end
"""
Return the method to be called on a ACBus to get its AggregationTopology value for this type.
"""
function get_aggregation_topology_accessor(::Type{T}) where {T <: AggregationTopology}
error("get_aggregation_topology_accessor must be implemented for $T")
return
end
function check_bus_params(
number,
name,
bustype,
angle,
voltage,
voltage_limits,
base_voltage,
area,
load_zone,
ext,
internal,
)
if !isnothing(bustype)
if bustype == ACBusTypes.SLACK
bustype = ACBusTypes.REF
@debug "Changed bus type from SLACK to" _group = IS.LOG_GROUP_SYSTEM bustype
#elseif bustype == BusTypes.ISOLATED
# throw(DataFormatError("isolated buses are not supported; name=$name"))
end
end
return number,
name,
bustype,
angle,
voltage,
voltage_limits,
base_voltage,
area,
load_zone,
ext,
internal
end