Skip to content

Commit

Permalink
Fix wrong slice size on model.response_data.q when checking available…
Browse files Browse the repository at this point in the history
… discharges before optimize (missing last time-step). (#361)
  • Loading branch information
maximejay authored Dec 12, 2024
1 parent 4e833ea commit cbd39e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion smash/core/simulation/_standardize.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ def _standardize_simulation_cost_options_gauge(
st = pd.Timestamp(model.setup.start_time)
et = pd.Timestamp(model.setup.end_time)
start_slice = int((end_warmup - st).total_seconds() / model.setup.dt)
end_slice = model.setup.ntime_step - 1
end_slice = model.setup.ntime_step
time_slice = slice(start_slice, end_slice)
for i, ggc in enumerate(model.mesh.code):
if ggc in gauge:
Expand Down

0 comments on commit cbd39e6

Please # to comment.