SpineOpt.jl
SpineOpt.jl copied to clipboard
Add clarity to Julia variables used as indices
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
.
Maybe related to #813