diff --git a/src/devices_models/device_constructors/branch_constructor.jl b/src/devices_models/device_constructors/branch_constructor.jl index b78218d256..c884ea7920 100644 --- a/src/devices_models/device_constructors/branch_constructor.jl +++ b/src/devices_models/device_constructors/branch_constructor.jl @@ -173,9 +173,10 @@ function construct_device!( ::OptimizationContainer, ::PSY.System, ::ArgumentConstructStage, - ::DeviceModel{T, StaticBranch}, - ::NetworkModel{S}, -) where {T <: PSY.ACBranch, S <: PM.AbstractActivePowerModel} end + ::DeviceModel{<: PSY.ACBranch, StaticBranch}, + ::NetworkModel{<: PM.AbstractActivePowerModel}, +) +end # For DC Power only. Implements constraints function construct_device!( @@ -303,8 +304,8 @@ function construct_device!( ::PSY.System, ::ArgumentConstructStage, ::DeviceModel{T, StaticBranch}, - ::NetworkModel{S}, -) where {T <: PSY.ACBranch, S <: PM.AbstractPowerModel} end + ::NetworkModel{<: PM.AbstractPowerModel}, +) where {T <: PSY.ACBranch} end function construct_device!( container::OptimizationContainer, @@ -328,8 +329,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, ::DeviceModel{T, StaticBranchBounds}, - ::NetworkModel{S}, -) where {T <: PSY.ACBranch, S <: PM.AbstractPowerModel} end + ::NetworkModel{<: PM.AbstractPowerModel}, +) where {T <: PSY.ACBranch} end function construct_device!( container::OptimizationContainer, @@ -401,13 +402,9 @@ function construct_device!( ::OptimizationContainer, ::PSY.System, ::ArgumentConstructStage, - ::DeviceModel{T, F}, - ::NetworkModel{S}, -) where { - T <: TwoTerminalHVDCTypes, - F <: HVDCTwoTerminalUnbounded, - S <: PM.AbstractPowerModel, -} + ::DeviceModel{<: TwoTerminalHVDCTypes, <: HVDCTwoTerminalUnbounded}, + ::NetworkModel{<: PM.AbstractPowerModel}, +) return end @@ -415,13 +412,9 @@ function construct_device!( container::OptimizationContainer, sys::PSY.System, ::ModelConstructStage, - model::DeviceModel{T, U}, - ::NetworkModel{S}, -) where { - T <: TwoTerminalHVDCTypes, - U <: HVDCTwoTerminalUnbounded, - S <: PM.AbstractPowerModel, -} + model::DeviceModel{<: TwoTerminalHVDCTypes, <: HVDCTwoTerminalUnbounded}, + ::NetworkModel{<: PM.AbstractPowerModel}, +) add_constraint_dual!(container, sys, model) end @@ -431,11 +424,10 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{T, U}, - network_model::NetworkModel{S}, + network_model::NetworkModel{<: Union{StandardPTDFModel, PTDFPowerModel}}, ) where { T <: TwoTerminalHVDCTypes, U <: HVDCTwoTerminalUnbounded, - S <: Union{StandardPTDFModel, PTDFPowerModel}, } devices = get_available_components(T, sys, get_attribute(model, "filter_function")) @@ -456,13 +448,9 @@ function construct_device!( container::OptimizationContainer, sys::PSY.System, ::ModelConstructStage, - model::DeviceModel{T, U}, - network_model::NetworkModel{S}, -) where { - T <: TwoTerminalHVDCTypes, - U <: HVDCTwoTerminalUnbounded, - S <: Union{StandardPTDFModel, PTDFPowerModel}, -} + model::DeviceModel{<: TwoTerminalHVDCTypes, <: HVDCTwoTerminalUnbounded}, + network_model::NetworkModel{<: Union{StandardPTDFModel, PTDFPowerModel}}, +) add_constraint_dual!(container, sys, model) return end @@ -471,13 +459,9 @@ function construct_device!( ::OptimizationContainer, ::PSY.System, ::ArgumentConstructStage, - ::DeviceModel{T, F}, - ::NetworkModel{S}, -) where { - T <: TwoTerminalHVDCTypes, - F <: HVDCTwoTerminalLossless, - S <: PM.AbstractPowerModel, -} + ::DeviceModel{<: TwoTerminalHVDCTypes, <: HVDCTwoTerminalLossless}, + ::NetworkModel{<: PM.AbstractPowerModel} +) return end @@ -485,13 +469,9 @@ function construct_device!( container::OptimizationContainer, sys::PSY.System, ::ModelConstructStage, - model::DeviceModel{T, U}, - network_model::NetworkModel{S}, -) where { - T <: TwoTerminalHVDCTypes, - U <: HVDCTwoTerminalLossless, - S <: PM.AbstractPowerModel, -} + model::DeviceModel{T, <: HVDCTwoTerminalLossless}, + network_model::NetworkModel{<: PM.AbstractPowerModel}, +) where {T <: TwoTerminalHVDCTypes} devices = get_available_components(T, sys, get_attribute(model, "filter_function")) add_constraints!(container, FlowRateConstraint, devices, model, network_model) @@ -610,8 +590,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{T, HVDCTwoTerminalDispatch}, - network_model::NetworkModel{U}, -) where {T <: TwoTerminalHVDCTypes, U <: PM.AbstractActivePowerModel} + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, +) where {T <: TwoTerminalHVDCTypes} devices = get_available_components(T, sys, get_attribute(model, "filter_function")) add_variables!( @@ -667,8 +647,8 @@ function construct_device!( sys::PSY.System, ::ModelConstructStage, model::DeviceModel{T, HVDCTwoTerminalDispatch}, - network_model::NetworkModel{U}, -) where {T <: TwoTerminalHVDCTypes, U <: PM.AbstractActivePowerModel} + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, +) where {T <: TwoTerminalHVDCTypes} devices = get_available_components(T, sys, get_attribute(model, "filter_function")) add_constraints!(container, FlowRateConstraintFromTo, devices, model, network_model) diff --git a/src/devices_models/device_constructors/constructor_validations.jl b/src/devices_models/device_constructors/constructor_validations.jl index dbf142ae00..ccbb4d8f3e 100644 --- a/src/devices_models/device_constructors/constructor_validations.jl +++ b/src/devices_models/device_constructors/constructor_validations.jl @@ -1,7 +1,7 @@ function validate_available_devices( - device_model::DeviceModel{T, U}, + device_model::DeviceModel{T, <: AbstractDeviceFormulation}, system::PSY.System, -) where {T <: PSY.Device, U <: AbstractDeviceFormulation} +) where {T <: PSY.Device} devices = get_available_components(T, system, get_attribute(device_model, "filter_function")) if isempty(devices) diff --git a/src/devices_models/device_constructors/hvdcsystems_constructor.jl b/src/devices_models/device_constructors/hvdcsystems_constructor.jl index cd176bb292..5fe9d98738 100644 --- a/src/devices_models/device_constructors/hvdcsystems_constructor.jl +++ b/src/devices_models/device_constructors/hvdcsystems_constructor.jl @@ -3,8 +3,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{PSY.InterconnectingConverter, LossLessConverter}, - network_model::NetworkModel{S}, -) where {S <: PM.AbstractActivePowerModel} + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, +) devices = get_available_components(PSY.InterconnectingConverter, sys) add_variables!(container, ActivePowerVariable, devices, LossLessConverter()) add_to_expression!( @@ -38,8 +38,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{PSY.TModelHVDCLine, LossLessLine}, - network_model::NetworkModel{S}, -) where {S <: PM.AbstractActivePowerModel} + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, +) devices = get_available_components(PSY.TModelHVDCLine, sys) add_variables!(container, FlowActivePowerVariable, devices, LossLessLine()) add_to_expression!( @@ -59,8 +59,6 @@ function construct_device!( sys::PSY.System, ::ModelConstructStage, model::DeviceModel{PSY.TModelHVDCLine, LossLessLine}, - ::NetworkModel{S}, -) where {S <: PM.AbstractActivePowerModel} - devices = get_available_components(PSY.TModelHVDCLine, sys) - return + ::NetworkModel{<: PM.AbstractActivePowerModel}, +) end diff --git a/src/devices_models/device_constructors/load_constructor.jl b/src/devices_models/device_constructors/load_constructor.jl index 61af8d4198..37413f43a4 100644 --- a/src/devices_models/device_constructors/load_constructor.jl +++ b/src/devices_models/device_constructors/load_constructor.jl @@ -3,11 +3,10 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{L, D}, - network_model::NetworkModel{S}, + network_model::NetworkModel{<: PM.AbstractPowerModel}, ) where { L <: PSY.ControllableLoad, D <: AbstractControllablePowerLoadFormulation, - S <: PM.AbstractPowerModel, } devices = get_available_components(L, sys, get_attribute(model, "filter_function")) @@ -83,11 +82,10 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{L, D}, - network_model::NetworkModel{S}, + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, ) where { L <: PSY.ControllableLoad, D <: AbstractControllablePowerLoadFormulation, - S <: PM.AbstractActivePowerModel, } devices = get_available_components(L, sys, get_attribute(model, "filter_function")) @@ -145,8 +143,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{L, PowerLoadInterruption}, - network_model::NetworkModel{S}, -) where {L <: PSY.ControllableLoad, S <: PM.AbstractPowerModel} + network_model::NetworkModel{<: PM.AbstractPowerModel}, +) where {L <: PSY.ControllableLoad} devices = get_available_components(L, sys, get_attribute(model, "filter_function")) @@ -218,8 +216,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{L, PowerLoadInterruption}, - network_model::NetworkModel{S}, -) where {L <: PSY.ControllableLoad, S <: PM.AbstractActivePowerModel} + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, +) where {L <: PSY.ControllableLoad} devices = get_available_components(L, sys, get_attribute(model, "filter_function")) @@ -273,8 +271,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{L, StaticPowerLoad}, - network_model::NetworkModel{S}, -) where {L <: PSY.ElectricLoad, S <: PM.AbstractPowerModel} + network_model::NetworkModel{<: PM.AbstractPowerModel}, +) where {L <: PSY.ElectricLoad} devices = get_available_components(L, sys, get_attribute(model, "filter_function")) @@ -305,8 +303,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{L, StaticPowerLoad}, - network_model::NetworkModel{S}, -) where {L <: PSY.ElectricLoad, S <: PM.AbstractActivePowerModel} + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, +) where {L <: PSY.ElectricLoad} devices = get_available_components(L, sys, get_attribute(model, "filter_function")) @@ -327,9 +325,9 @@ function construct_device!( container::OptimizationContainer, sys::PSY.System, ::ModelConstructStage, - model::DeviceModel{L, StaticPowerLoad}, - network_model::NetworkModel{S}, -) where {L <: PSY.ElectricLoad, S <: PM.AbstractPowerModel} + model::DeviceModel{<: PSY.ElectricLoad, StaticPowerLoad}, + network_model::NetworkModel{<: PM.AbstractPowerModel}, +) # Static PowerLoad doesn't add any constraints to the model. This function covers # AbstractPowerModel and AbtractActivePowerModel return @@ -339,13 +337,9 @@ function construct_device!( container::OptimizationContainer, sys::PSY.System, ::ArgumentConstructStage, - model::DeviceModel{L, D}, - network_model::NetworkModel{S}, -) where { - L <: PSY.StaticLoad, - D <: AbstractControllablePowerLoadFormulation, - S <: PM.AbstractPowerModel, -} + model::DeviceModel{L, <: AbstractControllablePowerLoadFormulation}, + network_model::NetworkModel{<: PM.AbstractPowerModel}, +) where {L <: PSY.StaticLoad} devices = get_available_components(L, sys, get_attribute(model, "filter_function")) @@ -375,13 +369,9 @@ function construct_device!( container::OptimizationContainer, sys::PSY.System, ::ArgumentConstructStage, - model::DeviceModel{L, D}, - network_model::NetworkModel{S}, -) where { - L <: PSY.StaticLoad, - D <: AbstractControllablePowerLoadFormulation, - S <: PM.AbstractActivePowerModel, -} + model::DeviceModel{L, <: AbstractControllablePowerLoadFormulation}, + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, +) where {L <: PSY.StaticLoad} devices = get_available_components(L, sys, get_attribute(model, "filter_function")) @@ -402,11 +392,10 @@ function construct_device!( sys::PSY.System, ccs::ModelConstructStage, model::DeviceModel{L, D}, - network_model::NetworkModel{S}, + network_model::NetworkModel{<: PM.AbstractPowerModel}, ) where { L <: PSY.StaticLoad, D <: AbstractControllablePowerLoadFormulation, - S <: PM.AbstractPowerModel, } if D != StaticPowerLoad @warn( diff --git a/src/devices_models/device_constructors/regulationdevice_constructor.jl b/src/devices_models/device_constructors/regulationdevice_constructor.jl index b4535006ff..2ed663008d 100644 --- a/src/devices_models/device_constructors/regulationdevice_constructor.jl +++ b/src/devices_models/device_constructors/regulationdevice_constructor.jl @@ -98,7 +98,7 @@ function construct_device!( network_model, ) - add_constraints!(container, ParticipationAssignmentConstraint, devices, model, S) + add_constraints!(container, ParticipationAssignmentConstraint, devices, model, AreaBalancePowerModel) objective_function!(container, devices, model) return end @@ -107,9 +107,9 @@ function construct_device!( container::OptimizationContainer, sys::PSY.System, ::ArgumentConstructStage, - model::DeviceModel{PSY.RegulationDevice{T}, FixedOutput}, + model::DeviceModel{PSY.RegulationDevice{<: PSY.StaticInjection}, FixedOutput}, network_model::NetworkModel{AreaBalancePowerModel}, -) where {T <: PSY.StaticInjection} +) devices = get_available_components(get_component_type(model), sys) add_parameters!(container, ActivePowerTimeSeriesParameter, devices, model) @@ -128,9 +128,9 @@ function construct_device!( ::OptimizationContainer, ::PSY.System, ::ModelConstructStage, - ::DeviceModel{PSY.RegulationDevice{T}, FixedOutput}, + ::DeviceModel{PSY.RegulationDevice{<: PSY.StaticInjection}, FixedOutput}, network_model::NetworkModel{AreaBalancePowerModel}, -) where {T <: PSY.StaticInjection} +) # There is no-op under FixedOutput formulation return end diff --git a/src/devices_models/device_constructors/renewablegeneration_constructor.jl b/src/devices_models/device_constructors/renewablegeneration_constructor.jl index 34a8edd469..d7dbcb2d7c 100644 --- a/src/devices_models/device_constructors/renewablegeneration_constructor.jl +++ b/src/devices_models/device_constructors/renewablegeneration_constructor.jl @@ -3,11 +3,10 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{R, D}, - network_model::NetworkModel{S}, + network_model::NetworkModel{<: PM.AbstractPowerModel}, ) where { R <: PSY.RenewableGen, D <: AbstractRenewableDispatchFormulation, - S <: PM.AbstractPowerModel, } devices = get_available_components(R, sys, get_attribute(model, "filter_function")) @@ -60,11 +59,10 @@ function construct_device!( container::OptimizationContainer, sys::PSY.System, ::ModelConstructStage, - model::DeviceModel{R, D}, + model::DeviceModel{R, <: AbstractRenewableDispatchFormulation}, network_model::NetworkModel{S}, ) where { R <: PSY.RenewableGen, - D <: AbstractRenewableDispatchFormulation, S <: PM.AbstractPowerModel, } devices = @@ -119,11 +117,10 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{R, D}, - network_model::NetworkModel{S}, + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, ) where { R <: PSY.RenewableGen, D <: AbstractRenewableDispatchFormulation, - S <: PM.AbstractActivePowerModel, } devices = get_available_components(R, sys, get_attribute(model, "filter_function")) @@ -167,11 +164,10 @@ function construct_device!( container::OptimizationContainer, sys::PSY.System, ::ModelConstructStage, - model::DeviceModel{R, D}, + model::DeviceModel{R, <: AbstractRenewableDispatchFormulation}, network_model::NetworkModel{S}, ) where { R <: PSY.RenewableGen, - D <: AbstractRenewableDispatchFormulation, S <: PM.AbstractActivePowerModel, } devices = @@ -218,8 +214,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{R, FixedOutput}, - network_model::NetworkModel{S}, -) where {R <: PSY.RenewableGen, S <: PM.AbstractPowerModel} + network_model::NetworkModel{<: PM.AbstractPowerModel}, +) where {R <: PSY.RenewableGen} devices = get_available_components(R, sys, get_attribute(model, "filter_function")) @@ -250,8 +246,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{R, FixedOutput}, - network_model::NetworkModel{S}, -) where {R <: PSY.RenewableGen, S <: PM.AbstractActivePowerModel} + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, +) where {R <: PSY.RenewableGen} devices = get_available_components(R, sys, get_attribute(model, "filter_function")) @@ -271,9 +267,9 @@ function construct_device!( container::OptimizationContainer, sys::PSY.System, ::ModelConstructStage, - model::DeviceModel{R, FixedOutput}, - network_model::NetworkModel{S}, -) where {R <: PSY.RenewableGen, S <: PM.AbstractPowerModel} + model::DeviceModel{<: PSY.RenewableGen, FixedOutput}, + network_model::NetworkModel{<: PM.AbstractPowerModel}, +) # FixedOutput doesn't add any constraints to the model. This function covers # AbstractPowerModel and AbtractActivePowerModel return diff --git a/src/devices_models/device_constructors/thermalgeneration_constructor.jl b/src/devices_models/device_constructors/thermalgeneration_constructor.jl index 721d21b619..d765d68ebc 100644 --- a/src/devices_models/device_constructors/thermalgeneration_constructor.jl +++ b/src/devices_models/device_constructors/thermalgeneration_constructor.jl @@ -2,18 +2,18 @@ function construct_device!( container::OptimizationContainer, sys::PSY.System, ::ArgumentConstructStage, - ::DeviceModel{T, FixedOutput}, - network_model::NetworkModel{S}, -) where {T <: PSY.ThermalGen, S <: PM.AbstractActivePowerModel} + device_model::DeviceModel{T, FixedOutput}, + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, +) where {T <: PSY.ThermalGen} devices = - get_available_components(T, sys, get_attribute(model, "filter_function")) - add_parameters!(container, ActivePowerTimeSeriesParameter, devices, model) + get_available_components(T, sys, get_attribute(device_model, "filter_function")) + add_parameters!(container, ActivePowerTimeSeriesParameter, devices, device_model) add_to_expression!( container, ActivePowerBalance, ActivePowerTimeSeriesParameter, devices, - model, + device_model, network_model, ) return @@ -23,9 +23,9 @@ function construct_device!( ::OptimizationContainer, ::PSY.System, ::ModelConstructStage, - ::DeviceModel{T, FixedOutput}, - network_model::NetworkModel{S}, -) where {T <: PSY.ThermalGen, S <: PM.AbstractPowerModel} + ::DeviceModel{<: PSY.ThermalGen, FixedOutput}, + network_model::NetworkModel{<: PM.AbstractPowerModel}, +) # FixedOutput doesn't add any constraints to the model. This function covers # AbstractPowerModel and AbtractActivePowerModel return @@ -39,11 +39,10 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{T, D}, - network_model::NetworkModel{S}, + network_model::NetworkModel{<: PM.AbstractPowerModel}, ) where { T <: PSY.ThermalGen, D <: AbstractStandardUnitCommitment, - S <: PM.AbstractPowerModel, } devices = get_available_components(T, sys, get_attribute(model, "filter_function")) @@ -158,12 +157,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{T, D}, - network_model::NetworkModel{S}, -) where { - T <: PSY.ThermalGen, - D <: AbstractStandardUnitCommitment, - S <: PM.AbstractActivePowerModel, -} + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, +) where {T <: PSY.ThermalGen, D <: AbstractStandardUnitCommitment} devices = get_available_components(T, sys, get_attribute(model, "filter_function")) @@ -216,11 +211,10 @@ function construct_device!( container::OptimizationContainer, sys::PSY.System, ::ModelConstructStage, - model::DeviceModel{T, D}, + model::DeviceModel{T, <: AbstractStandardUnitCommitment}, network_model::NetworkModel{S}, ) where { T <: PSY.ThermalGen, - D <: AbstractStandardUnitCommitment, S <: PM.AbstractActivePowerModel, } devices = @@ -262,8 +256,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{T, ThermalBasicUnitCommitment}, - network_model::NetworkModel{S}, -) where {T <: PSY.ThermalGen, S <: PM.AbstractPowerModel} + network_model::NetworkModel{<: PM.AbstractPowerModel}, +) where {T <: PSY.ThermalGen} devices = get_available_components(T, sys, get_attribute(model, "filter_function")) @@ -461,8 +455,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{T, ThermalStandardDispatch}, - network_model::NetworkModel{S}, -) where {T <: PSY.ThermalGen, S <: PM.AbstractPowerModel} + network_model::NetworkModel{<: PM.AbstractPowerModel}, +) where {T <: PSY.ThermalGen} devices = get_available_components(T, sys, get_attribute(model, "filter_function")) @@ -566,8 +560,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{T, ThermalStandardDispatch}, - network_model::NetworkModel{S}, -) where {T <: PSY.ThermalGen, S <: PM.AbstractActivePowerModel} + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, +) where {T <: PSY.ThermalGen} devices = get_available_components(T, sys, get_attribute(model, "filter_function")) @@ -651,11 +645,10 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{T, D}, - network_model::NetworkModel{S}, + network_model::NetworkModel{<: PM.AbstractPowerModel}, ) where { T <: PSY.ThermalGen, D <: AbstractThermalDispatchFormulation, - S <: PM.AbstractPowerModel, } devices = get_available_components(T, sys, get_attribute(model, "filter_function")) @@ -707,11 +700,10 @@ function construct_device!( container::OptimizationContainer, sys::PSY.System, ::ModelConstructStage, - model::DeviceModel{T, D}, + model::DeviceModel{T, <: AbstractThermalDispatchFormulation}, network_model::NetworkModel{S}, ) where { T <: PSY.ThermalGen, - D <: AbstractThermalDispatchFormulation, S <: PM.AbstractPowerModel, } devices = @@ -755,11 +747,10 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{T, D}, - network_model::NetworkModel{S}, + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, ) where { T <: PSY.ThermalGen, D <: AbstractThermalDispatchFormulation, - S <: PM.AbstractActivePowerModel, } devices = get_available_components(T, sys, get_attribute(model, "filter_function")) @@ -802,11 +793,10 @@ function construct_device!( container::OptimizationContainer, sys::PSY.System, ::ModelConstructStage, - model::DeviceModel{T, D}, + model::DeviceModel{T, <: AbstractThermalDispatchFormulation}, network_model::NetworkModel{S}, ) where { T <: PSY.ThermalGen, - D <: AbstractThermalDispatchFormulation, S <: PM.AbstractActivePowerModel, } devices = @@ -840,8 +830,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{PSY.ThermalMultiStart, ThermalMultiStartUnitCommitment}, - network_model::NetworkModel{S}, -) where {S <: PM.AbstractPowerModel} + network_model::NetworkModel{<: PM.AbstractPowerModel}, +) devices = get_available_components(PSY.ThermalMultiStart, sys) add_variables!( @@ -984,8 +974,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{PSY.ThermalMultiStart, ThermalMultiStartUnitCommitment}, - network_model::NetworkModel{S}, -) where {S <: PM.AbstractActivePowerModel} + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, +) devices = get_available_components(PSY.ThermalMultiStart, sys) add_variables!( @@ -1106,8 +1096,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{T, ThermalCompactUnitCommitment}, - network_model::NetworkModel{S}, -) where {T <: PSY.ThermalGen, S <: PM.AbstractPowerModel} + network_model::NetworkModel{<: PM.AbstractPowerModel}, +) where {T <: PSY.ThermalGen} devices = get_available_components(T, sys, get_attribute(model, "filter_function")) @@ -1224,8 +1214,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{T, ThermalCompactUnitCommitment}, - network_model::NetworkModel{S}, -) where {T <: PSY.ThermalGen, S <: PM.AbstractActivePowerModel} + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, +) where {T <: PSY.ThermalGen} devices = get_available_components(T, sys, get_attribute(model, "filter_function")) @@ -1327,8 +1317,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{T, ThermalBasicCompactUnitCommitment}, - network_model::NetworkModel{S}, -) where {T <: PSY.ThermalGen, S <: PM.AbstractPowerModel} + network_model::NetworkModel{<: PM.AbstractPowerModel}, +) where {T <: PSY.ThermalGen} devices = get_available_components(T, sys, get_attribute(model, "filter_function")) @@ -1441,8 +1431,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{T, ThermalBasicCompactUnitCommitment}, - network_model::NetworkModel{S}, -) where {T <: PSY.ThermalGen, S <: PM.AbstractActivePowerModel} + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, +) where {T <: PSY.ThermalGen} devices = get_available_components(T, sys, get_attribute(model, "filter_function")) @@ -1540,8 +1530,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{T, ThermalCompactDispatch}, - network_model::NetworkModel{S}, -) where {T <: PSY.ThermalGen, S <: PM.AbstractPowerModel} + network_model::NetworkModel{<: PM.AbstractPowerModel}, +) where {T <: PSY.ThermalGen} devices = get_available_components(T, sys, get_attribute(model, "filter_function")) @@ -1668,8 +1658,8 @@ function construct_device!( sys::PSY.System, ::ArgumentConstructStage, model::DeviceModel{T, ThermalCompactDispatch}, - network_model::NetworkModel{S}, -) where {T <: PSY.ThermalGen, S <: PM.AbstractActivePowerModel} + network_model::NetworkModel{<: PM.AbstractActivePowerModel}, +) where {T <: PSY.ThermalGen} devices = get_available_components(T, sys, get_attribute(model, "filter_function"))