all_time = []
for veh_id in data.keys():
all_time.extend(data[veh_id]["time"])
all_time = np.sort(np.unique(all_time))
// Get the function from switcher dictionary
func = switcher[params["network"]]
// Execute the function
pos, speed, all_time = func(data, params, all_time)
return pos, speed, all_time
def _merge(data, params, all_time):
rGenerate position and speed data for the merge.
After Change
// Execute the function
segs, data = func(data)
return segs, data
def _merge(data):
rGenerate position and speed data for the merge.