> > > And how do you know when an intersection has multiple edges? > you can use sumolib to analyze the topology ( http://sumo.dlr.de/wiki/Tools/Sumolib)
So better than isStopped, is to use if speed is below some small value, > that would mean that is stopped then or waiting at an intersection, right? > yes > > On Tue, 24 Jul 2018 at 15:34, Jakob Erdmann <[email protected]> wrote: > >> Hello, >> this approach is possible. >> You should probably continue across multiple edges until hitting a "real" >> intersection (one with multiple edges). >> Note, that isStopped only returns true for scheduled stops. Vehicles that >> are waiting at an intersection can only be detected by having speed 0 >> >> regards, >> Jakob >> >> 2018-07-24 16:30 GMT+02:00 Jose Monreal Bailey <[email protected]>: >> >>> Hi everyone, >>> >>> I want to calculate the number of vehicles I have in front of a certain >>> vehicle, this to calculate the number of vehicles moving and standing in >>> front of a vehicle. >>> >>> I was thinking in using getLeader, to get all the vehicles in front, but >>> this only returns one vehicle id. >>> What would be the best approach to calculate a standing queue of >>> vehicles? >>> Iterate in the edge until there is no leader in that edge? >>> >>> And to get the number of vehicles standing and moving, I was thinking in >>> using for each of the leaders returned, isStopped to get the number of >>> vehicles that are stopped and wich are not. >>> >>> Is this the best approach, or would you recommend something better to do? >>> >>> Best regards, >>> José >>> >>> _______________________________________________ >>> sumo-user mailing list >>> [email protected] >>> To change your delivery options, retrieve your password, or unsubscribe >>> from this list, visit >>> https://dev.eclipse.org/mailman/listinfo/sumo-user >>> >>> >> _______________________________________________ >> sumo-user mailing list >> [email protected] >> To change your delivery options, retrieve your password, or unsubscribe >> from this list, visit >> https://dev.eclipse.org/mailman/listinfo/sumo-user >> > > _______________________________________________ > sumo-user mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/sumo-user > >
_______________________________________________ sumo-user mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/sumo-user
