skipinitialspace=True, sep=';', dtype={ 'VERSION': int, 'LINE_NR': int, 'STR_LINE_VAR': int, 'LINE_DIR_NR': int, 'LINE_NAME': str }, index_col=3) versionid = 13 version = Version(set_version.loc[versionid]) stops = readallstops(version, rec_stop, rec_stop_area, rec_stopping_points) restrictions = readrestrictions(service_restriction, version) today = date.today().timetuple()[:3] line = Line(version, int(input("Linien-ID: ")), rec_lin_ber, lid_course, lid_travel_time_type, stops) print("geladen: ", line) # temporär, später via Abfahrtsmonitor oderso laden trips = sorted(getlinetrips(line, 0, today, (0, 0, 0), -1, restrictions, rec_trip, lid_course, lid_travel_time_type, stops, calendar_otc, day_type_2_day_attribute), key=lambda x: x.starttime) for ti, trip in enumerate(trips): print(str(ti) + ":", trip)
'LINE_NAME': str }, index_col=3) # dates = [(2018, 11, 5), (2018, 11, 6), (2018, 11, 7), (2018, 11, 8), (2018, 11, 9), (2018, 11, 10), (2018, 11, 11)] dates = [(2018, 11, 8)] versionidVER = 21 versionidHST = 10 versionVER = Version(set_version.loc[versionidVER]) stopsVER = readallstops(versionVER, rec_stop, rec_stop_area, rec_stopping_points) versionHST = Version(set_version.loc[versionidHST]) stopsHST = readallstops(versionHST, rec_stop, rec_stop_area, rec_stopping_points) restrictions = { versionidVER: readrestrictions(service_restriction, versionVER), versionidHST: readrestrictions(service_restriction, versionHST) } lines = { 45511: Line(versionVER, 45511, rec_lin_ber, lid_course, lid_travel_time_type, stopsVER), 50510: Line(versionHST, 50510, rec_lin_ber, lid_course, lid_travel_time_type, stopsHST) } for lineid in lines: line = lines[lineid] print("\n- " + str(line))