Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 0 additions & 183 deletions .claude/pom_port_plan.md

This file was deleted.

5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ PowerFlows = "94fada2c-fd9a-4e89-8d82-81405f5cb4f6"

[sources]
InfrastructureSystems = {url = "https://github.com/Sienna-Platform/InfrastructureSystems.jl.git", rev = "IS4"}
InfrastructureOptimizationModels = {rev = "main", url = "https://github.com/Sienna-Platform/InfrastructureOptimizationModels.jl"}
# TEMPORARY: repin to `rev = "main"` once IOM #171 (ac/service-containers) merges.
InfrastructureOptimizationModels = {rev = "ac/service-containers", url = "https://github.com/Sienna-Platform/InfrastructureOptimizationModels.jl"}
PowerSystems = {url = "https://github.com/Sienna-Platform/PowerSystems.jl.git", rev = "psy6"}
PowerNetworkMatrices = {rev = "psy6", url = "https://github.com/Sienna-Platform/PowerNetworkMatrices.jl"}
# PSY psy6 depends on these unregistered packages; [sources] of non-root projects are
Expand All @@ -61,7 +62,7 @@ DocStringExtensions = "~0.8, ~0.9"
InfrastructureSystems = "3"
InteractiveUtils = "1.11.0"
JuMP = "^1.28"
PowerFlows = "^0.24"
PowerFlows = "0.25"
PowerNetworkMatrices = "^0.24"
PowerSystems = "^5.10"
PrettyTables = "3"
Expand Down
10 changes: 5 additions & 5 deletions ext/PowerFlowsExt/pf_headroom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ _accumulate_headroom!(
::OptimizationContainerKey{<:ISOPT.ParameterType, <:PSY.Component},
::Dict{String, Int},
::Int,
::Matrix{PSY.ACBusTypes},
::Matrix{PSY.ACBusTypes.Value},
::Vector{Dict{Tuple{DataType, String}, Float64}},
) = nothing

Expand All @@ -27,7 +27,7 @@ _accumulate_headroom!(
::OptimizationContainerKey{<:ISOPT.OptimizationKeyType, <:PSY.Storage},
::Dict{String, Int},
::Int,
::Matrix{PSY.ACBusTypes},
::Matrix{PSY.ACBusTypes.Value},
::Vector{Dict{Tuple{DataType, String}, Float64}},
) = nothing

Expand All @@ -40,7 +40,7 @@ _accumulate_headroom!(
::OptimizationContainerKey{<:ISOPT.ParameterType, <:PSY.Storage},
::Dict{String, Int64},
::Int,
::Matrix{PSY.ACBusTypes},
::Matrix{PSY.ACBusTypes.Value},
::Vector{Dict{Tuple{DataType, String}, Float64}},
) = nothing

Expand All @@ -60,7 +60,7 @@ function _accumulate_headroom!(
key::OptimizationContainerKey{<:ISOPT.OptimizationKeyType, U},
component_map::Dict{String, Int},
n_time_steps::Int,
bus_types::Matrix{PSY.ACBusTypes},
bus_types::Matrix{PSY.ACBusTypes.Value},
computed_gspf::Vector{Dict{Tuple{DataType, String}, Float64}},
) where {U <: PSY.Component}
result = lookup_value(container, key)
Expand Down Expand Up @@ -129,7 +129,7 @@ function _update_headroom_participation_factors!(
PFS.get_computed_gspf(pf_data)::Vector{Dict{Tuple{DataType, String}, Float64}}

n_time_steps = length(get_time_steps(container))
bus_types = PFS.get_bus_type(pf_data)::Matrix{PSY.ACBusTypes}
bus_types = PFS.get_bus_type(pf_data)::Matrix{PSY.ACBusTypes.Value}
bus_slack_pf =
PFS.get_bus_slack_participation_factors(
pf_data,
Expand Down
18 changes: 18 additions & 0 deletions src/PowerOperationsModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ include("services_models/reserve_group.jl")
# include("services_models/agc.jl") # TODO: needs _get_ace_error
include("services_models/transmission_interface.jl")
include("services_models/services_constructor.jl")
include("services_models/security_constrained_injectors.jl")

# Hybrid System Models (after services_models since they share reserve infrastructure)
include("hybrid_system_models/hybrid_systems.jl")
Expand Down Expand Up @@ -677,6 +678,12 @@ export HVDCReactivePowerToVariable
export ShiftUpActivePowerVariable
export ShiftDownActivePowerVariable

# G-1 Variables
export PostContingencyDeploymentVariable
export PostContingencyDeviationVariable
export PostGeneratorContingencyFlowSlackUpperBound
export PostGeneratorContingencyFlowSlackLowerBound

######## Hydro Formulations ########
export HydroDispatchRunOfRiver
export HydroCommitmentRunOfRiver
Expand Down Expand Up @@ -868,6 +875,9 @@ export ShiftDownActivePowerVariableLimitsConstraint
export RealizedShiftedLoadMinimumBoundConstraint
export NonAnticipativityConstraint
export HVDCDCControlConstraint
export PostContingencyBalanceConstraint
export PostContingencyGenerationConstraint
export PostContingencyDeploymentConstraint

#################################################################################
# Exports - Expression Types (defined in core/expressions.jl)
Expand Down Expand Up @@ -900,6 +910,10 @@ export ComponentReserveDownBalanceExpression
export InterfaceTotalFlow
export PTDFBranchFlow
export BThetaBranchFlow
export PostContingencyNodalDeployment
export PostContingencyAreaDeployment
export PostContingencyInterchangeFlow
export PostContingencyTotalDeployment

#################################################################################
# Exports - Parameter Types (defined in core/parameters.jl)
Expand Down Expand Up @@ -1007,6 +1021,10 @@ export VariableMaxInterfaceFlow
export ReserveLimitedRegulation
export DeviceLimitedRegulation

# G-1 Formulations
export SecurityConstrainedContingencyReserve
export SecurityConstrainedRampReserve

#################################################################################
# Exports - Network Formulation Types (defined in core/network_formulations.jl)
#################################################################################
Expand Down
8 changes: 4 additions & 4 deletions src/common_models/add_to_expression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1971,7 +1971,7 @@ function add_to_expression!(
W <: AbstractReservesFormulation,
}
service_name = PSY.get_name(service)
variable = get_variable(container, U, X)
variable = get_variable(container, U, IOM.ComponentPairKey{V, X})
if !has_container_key(container, T, V)
add_expressions!(container, T, devices, model)
end
Expand Down Expand Up @@ -2410,7 +2410,7 @@ function add_to_expression!(
W <: AbstractReservesFormulation,
}
service_name = PSY.get_name(service)
variable = get_variable(container, U, X)
variable = get_variable(container, U, IOM.ComponentPairKey{V, X})
if !has_container_key(container, T, V)
add_expressions!(container, T, devices, model)
end
Expand Down Expand Up @@ -2444,7 +2444,7 @@ function add_to_expression!(
W <: AbstractReservesFormulation,
}
service_name = PSY.get_name(service)
variable = get_variable(container, U, X)
variable = get_variable(container, U, IOM.ComponentPairKey{V, X})
if !has_container_key(container, T, V)
add_expressions!(container, T, devices, model)
end
Expand Down Expand Up @@ -2478,7 +2478,7 @@ function add_to_expression!(
W <: AbstractReservesFormulation,
}
service_name = PSY.get_name(service)
variable = get_variable(container, U, X)
variable = get_variable(container, U, IOM.ComponentPairKey{V, X})
if !has_container_key(container, T, V)
add_expressions!(container, T, devices, model)
end
Expand Down
Loading