Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] (SUMO) TraaS Dynamic Routing & Incomplete Routes

Hello,
- automatic routing is suitable if you just want vehicles to react to changing road conditions (congestion). This causes them to periodically check if there is a better route and then change the route but keep the original destination
- if you need more influence on the timing or individual routing preferences you can call traci.vehicle.rerouteTravelTime
- if you need to change the destination you can call traci.vehicle.changeTarget
- for intermediate goals that must be visited you can define 'via' edge using traci.vehicle.setVia
- if you want to compute fastest routes without affecting a vehicle you can call simulation.findRoute
regards,
Jakob

2018-03-20 11:49 GMT+01:00 Jonathan Harper via sumo-user <sumo-user@xxxxxxxxxxxxxxxxxxxxx>:
Hello,

I'm unsure on how to dynamically assign routes to vehicles (with each vehicle having a route which is unique to them) depending on certain conditions (i.e. traffic jams, congestion). I'm using TraaS to interface with SUMO and need to react to certain conditions and dynamically assign routes to particular vehicles depending on their location relative to the road condition.
I've read about automatic re-routing here: http://sumo.dlr.de/wiki/Demand/Automatic_Routing, however I'm unsure how to activate this (if it's not done by default), or if this is even the correct solution.
So far I've been able to assign a route in TraaS, but I can't seem to use DUAROUTER during runtime to be able to generate the route from point A to C without defining the intermediate edges, C (trip -> route). From my understanding a trip is a start and end destination, whereas a route is this with the addition of all of the intermediate edges passed through.
        SumoStringList listExample = new SumoStringList();
        ArrayList<String> edgeList = new ArrayList<>();

        edgeList.add("edge1");
        edgeList.add("edge3");
        listExample.addAll(edgeList);

        conn.do_job_set(Route.add("test", listExample));

When ran (without edge2 being included in the edgeList) I get the error Vehicle 'testVehicle' has no valid route. No connection between edge 'edge1' and edge 'edge3'., which is resolved upon including edge2.
Is it possible to convert trips -> routes during runtime? Is there a way to call DUAROUTER (or another tool) during runtime in TraaS?
Many thanks



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sumo-user mailing list
sumo-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sumo-user


Back to the top