Model Outages
This how-to shows how to attach outage data to a Device and configure post-contingency monitoring. The runnable examples use a line contingency on and monitor a MonitoredLine — a typical pattern for security-constrained transmission studies. For background on outage types, see Outage and contingency data.
Prerequisites
using PowerSystems
using PowerSystemCaseBuilder
sys = build_system(PSITestSystems, "c_sys5_ml")| System | |
| Property | Value |
|---|---|
| Name | |
| Description | |
| System Units Base | SYSTEM_BASE |
| Base Power | 100.0 |
| Base Frequency | 60.0 |
| Num Components | 25 |
| Static Components | |
| Type | Count |
|---|---|
| ACBus | 5 |
| Arc | 6 |
| Line | 5 |
| MonitoredLine | 1 |
| PowerLoad | 3 |
| ThermalStandard | 5 |
| Forecast Summary | |||||||||
| owner_type | owner_category | name | time_series_type | initial_timestamp | resolution | count | horizon | interval | window_count |
|---|---|---|---|---|---|---|---|---|---|
| String | String | String | String | String | Dates.CompoundPeriod | Int64 | Dates.CompoundPeriod | Dates.CompoundPeriod | Int64 |
| PowerLoad | Component | max_active_power | Deterministic | 2024-01-01T00:00:00 | 1 hour | 3 | 1 day | 1 day | 2 |
The c_sys5_ml test system includes one MonitoredLine ("1") with operator flow limits alongside ordinary Lines.
Attach a deterministic forced outage
FixedForcedOutage represents equipment that is either in service (0.0) or outaged (1.0). Attach it with add_supplemental_attribute! to the contingency element — here, Line "2":
contingency_line = get_component(Line, sys, "2")
outage = FixedForcedOutage(; outage_status = 1.0)
add_supplemental_attribute!(sys, contingency_line, outage)Limit post-contingency monitoring
Every Outage carries a monitored_components set of Device UUIDs. Populate it when a downstream security-constrained model should monitor only specific equipment after this outage:
monitored_line = get_component(MonitoredLine, sys, "1")
outage = FixedForcedOutage(;
outage_status = 1.0,
monitored_components = [monitored_line],
)
add_supplemental_attribute!(sys, contingency_line, outage)
get_monitored_components(outage)Set{Base.UUID} with 1 element:
Base.UUID("d05ca97b-8f80-4f9e-b3a5-a8b3e3ebda6a")Update the monitored set at any time. set_monitored_components! replaces the entire set; singular and plural add_/remove_* methods append or remove individual entries:
clear_monitored_components!(outage)
set_monitored_components!(outage, get_components(MonitoredLine, sys))
add_monitored_component!(outage, get_component(Line, sys, "3"))
length(get_monitored_components(outage))2Attach a planned outage
PlannedOutage references a named time series for the outage schedule. Add the time series with add_time_series! first, then attach the attribute:
planned = PlannedOutage(; outage_schedule = "maintenance_schedule")
add_supplemental_attribute!(sys, contingency_line, planned)
get_outage_schedule(planned)"maintenance_schedule"See also
- Outage and contingency data — outage types and monitoring semantics
- Attach supplemental data to components — general attachment pattern
MonitoredLine— transmission lines with operator flow limits for post-contingency monitoring- Working with Time Series — time series for outage schedules