SpineOpt.jl icon indicating copy to clipboard operation
SpineOpt.jl copied to clipboard

Add clarity to Julia variables used as indices

Open Mastomaki opened this issue 1 year ago • 1 comments

Reusing the same Julia variable names can be confusing. For example in constraint node injection.jl

for s in s

this could be

for s in path

path is also used to refer to stochastic path elsewhere.

Also it is a good practise to distinguish between the "outer" and "inner" time indices like in variable_node_state.jl

for (n, s, t) in node_stochastic_time_indices(
            m; node=n, stochastic_scenario=stochastic_scenario, temporal_block=tb, t=t

one could change one of them to t1.

Mastomaki avatar May 16 '23 12:05 Mastomaki

Maybe related to #813

clizbe avatar Jan 12 '24 14:01 clizbe