Skip to content

Commit

Permalink
Merge pull request #75 from rl-institut/fix-#74/first_consumption
Browse files Browse the repository at this point in the history
fix calculation of driving in first event after cutoff
  • Loading branch information
mosc5 authored Jul 15, 2022
2 parents 7f7f7f4 + 834d0fb commit 5660dc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simbev/car.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def export(self, region_directory, simbev):
activity.at[activity.index[0], "energy"] = new_demand

elif activity.at[activity.index[0], "energy"] < 0:
new_consumption = round(activity.at[activity.index[0], "energy"] / (pre_event_len / event_len), 4)
new_consumption = round(activity.at[activity.index[0], "energy"] * (post_event_len / event_len), 4)
activity.at[activity.index[0], "energy"] = new_consumption

# fit first row event to start at time step 0
Expand Down

0 comments on commit 5660dc7

Please sign in to comment.