6. <additional-files value="map.poly.xml"/>
</input>
<time>
<begin value="0"/>
<end value="1000"/>
</time>
</configuration>
9) Open SUMO GUI > Open Simulation > Run map.sumo.cfg
10) If you are getting error while running the simulation then just see which vehicle is not
having proper route from the code and del. it
FOR OUT PUT-
First make configuration file-
Use this code in notepad ++ and save it as .sumocfg file
<configuration>
<input>
<net-file value="test.net.xml"/>
<route-files value="map.rou.xml"/>
</input>
<time>
<begin value="0"/>
<end value="2000"/>
</time>
</configuration>
Open and run the simulation in sumo gui
7. For floating car data-
Use this code in cmd-
sumo -c final.sumocfg --fcd-output sumoTrace.xml
sumo trace file will open which shows the floating car data.
1. RAW VEHICLE POSITION DUMP
sumo -c myconfig.sumocfg --netstate-dump my_dump_file.xml
ADD THIS LINE <output> <netstate-dump value="test_dump.xml" /> </output>
TO THE SUMOCFG FILE-
<configuration>
<input>
<net-file value="test.net.xml"/>
<route-files value="map.rou.xml"/>
</input>
<output>
<netstate-dump value="test_dump2.xml" />
</output>
<time>
8. <begin value="0"/>
<end value="2000"/>
</time>
</configuration>
Now simulate in sumo gui to get output
2. EMISSION OUTPUT
USE CODE –
sumo –c mynew.sumocfg --emission-output my_emission_file.xml
3. For getting full output use code-
sumo -c myconfig.sumocfg --full-output my_full_output.xml
open file (warning above gb)
9. Simulation 2-
Make a <sumo.net> file from netedit.
Create a four leg junction as shown below-
Save the file to a working folder then copy the randomtrips python file to the same folder
Use code in cmd- python randomTrips.py -n test.net.xml -r map.rou.xml -e 100 –l to
generate random traffic.
<trip id="0" depart="0.00" from="-E3" to="-E0"/>
<trip id="1" depart="1.00" from="-E1" to="E2"/>
<trip id="2" depart="2.00" from="-E3" to="E2"/>
<trip id="4" depart="4.00" from="-E2" to="-E0"/>
<trip id="5" depart="5.00" from="-E1" to="E2"/>
<trip id="6" depart="6.00" from="-E1" to="-E0"/>
<trip id="7" depart="7.00" from="-E3" to="E2"/>
<trip id="8" depart="8.00" from="-E1" to="E2"/>
<trip id="10" depart="10.00" from="-E3" to="E2"/>
<trip id="11" depart="11.00" from="-E2" to="-E0"/>
<trip id="12" depart="12.00" from="E0" to="E1"/>
<trip id="13" depart="13.00" from="-E1" to="-E0"/>
<trip id="14" depart="14.00" from="E0" to="E2"/>
<trip id="15" depart="15.00" from="-E3" to="-E0"/>
<trip id="16" depart="16.00" from="-E1" to="E3"/>
<trip id="17" depart="17.00" from="-E2" to="E1"/>
<trip id="18" depart="18.00" from="E0" to="E2"/>
<trip id="19" depart="19.00" from="E0" to="E2"/>
E0 -E0
E2 -E2
-E1
E1
E3
-E3
12. <time>
<begin value="0"/>
<end value="10000"/>
</time>
CLICK ON INSPECT MODE> CLICK ON JUNCTION > SELECT TYPE TO TRAFFIC LIGHT > SELECT
TRAFFIC LIGHT MODE > CLICK ON THE JUNCTION AND SAVE THE TLS PROGRAMME FILE AS
TLS.
EDIT> EDIT VISUALIZATION > JUNCTIONS > CLICK ON SHOW LINK TLS INDEX
For static traffic light – (File name – TLS)
<tlLogic id="J1" type="static" programID="0" offset="0">
<!-- <phase duration="42" state="0123456789101112"/> -->
<!-- Green Light-->
<phase duration="42" state="GGgrrrrrrrrr"/>
<!-- Yellow Light-->
<phase duration="3" state="yyyrrrrrrrrr"/>
<!-- all red-->
<phase duration="3" state="rrrrrrrrrrrr"/>
<!--phase 2-->