Demand/Shortest or Optimal Path Routing

=Introduction=

DUAROUTER can be used to import demand data given by source and destination edges (so called trips and flows ). Furthermore, it can be used to repair an existing route-file i.e. if a given route has an unconnected edge list. To achieve dynamic user assignment, DUAROUTER and SUMO must be called iteratively. This is described in Demand/Dynamic User Assignment.

=Trip Definitions= Trip definitions that can be laid into the network may be supplied to the router using an XML-file. The syntax of a single trip definition is: " depart="" from="" to="" [type=""] [period="" repno=""] [color=""]/>.

If any trips use the type attribute, the referenced vType element must be put into the trip.xml file or into an additionally loaded rou.xml-file.

=Flow Definitions=

Flow amounts share most of the parameter with trip definitions. The syntax is: " from="" to="" begin="" end="" number="" [type=""] [color=""]/>. Notice the following differences: the vehicle does not take a certain departure time as not only one vehicle is described by this parameter, but a set of, given within the attribute "number". The departure times are spread uniformly within the time interval described by <INTERVAL_BEGIN> and <INTERVAL_END>. All these three attributes must be integer values. The values "period" and "repno" are not used herein. Flow definitions can also be embedded into an interval tag. In this case one can (but does not have to) leave the tags begin and end out. So the following two snipples mean the same:

<flow id="0" from="edge0" to="edge1" begin="0" end="3600" number="100"/> and <interval begin="0" end="3600"> <flow id="0" from="edge0" to="edge1" number="100"/>

Let's review flow parameter:

(1) JTRROUTER does not need this parameter, DUAROUTER requires it

=Custom edge weights= The option can be used to affect the weights used during routing. The input format conforms to the output format of the edge based traffic measures. By default this uses the traveltime attribute of edges. The option can be used to use other attributes for routing.

=Usage Examples=

the file trips.xml  given below must contain edges contained in the network file road.net.xml .

<trip id="1625993_25" depart="25" from="-15229224#3" to="4474184"/> <trip id="1542480_35" depart="35" from="-46771582"  to="-24038909#1"/> <trip id="1544282_35" depart="35" from="20554351#2" to="-4876083#5"/> <trip id="1565407_35" depart="35" from="-25771472#1" to="-25160470#0"/> <trip id="1620115_45" depart="45" from="11279351#3" to="5198584#1"/> <trip id="1647560_45" depart="45" from="54048879#0" to="-52105434#0"/> <trip id="3761248_45" depart="45" from="-31928311"  to="23792451#7"/>

Trips may contain source and destination districts as well as edges. If the districts shall be used for routing this has to be specified using the option "--with-taz". Furthermore (if the net does not contain the districts) a districts file needs to be provided:

duarouter --trip-files=<TRIP_DEFS> --net-file=<SUMO_NET> \ --output-file=MySUMORoutes.rou.xml --taz-files=<DISTRICTS> --with-taz

As we have to read in the flow definitions completely into the memory - something we do not have to do necessarily with trips, an extra parameter (-f or --flows) is used to make them known by the router:

duarouter --flows=<FLOW_DEFS> --net=<SUMO_NET> \ --output-file=MySUMORoutes.rou.xml -b <UINT> -e <UINT>

Remind that one can not insert flow descriptions into a trip definitions file. The opposite (some trip definitions within a flow descriptions file) is possible. You also can give both files at the input file, for example:

duarouter --flows=<FLOW_DEFS> --trip-files=<TRIP_DEFS> --net=<SUMO_NET> \ --output-file=MySUMORoutes.rou.xml -b <UINT> -e <UINT>

=Dealing with Errors During Routing= When running DUAROUTER you may encounter errors of the type Error: No connection between 'edge1' and 'edge2' found This is caused be an unconnected network. If your network has vehicle class restrictions it may be that the connectivity is only lacking for particular vehicle classes which is less obvious from the GUI. You can ignore these routes using the option. However, if a large proportion of your routes cause this error you should definitely investigate your network file for problems. The tool Tools/Net can be used to pin down the connectivity gaps in your network.