Skip to content

Commit

Permalink
generate indices only for variable having representative timeslices
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhjy committed May 12, 2024
1 parent 7f0514b commit 1c31c02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/variables/variable_connection_flow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ function add_variable_connection_flow!(m::Model)
(x..., _fix_ratio_out_in_connection_flow_simple(x...)) for x in indices(fix_ratio_out_in_connection_flow)
)
if ratio !== nothing
for (_n, s, t) in node_stochastic_time_indices(m; node=n_to)
for (_n, s, t) in node_stochastic_time_indices(
m; node=n_to, temporal_block=temporal_block(representative_periods_mapping=nothing)
)
)
add_variable!(
m,
Expand Down
4 changes: 3 additions & 1 deletion src/variables/variable_unit_flow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ function add_variable_unit_flow!(m::Model)
)
)
if ratio !== nothing
for (_n, s, t) in node_stochastic_time_indices(m; node=n1)
for (_n, s, t) in node_stochastic_time_indices(
m; node=n1, temporal_block=temporal_block(representative_periods_mapping=nothing)
)
)
add_variable!(
m,
Expand Down

0 comments on commit 1c31c02

Please sign in to comment.