In https://github.com/NREL-Sienna/irtoc_experiments/blob/main/SplitArea_ReserveDeliverability/rts_demo.jl, when use the setting as:
convert_to_monitored_line = [(name="A28", flow_limit=20.0)]
for sys in [sys1, sys2]
add_interchanges!(sys)
for line_data in convert_to_monitored_line
l = get_component(Line, sys, line_data.name)
convert_component!(sys, l, MonitoredLine)
l = get_component(MonitoredLine, sys, line_data.name)
set_flow_limits!(l, (from_to=line_data.flow_limit, to_from=line_data.flow_limit))
end
end
set_device_model!(
template_uc2,
DeviceModel(
MonitoredLine,
StaticBranchUnbounded;
use_slacks=true,
attributes=Dict("filter_function" => x -> get_name(x) in modeled_lines),
),
)
get the error as:
┌ Error: Failed to build UC0
└ @ PowerSimulations C:\Users\hchen2.julia\packages\PowerSimulations\Ii1BL\src\simulation\simulation.jl:345
┌ Error: Simulation build failed
│ exception =
│ MethodError: no method matching get_rating(::Line, ::Type{PostContingencyEmergencyRateLimitConstraint})
│ The function get_rating exists, but no method is defined for this combination of argument types.
│
│ Closest candidates are:
│ get_rating(::Line)
│ @ PowerSystems C:\Users\hchen2.julia\packages\PowerSystems\555M3\src\models\generated\Line.jl:128
│ get_rating(::T) where T<:Device
│ @ PowerSystems C:\Users\hchen2.julia\packages\PowerSystems\555M3\src\models\supplemental_accessors.jl:151
│ get_rating(::Transformer3W)
│ @ PowerSystems C:\Users\hchen2.julia\packages\PowerSystems\555M3\src\models\generated\Transformer3W.jl:325
│ ...
│
In https://github.com/NREL-Sienna/irtoc_experiments/blob/main/SplitArea_ReserveDeliverability/rts_demo.jl, when use the setting as:
convert_to_monitored_line = [(name="A28", flow_limit=20.0)]
for sys in [sys1, sys2]
add_interchanges!(sys)
for line_data in convert_to_monitored_line
l = get_component(Line, sys, line_data.name)
convert_component!(sys, l, MonitoredLine)
l = get_component(MonitoredLine, sys, line_data.name)
set_flow_limits!(l, (from_to=line_data.flow_limit, to_from=line_data.flow_limit))
end
end
set_device_model!(
template_uc2,
DeviceModel(
MonitoredLine,
StaticBranchUnbounded;
use_slacks=true,
attributes=Dict("filter_function" => x -> get_name(x) in modeled_lines),
),
)
get the error as:
┌ Error: Failed to build UC0
└ @ PowerSimulations C:\Users\hchen2.julia\packages\PowerSimulations\Ii1BL\src\simulation\simulation.jl:345
┌ Error: Simulation build failed
│ exception =
│ MethodError: no method matching get_rating(::Line, ::Type{PostContingencyEmergencyRateLimitConstraint})
│ The function
get_ratingexists, but no method is defined for this combination of argument types.│
│ Closest candidates are:
│ get_rating(::Line)
│ @ PowerSystems C:\Users\hchen2.julia\packages\PowerSystems\555M3\src\models\generated\Line.jl:128
│ get_rating(::T) where T<:Device
│ @ PowerSystems C:\Users\hchen2.julia\packages\PowerSystems\555M3\src\models\supplemental_accessors.jl:151
│ get_rating(::Transformer3W)
│ @ PowerSystems C:\Users\hchen2.julia\packages\PowerSystems\555M3\src\models\generated\Transformer3W.jl:325
│ ...
│