diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e88ce73..01bed5cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## staged +- Fixed monotonic constraint for traditional formulations - Added function keyword argument `check_enabled` to `build_nested_graph` to control `calc_connected_components` - Added option `disable-grid-forming-constraint-block-cuts` to disable block-cut constraints in grid-forming inverter constraints - Added support for PowerModelsDistribution v0.15 diff --git a/src/core/constraint.jl b/src/core/constraint.jl index c32990b4..05c047cb 100644 --- a/src/core/constraint.jl +++ b/src/core/constraint.jl @@ -1188,3 +1188,19 @@ function constraint_energized_blocks_strictly_increasing(pm::AbstractUnbalancedP JuMP.@constraint(pm.model, z_block_n2 >= z_block_n1) end end + + +""" + constraint_energized_loads_strictly_increasing(pm::AbstractUnbalancedPowerModel, n_1::Int, n_2::Int) + +Constraint to ensure that the number of energized load blocks from one timestep to another is strictly increasing +and that once energized, a load block cannot be shed in a later timestep. +""" +function constraint_energized_loads_strictly_increasing(pm::AbstractUnbalancedPowerModel, n_1::Int, n_2::Int) + for load_id in ids(pm, n_2, :load) + z_demand_n1 = var(pm, n_1, :z_demand, load_id) + z_demand_n2 = var(pm, n_2, :z_demand, load_id) + + JuMP.@constraint(pm.model, z_demand_n2 >= z_demand_n1) + end +end diff --git a/src/prob/mld_traditional.jl b/src/prob/mld_traditional.jl index 3083ecd1..b2cddf60 100644 --- a/src/prob/mld_traditional.jl +++ b/src/prob/mld_traditional.jl @@ -133,7 +133,7 @@ function build_mn_traditional_mld(pm::PMD.AbstractUBFModels) end if ref(pm, n_1, :options, "constraints")["enable-strictly-increasing-restoration-constraint"] - constraint_energized_blocks_strictly_increasing(pm, n_1, n_2) + constraint_energized_loads_strictly_increasing(pm, n_1, n_2) end n_1 = n_2 @@ -258,7 +258,7 @@ function build_mn_traditional_mld(pm::PMD.AbstractUnbalancedPowerModel) end if ref(pm, n_1, :options, "constraints")["enable-strictly-increasing-restoration-constraint"] - constraint_energized_blocks_strictly_increasing(pm, n_1, n_2) + constraint_energized_loads_strictly_increasing(pm, n_1, n_2) end n_1 = n_2