Skip to content

Commit

Permalink
Fix _update_variable_names!
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelma committed Oct 24, 2023
1 parent 8c4267f commit bad15aa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/run_spineopt_standard.jl
Original file line number Diff line number Diff line change
Expand Up @@ -933,8 +933,10 @@ end

function _update_variable_names!(m)
for (name, var) in m.ext[:spineopt].variables
for (ind, v) in var
_set_name(v, _base_name(name, ind))
# NOTE: only update names for the representative variables
# This is achieved by using the indices function from the variable definition
for ind in m.ext[:spineopt].variables_definition[name][:indices](m)
_set_name(var[ind], _base_name(name, ind))
end
end
end
Expand Down

0 comments on commit bad15aa

Please sign in to comment.