2024-09-04 08:41:18 +02:00
|
|
|
from datetime import datetime, timedelta
|
|
|
|
|
|
|
|
|
2024-09-16 11:48:20 +02:00
|
|
|
prediction_hours=48
|
2024-09-05 13:56:46 +02:00
|
|
|
optimization_hours=24
|
2024-09-04 08:41:18 +02:00
|
|
|
strafe=10
|
|
|
|
moegliche_ladestroeme_in_prozent = [0.0 ,6.0/16.0, 7.0/16.0, 8.0/16.0, 9.0/16.0, 10.0/16.0, 11.0/16.0, 12.0/16.0, 13.0/16.0, 14.0/16.0, 15.0/16.0, 1.0 ]
|
|
|
|
|
|
|
|
|
2024-09-08 10:28:54 +02:00
|
|
|
# Optional
|
2024-09-16 11:48:20 +02:00
|
|
|
db_config = {
|
|
|
|
'user': 'eos',
|
|
|
|
'password': 'eos',
|
|
|
|
'host': '127.0.0.1',
|
|
|
|
'database': 'eos'
|
2024-09-04 08:41:18 +02:00
|
|
|
}
|
2024-09-16 11:48:20 +02:00
|
|
|
|
2024-09-04 08:41:18 +02:00
|
|
|
def get_start_enddate(prediction_hours=48,startdate=None):
|
|
|
|
############
|
2024-09-16 11:48:20 +02:00
|
|
|
# Parameter
|
2024-09-04 08:41:18 +02:00
|
|
|
############
|
|
|
|
if startdate == None:
|
|
|
|
date = (datetime.now().date() + timedelta(hours = prediction_hours)).strftime("%Y-%m-%d")
|
|
|
|
date_now = datetime.now().strftime("%Y-%m-%d")
|
|
|
|
else:
|
|
|
|
date = (startdate + timedelta(hours = prediction_hours)).strftime("%Y-%m-%d")
|
|
|
|
date_now = startdate.strftime("%Y-%m-%d")
|
|
|
|
return date_now,date
|