See http://sumo.dlr.de/wiki/Simulation/Output/TripInfo for output which contains travelTime for each vehicle. regards, Jakob
2015-08-17 16:03 GMT+02:00 Mohammad Khodaei <[email protected]>: > Hello, > > I am trying to calculate the travel time for the vehicles from the TAPAS > Cologne dataset. I have calculated the travel time as below: > > for index in traci.vehicle.getIDList(): > if index in array: > pass > else: > iTravelTime = 0 > for iPath in range(len(traci.vehicle.getRoute(index))): > iTravelTime += > traci.edge.getTraveltime(traci.vehicle.getRoute(index)[iPath]) > > tmpArray = list() > tmpArray.append(index) > tmpArray.append(traci.simulation.getCurrentTime()) > tmpArray.append(iTravelTime) > array.insert(iRow, tmpArray) > print (array[iRow]) > > > The columns are: vehicle ID, simulation current time and the travel > time. As the results show, they don't seem to be correct. My questions is > did I calculate them incorrectly? Any idea how to calculate them correctly? > > ['35092_35092_353', 21601000, 200229.75942810066] > ['39328_39328_360', 21601000, 88412.19484019736] > ['41136_41136_361', 21601000, 132347.35392159087] > ['44930_44930_362', 21601000, 136433.1289889606] > ['48989_48989_366', 21601000, 18446.18112691099] > ['35092_35092_353', 21602000, 269.2987671644985] > ['36884_36884_357', 21602000, 652.003874851129] > ['39197_39197_360', 21602000, 183601.49274566708] > ['39328_39328_360', 21602000, 147.22520255843708] > ['41136_41136_361', 21602000, 429.2926863806925] > ['41383_41383_361', 21602000, 512.3159030805888] > ['41720_41720_361', 21602000, 116704.97772191282] > ['42276_42276_361', 21602000, 573360.4682220918] > ['44930_44930_362', 21602000, 347.5876629181238] > ['48989_48989_366', 21602000, 176.15352951325275] > ['35092_35092_353', 21603000, 205.88441154644426] > ['35380_35380_354', 21603000, 549.7494399536278] > ['36167_36167_355', 21603000, 80030.36234909111] > ['36884_36884_357', 21603000, 651.4367365076167] > ['39197_39197_360', 21603000, 739.6555893772608] > ['39328_39328_360', 21603000, 121.5896687392428] > ['39773_39773_360', 21603000, 345644.8056088846] > ['41136_41136_361', 21603000, 408.98455319567535] > ['41383_41383_361', 21603000, 508.8572091375758] > ['41720_41720_361', 21603000, 613.2278905668367] > ['42276_42276_361', 21603000, 744.6065650944945] > ['42716_42716_361', 21603000, 289744.5426273764] > ['44413_44413_362', 21603000, 485350.96721137513] > ['44930_44930_362', 21603000, 289.7371259649812] > > > > Any help would be appreciated. > > Thanks, > > Mohammad > > --- > Mohammad Khodaei > Networked Systems Security Group > www.ee.kth.se/nss > --- > > ------------------------------------------------------------------------------ > _______________________________________________ > sumo-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sumo-user > ------------------------------------------------------------------------------ _______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
