Hello, thank you for reporting this issues. It is now being tracked at http://sumo.dlr.de/trac.wsgi/ticket/2564. Regarding the puzzling error message: The route driven so far is prepended to the list of new edges. In your case this causes the invalid route of A,A,B,C to be tested for correctness. (now also tracked as a minor issue: http://sumo.dlr.de/trac.wsgi/ticket/2565)
best regards, Jakob 2016-09-26 15:47 GMT+02:00 Iris Bekker <[email protected]>: > Dear SUMO community, > > For my project I am using SUMO's ability to reroute traffic using traci. > I started with looking at TraCi's functions for setting routes: > traci.vehicle.setRoute() and traci.vehicle.setRouteID(). I thought both > of these would have the same behaviour, but it turns out there are > differences. > > Both correctly alter the car's route and have it continue riding without > any hiccups. However, I ran into problems regarding the output generated > by rerouted cars. I build a script to clearly show these problems, but > worry that that might be a bit large to copy/paste into this mail... > > In any case, take the scenario of a car driving route A -> B and, > halfway through edge B, having its route changed to B -> C. If we use > .setRoute() with a list of edge IDs, this works perfectly, correctly > maintaining the distance driven so far by the vehicle. However, if the > function .setRouteID() is used, the car correctly switches over to the > new route, but in calculating its driven distance it is now also assumed > the car was initiated with the route B -> C. The driven distance is > incorrect. > > More concerning is the scenario of a car driving route B -> C and > getting assigned the route A -> B -> C with set.RouteID(). The car, > assuming it started at point A, now believes it drove more distance than > it ever actually covered. I wonder if this is intended behaviour? > > Kind regards, > > Iris Bekker > > > P.S. I also found a different glitch, I believe. Suppose John Doe is > driving route A -> B. When he is halfway on B, we try to change the > route with setRoute() to A -> B -> C. This correctly gives an error, as > changing the route with setRoute() needs the new route to start at the > edge JohnDoe is currently on. However, the error message created reads > "Warning: Invalid route replacement for vehicle 'JohnDoe'. No connection > between edge 'A' and edge 'A'." > > > ------------------------------------------------------------ > ------------------ > _______________________________________________ > 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
