Ahmad Ahsan
Ahmad Ahsan

Reputation: 189

Veins: How to verify if rerouting is using user set algorithm

I'm using veins 4.6 and trying to evaluate the change in emissions due to different routing protocols. By exploring SUMO site I have managed to set base for the experiment. For now I'm using veins demo application with minor configurations changes. Here is content of my erlangen.sumo.cfg file:

<?xml version="1.0" encoding="iso-8859-1"?>
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.sf.net/xsd/sumoConfiguration.xsd">

<input>
    <net-file value="erlangen.net.xml"/>
    <route-files value="erlangen.rou.xml"/>
    <additional-files value="erlangen.poly.xml"/>
</input>

<time>
    <begin value="0"/>
    <end value="400"/>
    <step-length value="1"/>
</time>

<routing>
    <routing-algorithm value="CHWrapper"/>
    <device.rerouting.probability value="1"/>       
</routing>

<emissions>
    <device.emissions.probability value="1"/>
</emissions>

<report>
    <no-step-log value="true"/>
</report>

<gui_only>
    <start value="true"/>
</gui_only>

<output>
    <fcd-output value="erlangen.fcd.xml"/>
    <emission-output value="erlangen.emission.xml"/>
    <tripinfo-output value="erlangen.trip_info.xml"/>
    <vehroute-output value="erlangen.route_followed.xml"/>
    <summary value="erlangen.summary.xml" />
</output>
</configuration>

Routes file (erlangen.rou.xml) content is as follows:

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">

<vType id="passenger" vClass="passenger" accel="2.6" decel="4.5" sigma="0.5" length="2.5" minGap="2.5"  
maxSpeed="120" guiShape="passenger/sedan" color="1,0,0" emissionClass="HBEFA3/LDV_G_EU4">   
    <param key="has.emission.device" value="true"/>
    <param key="has.rerouting.device" value="true"/>
    <param key="device.fcd.probability" value="1"/>
</vType>

<flow id="flow0" type="passenger" from="3013106#1" to="29900564#1" begin="0" period="3" number="30" />

erlangen.net.xml is unchanged and in omnetpp.ini I have changed *.connectionManager.maxInterfDist from 2600m to 100m only.

Using these configurations I have ran the simulation using A* and CHWrapper algorithm but output of both is ditto copy. In below image it is visible that node 25 - 29 followed a different path after rerouting, but these are same in both cases.

enter image description here

Tripinfo results are given below, as discussed here "tripinfo_rerouteNo" clearly shows that nodes have been rerouted.

enter image description here

Now following is revolving in my mind:

  1. Are routing algorithms applied successfully (set in erlangen.sumo.cfg) or in both cases default Dijkstra was used?
  2. Routing algorithms applied successfully but results are same because network was not congested enough / don't have enough alternate paths to follow. So I should have change network, with multiple accident count etc.
  3. I'm not getting how rerouting is working here.

I'm stuck here, any directions will be highly appreciated.

Upvotes: 0

Views: 364

Answers (2)

Ahmad Ahsan
Ahmad Ahsan

Reputation: 189

One can verify using a sample network like following:

enter image description here

In my test case I set starting position of vehicles as left most edge bottom lane and destination was upper lane of same edge. No uTurn was implemented therefore vehicles had to pass through junction, and FCD for every algorithm was significantly different.

Upvotes: 0

Michael
Michael

Reputation: 3680

It is not easy to say from the outside which routing algorithm has been applied, but I would assume 2. is the correct solution. The different algorithms are basically different in the way they can handle dynamic changes to the edge weight vs. the calculation speed but in most cases they should give the same result. You might wish to try the scale option to increase traffic easily or set device.rerouting.period to a value like 10 (seconds) to enable periodic rerouting of the vehicles to see more effects. Also setting weights.random-factor to a large value can help.

Upvotes: 2

Related Questions