Skip to content

Commit

Permalink
Don't set starting point for nonexistent keys (time-slices)
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelma committed Oct 6, 2024
1 parent 58dc060 commit 96feb03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/run_spineopt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ function _set_starting_point!(m, k=nothing)
var_def = m.ext[:spineopt].variables_definition[name]
for (ind, r) in variable_result
for new_ind in var_def[:indices](m; _drop_key(ind, :t)..., t=to_time_slice(m; t=ind.t))
var = var_by_ind[new_ind]
var = get(var_by_ind, new_ind, nothing)
var isa VariableRef && set_start_value(var, r)
end
end
Expand Down

0 comments on commit 96feb03

Please sign in to comment.