dtEnd = sys.argv[2] txLocation = sys.argv[3] txRRule = sys.argv[4] temp = open("C:/wamp/www/mesa/python/temp1.json", "r") calendars = json.loads(temp.read()) temp.close() temp = open("C:/wamp/www/mesa/python/temp2.json", "r") blSettings = json.loads(temp.read()) temp.close() RRule = functions.parseRRule(txRRule) priorities = functions.parsePriorities(blSettings) originalEvent = classes.Event( "blevent", { "blEvent": { "start_time": dtStart.replace(" ", "T") + "Z", "end_time": dtEnd.replace(" ", "T") + "Z", "location": txLocation, "travel_time": 0, } }, ) modifiedMatrix = functions.construct_modified_matrix(calendars, blSettings, granularity) pointList = pointListGenerator.construct_point_list(modifiedMatrix, granularity, originalEvent, blSettings) costOutput = SClass.smallest_cost(pointList, priorities, originalEvent, granularity, txLocation, modifiedMatrix) print(costOutput)
txRRule = sys.argv[4] temp = open("C:/wamp/www/mesa/python/temp1.json", "r") calendars = json.loads(temp.read()) temp.close() temp = open("C:/wamp/www/mesa/python/temp2.json", "r") blSettings = json.loads(temp.read()) temp.close() RRule = functions.parseRRule(txRRule) priorities = functions.parsePriorities(blSettings) originalEvent = classes.Event( "blevent", { "blEvent": { "start_time": dtStart.replace(" ", "T") + "Z", "end_time": dtEnd.replace(" ", "T") + "Z", "location": txLocation, "travel_time": 0 } }) modifiedMatrix = functions.construct_modified_matrix(calendars, blSettings, granularity) pointList = pointListGenerator.construct_point_list(modifiedMatrix, granularity, originalEvent, blSettings) costOutput = SClass.smallest_cost(pointList, priorities, originalEvent, granularity, txLocation, modifiedMatrix) print(costOutput)