Skip to content

Commit

Permalink
fixing date issue #6
Browse files Browse the repository at this point in the history
  • Loading branch information
Tk1999s committed Feb 9, 2022
1 parent c21a426 commit 860d4e3
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions simbev/simbevMiD.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,18 @@ def availability(
date_im = daykey
date_im = date_im.date
date_now = date_im[im]
date_now = str(date_now.day) + '.' + str(date_now.month) + '.' + '2022'

if int(date_now.month) < 10:
date_cur = str(date_now.day) + '.' + '0' + str(date_now.month) + '.' + '2022'
else:
date_cur = str(date_now.day) + '.' + str(date_now.month) + '.' + '2022'
if int(date_now.day) < 10:
date_cur = '0' + date_cur
else:
date_cur = date_cur
temp_date = temperature['Date']
temp_temp = temperature['Temperature']
for it in range(len(temperature)):
if temp_date[it] == date_now:
if temp_date[it] == date_cur:
temperature_now = temp_temp[it]
# get car status
go = car_status[im]
Expand Down Expand Up @@ -345,8 +351,8 @@ def availability(
staytime = math.ceil(staytime / stepsize)
# print("staytime done: " + str(staytime))

driveconsumption = total_consumption(temperature_now, drivetime, temp_inside, cooling, heating, con,
distance)
# driveconsumption = total_consumption(temperature_now, drivetime, temp_inside, cooling, heating, con,
# distance)
range_remaining = (soc_list[-1] * batcap) / con

# fast charging events
Expand Down

0 comments on commit 860d4e3

Please sign in to comment.