-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Schedule entry durations in ChargeParameterDiscoveryRes should add up to departure_time from EVCC (AB#2183) #59
Conversation
Address V2G2-303, V2G2-304, V2G2-305, V2G2-721
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check it out
for schedule_tuples in sa_schedule_tuples: | ||
assert schedule_tuples.p_max_schedule is not None | ||
schedule_duration = 0 | ||
if schedule_tuples.p_max_schedule.schedule_entries is not None: | ||
start_time = schedule_tuples.p_max_schedule.schedule_entries[ | ||
0 | ||
].time_interval.start | ||
|
||
for entry in schedule_tuples.p_max_schedule.schedule_entries: | ||
schedule_duration += entry.time_interval.start - start_time | ||
if entry.time_interval.duration is not None: | ||
schedule_duration += entry.time_interval.duration | ||
start_time = entry.time_interval.start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
following the same comment as before, I think we can get the last and first entry and do the calculation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above - have done the mod.
fix #44