Skip to content

Commit

Permalink
Add accumulated investment limit to binary storage constraints (#837)
Browse files Browse the repository at this point in the history
  • Loading branch information
datejada authored Sep 30, 2024
1 parent d25f4cf commit 4893803
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/constraints/capacity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function add_capacity_constraints!(
dataframes,
df_flows,
flow,
Y,
Ai,
decommissionable_assets_using_simple_method,
decommissionable_assets_using_compact_method,
Expand Down Expand Up @@ -71,6 +72,13 @@ function add_capacity_constraints!(
end for row in eachrow(dataframes[:highest_out])
]

# - Create accumulated investment limit for the use of binary storage method with investments
accumulated_investment_limit = @expression(
model,
accumulated_investment_limit[y in Y, a in Ai[y]Asb[y]],
sum(values(graph[a].investment_limit[y]))
)

# - Create capacity limit for outgoing flows with binary is_charging for storage assets
assets_profile_times_capacity_out_with_binary_part1 =
model[:assets_profile_times_capacity_out_with_binary_part1] = [
Expand All @@ -88,7 +96,7 @@ function add_capacity_constraints!(
) *
(
graph[row.asset].capacity * accumulated_initial_units[row.asset, row.year] +
graph[row.asset].investment_limit[row.year]
accumulated_investment_limit[row.year, row.asset]
) *
(1 - row.is_charging)
)
Expand Down Expand Up @@ -169,7 +177,7 @@ function add_capacity_constraints!(
) *
(
graph[row.asset].capacity * accumulated_initial_units[row.asset, row.year] +
graph[row.asset].investment_limit[row.year]
accumulated_investment_limit[row.year, row.asset]
) *
row.is_charging
)
Expand Down
1 change: 1 addition & 0 deletions src/create-model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,7 @@ function create_model(
dataframes,
df_flows,
flow,
Y,
Ai,
decommissionable_assets_using_simple_method,
decommissionable_assets_using_compact_method,
Expand Down

0 comments on commit 4893803

Please sign in to comment.