@@ -18,6 +18,7 @@ function construct_services!(
18
18
stage:: ArgumentConstructStage ,
19
19
services_template:: ServicesModelContainer ,
20
20
devices_template:: DevicesModelContainer ,
21
+ network_model:: NetworkModel{<:PM.AbstractPowerModel} ,
21
22
)
22
23
isempty (services_template) && return
23
24
incompatible_device_types = get_incompatible_devices (devices_template)
@@ -37,6 +38,7 @@ function construct_services!(
37
38
service_model,
38
39
devices_template,
39
40
incompatible_device_types,
41
+ network_model,
40
42
)
41
43
end
42
44
groupservice === nothing || construct_service! (
@@ -46,6 +48,7 @@ function construct_services!(
46
48
services_template[groupservice],
47
49
devices_template,
48
50
incompatible_device_types,
51
+ network_model,
49
52
)
50
53
return
51
54
end
@@ -56,6 +59,7 @@ function construct_services!(
56
59
stage:: ModelConstructStage ,
57
60
services_template:: ServicesModelContainer ,
58
61
devices_template:: DevicesModelContainer ,
62
+ network_model:: NetworkModel{<:PM.AbstractPowerModel} ,
59
63
)
60
64
isempty (services_template) && return
61
65
incompatible_device_types = get_incompatible_devices (devices_template)
@@ -74,6 +78,7 @@ function construct_services!(
74
78
service_model,
75
79
devices_template,
76
80
incompatible_device_types,
81
+ network_model,
77
82
)
78
83
end
79
84
groupservice === nothing || construct_service! (
@@ -83,6 +88,7 @@ function construct_services!(
83
88
services_template[groupservice],
84
89
devices_template,
85
90
incompatible_device_types,
91
+ network_model,
86
92
)
87
93
return
88
94
end
@@ -94,6 +100,7 @@ function construct_service!(
94
100
model:: ServiceModel{SR, RangeReserve} ,
95
101
devices_template:: Dict{Symbol, DeviceModel} ,
96
102
incompatible_device_types:: Set{<:DataType} ,
103
+ :: NetworkModel{<:PM.AbstractPowerModel} ,
97
104
) where {SR <: PSY.Reserve }
98
105
name = get_service_name (model)
99
106
service = PSY. get_component (SR, sys, name)
@@ -119,6 +126,7 @@ function construct_service!(
119
126
model:: ServiceModel{SR, RangeReserve} ,
120
127
devices_template:: Dict{Symbol, DeviceModel} ,
121
128
incompatible_device_types:: Set{<:DataType} ,
129
+ :: NetworkModel{<:PM.AbstractPowerModel} ,
122
130
) where {SR <: PSY.Reserve }
123
131
name = get_service_name (model)
124
132
service = PSY. get_component (SR, sys, name)
@@ -148,6 +156,7 @@ function construct_service!(
148
156
model:: ServiceModel{SR, RangeReserve} ,
149
157
devices_template:: Dict{Symbol, DeviceModel} ,
150
158
incompatible_device_types:: Set{<:DataType} ,
159
+ :: NetworkModel{<:PM.AbstractPowerModel} ,
151
160
) where {SR <: PSY.StaticReserve }
152
161
name = get_service_name (model)
153
162
service = PSY. get_component (SR, sys, name)
@@ -172,6 +181,7 @@ function construct_service!(
172
181
model:: ServiceModel{SR, RangeReserve} ,
173
182
devices_template:: Dict{Symbol, DeviceModel} ,
174
183
incompatible_device_types:: Set{<:DataType} ,
184
+ :: NetworkModel{<:PM.AbstractPowerModel} ,
175
185
) where {SR <: PSY.StaticReserve }
176
186
name = get_service_name (model)
177
187
service = PSY. get_component (SR, sys, name)
@@ -200,6 +210,7 @@ function construct_service!(
200
210
model:: ServiceModel{SR, StepwiseCostReserve} ,
201
211
devices_template:: Dict{Symbol, DeviceModel} ,
202
212
incompatible_device_types:: Set{<:DataType} ,
213
+ :: NetworkModel{<:PM.AbstractPowerModel} ,
203
214
) where {SR <: PSY.Reserve }
204
215
name = get_service_name (model)
205
216
service = PSY. get_component (SR, sys, name)
@@ -224,6 +235,7 @@ function construct_service!(
224
235
model:: ServiceModel{SR, StepwiseCostReserve} ,
225
236
devices_template:: Dict{Symbol, DeviceModel} ,
226
237
incompatible_device_types:: Set{<:DataType} ,
238
+ :: NetworkModel{<:PM.AbstractPowerModel} ,
227
239
) where {SR <: PSY.Reserve }
228
240
name = get_service_name (model)
229
241
service = PSY. get_component (SR, sys, name)
@@ -246,6 +258,7 @@ function construct_service!(
246
258
model:: ServiceModel{S, T} ,
247
259
devices_template:: Dict{Symbol, DeviceModel} ,
248
260
:: Set{<:DataType} ,
261
+ :: NetworkModel{<:PM.AbstractPowerModel} ,
249
262
) where {S <: PSY.AGC , T <: AbstractAGCFormulation }
250
263
services = get_available_components (S, sys)
251
264
agc_areas = PSY. get_area .(services)
@@ -299,6 +312,7 @@ function construct_service!(
299
312
model:: ServiceModel{S, T} ,
300
313
devices_template:: Dict{Symbol, DeviceModel} ,
301
314
:: Set{<:DataType} ,
315
+ :: NetworkModel{<:PM.AbstractPowerModel} ,
302
316
) where {S <: PSY.AGC , T <: AbstractAGCFormulation }
303
317
areas = PSY. get_components (PSY. Area, sys)
304
318
services = get_available_components (S, sys)
@@ -340,6 +354,7 @@ function construct_service!(
340
354
model:: ServiceModel{SR, GroupReserve} ,
341
355
:: Dict{Symbol, DeviceModel} ,
342
356
:: Set{<:DataType} ,
357
+ :: NetworkModel{<:PM.AbstractPowerModel} ,
343
358
) where {SR <: PSY.StaticReserveGroup }
344
359
name = get_service_name (model)
345
360
service = PSY. get_component (SR, sys, name)
@@ -357,6 +372,7 @@ function construct_service!(
357
372
model:: ServiceModel{SR, GroupReserve} ,
358
373
:: Dict{Symbol, DeviceModel} ,
359
374
:: Set{<:DataType} ,
375
+ :: NetworkModel{<:PM.AbstractPowerModel} ,
360
376
) where {SR <: PSY.StaticReserveGroup }
361
377
name = get_service_name (model)
362
378
service = PSY. get_component (SR, sys, name)
@@ -381,6 +397,7 @@ function construct_service!(
381
397
model:: ServiceModel{SR, RampReserve} ,
382
398
devices_template:: Dict{Symbol, DeviceModel} ,
383
399
incompatible_device_types:: Set{<:DataType} ,
400
+ :: NetworkModel{<:PM.AbstractPowerModel} ,
384
401
) where {SR <: PSY.Reserve }
385
402
name = get_service_name (model)
386
403
service = PSY. get_component (SR, sys, name)
@@ -406,6 +423,7 @@ function construct_service!(
406
423
model:: ServiceModel{SR, RampReserve} ,
407
424
devices_template:: Dict{Symbol, DeviceModel} ,
408
425
incompatible_device_types:: Set{<:DataType} ,
426
+ :: NetworkModel{<:PM.AbstractPowerModel} ,
409
427
) where {SR <: PSY.Reserve }
410
428
name = get_service_name (model)
411
429
service = PSY. get_component (SR, sys, name)
@@ -436,6 +454,7 @@ function construct_service!(
436
454
model:: ServiceModel{SR, NonSpinningReserve} ,
437
455
devices_template:: Dict{Symbol, DeviceModel} ,
438
456
incompatible_device_types:: Set{<:DataType} ,
457
+ :: NetworkModel{<:PM.AbstractPowerModel} ,
439
458
) where {SR <: PSY.ReserveNonSpinning }
440
459
name = get_service_name (model)
441
460
service = PSY. get_component (SR, sys, name)
@@ -460,6 +479,7 @@ function construct_service!(
460
479
model:: ServiceModel{SR, NonSpinningReserve} ,
461
480
devices_template:: Dict{Symbol, DeviceModel} ,
462
481
incompatible_device_types:: Set{<:DataType} ,
482
+ :: NetworkModel{<:PM.AbstractPowerModel} ,
463
483
) where {SR <: PSY.ReserveNonSpinning }
464
484
name = get_service_name (model)
465
485
service = PSY. get_component (SR, sys, name)
@@ -497,6 +517,7 @@ function construct_service!(
497
517
model:: ServiceModel{T, ConstantMaxInterfaceFlow} ,
498
518
devices_template:: Dict{Symbol, DeviceModel} ,
499
519
incompatible_device_types:: Set{<:DataType} ,
520
+ network_model:: NetworkModel{<:PM.AbstractPowerModel} ,
500
521
) where {T <: PSY.TransmissionInterface }
501
522
interfaces = get_available_components (T, sys)
502
523
if get_use_slacks (model)
@@ -524,6 +545,7 @@ function construct_service!(
524
545
model:: ServiceModel{T, ConstantMaxInterfaceFlow} ,
525
546
devices_template:: Dict{Symbol, DeviceModel} ,
526
547
incompatible_device_types:: Set{<:DataType} ,
548
+ network_model:: NetworkModel{<:PM.AbstractActivePowerModel} ,
527
549
) where {T <: PSY.TransmissionInterface }
528
550
name = get_service_name (model)
529
551
service = PSY. get_component (T, sys, name)
0 commit comments