Hi all, I have two codes below. In traci_demo_v1, I have a loop that just starts and closes a simulation and prints the time taken to do so. In windows, it takes around 0.5 secs but when I check my task manager (Memory Usage.PNG file attached below) I see only some memory use of 35MB and no disk usage. So I was wondering why it takes so long to start or load a state (without gui)? Is there any way to reduce this time? Also, in traci_demo_v2 I have a simulation that runs for sometime with step-length 0.5. But when I measure the time across traci.simulation.getDeltaT(), it takes from 0 to 0.001 seconds rather than 0.5 seconds. So, I am a bit confused about how long it actually takes for sumo to perform one simulation step?
I am using SUMO v1.7. -- Thank you. Abdullah
traci_demo_v2.py
Description: Binary data
config.sumocfg
Description: application/sumo
<routes> <vType id="car" vClass="passenger" length="5" accel="3.5" decel="2.2" sigma="1.0" maxSpeed="10"/> <vType id="bus" vClass="passenger" length="8" accel="1.5" decel="2" sigma="1.0" maxSpeed="7"/> <!-- odd = up to down, right to left --> <route id="route_0" edges="gneE10 gneE13" /> <!--north - south--> <route id="route_1" edges="gneE14 gneE9" /> <!--south - north--> <route id="route_2" edges="gneE16 gneE15" /> <!--west - east--> <route id="route_3" edges="gneE12 gneE17" /> <!--east - west--> <!-- <route id="route_91" edges="" /> <route id="route_92" edges="" /> <route id="route_93" edges="" /> <route id="route_94" edges="" /> <route id="route_95" edges="" /> <route id="route_96" edges="" /> <route id="route_97" edges="" /> <route id="route_98" edges="" /> <route id="route_99" edges="" /> --> </routes>
traci_demo_v1.py
Description: Binary data
<?xml version="1.0" encoding="UTF-8"?> <!-- generated on 01/17/21 11:17:17 by Eclipse SUMO netedit Version 1.7.0 <configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/netconvertConfiguration.xsd"> <input> <sumo-net-file value="C:\Users\Abdullah\Documents\Thesis\testScenario\single%20Junction\network.net.xml"/> </input> <output> <output-file value="C:\Users\Abdullah\Documents\Thesis\testScenario\single%20Junction\network.net.xml"/> </output> <processing> <geometry.min-radius.fix.railways value="false"/> <geometry.max-grade.fix value="false"/> <offset.disable-normalization value="true"/> <lefthand value="false"/> </processing> <junctions> <no-turnarounds value="true"/> <junctions.corner-detail value="5"/> <junctions.limit-turn-speed value="5.5"/> <rectangular-lane-cut value="false"/> </junctions> <pedestrian> <walkingareas value="false"/> </pedestrian> <report> <aggregate-warnings value="5"/> </report> </configuration> --> <net version="1.6" junctionCornerDetail="5" limitTurnSpeed="5.50" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/net_file.xsd"> <location netOffset="0.00,0.00" convBoundary="-153.15,-85.73,239.50,177.87" origBoundary="-10000000000.00,-10000000000.00,10000000000.00,10000000000.00" projParameter="!"/> <edge id=":gneJ6_0" function="internal"> <lane id=":gneJ6_0_0" index="0" speed="7.30" length="10.70" shape="50.63,54.84 47.75,55.30 45.62,56.54 44.24,58.56 43.60,61.36"/> </edge> <edge id=":gneJ6_1" function="internal"> <lane id=":gneJ6_1_0" index="0" speed="13.89" length="21.72" shape="50.63,54.84 28.82,54.72"/> <lane id=":gneJ6_1_1" index="1" speed="13.89" length="21.72" shape="50.56,51.64 28.93,51.52"/> </edge> <edge id=":gneJ6_3" function="internal"> <lane id=":gneJ6_3_0" index="0" speed="9.16" length="7.40" shape="50.56,51.64 45.11,50.98 43.47,50.01"/> </edge> <edge id=":gneJ6_16" function="internal"> <lane id=":gneJ6_16_0" index="0" speed="9.16" length="12.45" shape="43.47,50.01 41.29,48.72 39.11,44.86 38.56,39.40"/> </edge> <edge id=":gneJ6_4" function="internal"> <lane id=":gneJ6_4_0" index="0" speed="6.37" length="9.04" shape="44.96,39.67 45.21,42.16 46.20,43.91 47.94,44.94 50.42,45.25"/> </edge> <edge id=":gneJ6_5" function="internal"> <lane id=":gneJ6_5_0" index="0" speed="13.89" length="21.67" shape="44.96,39.67 43.60,61.36"/> <lane id=":gneJ6_5_1" index="1" speed="13.89" length="21.67" shape="41.76,39.53 40.41,61.10"/> </edge> <edge id=":gneJ6_7" function="internal"> <lane id=":gneJ6_7_0" index="0" speed="9.43" length="7.40" shape="41.76,39.53 40.76,44.93 39.72,46.53"/> </edge> <edge id=":gneJ6_17" function="internal"> <lane id=":gneJ6_17_0" index="0" speed="9.43" length="12.59" shape="39.72,46.53 38.29,48.73 34.34,50.93 28.93,51.52"/> </edge> <edge id=":gneJ6_8" function="internal"> <lane id=":gneJ6_8_0" index="0" speed="6.75" length="9.73" shape="29.14,45.13 31.77,44.83 33.68,43.76 34.88,41.90 35.37,39.26"/> </edge> <edge id=":gneJ6_9" function="internal"> <lane id=":gneJ6_9_0" index="0" speed="13.89" length="21.37" shape="29.14,45.13 50.42,45.25"/> <lane id=":gneJ6_9_1" index="1" speed="13.89" length="21.37" shape="29.04,48.32 50.49,48.45"/> </edge> <edge id=":gneJ6_11" function="internal"> <lane id=":gneJ6_11_0" index="0" speed="9.18" length="6.68" shape="29.04,48.32 34.40,49.28 35.42,49.96"/> </edge> <edge id=":gneJ6_18" function="internal"> <lane id=":gneJ6_18_0" index="0" speed="9.18" length="13.05" shape="35.42,49.96 38.08,51.72 40.08,55.66 40.41,61.10"/> </edge> <edge id=":gneJ6_12" function="internal"> <lane id=":gneJ6_12_0" index="0" speed="6.40" length="9.04" shape="34.03,60.57 33.88,58.08 32.96,56.28 31.28,55.16 28.82,54.72"/> </edge> <edge id=":gneJ6_13" function="internal"> <lane id=":gneJ6_13_0" index="0" speed="13.89" length="21.42" shape="34.03,60.57 35.37,39.26"/> <lane id=":gneJ6_13_1" index="1" speed="13.89" length="21.42" shape="37.22,60.84 38.56,39.40"/> </edge> <edge id=":gneJ6_15" function="internal"> <lane id=":gneJ6_15_0" index="0" speed="9.84" length="6.88" shape="37.22,60.84 38.43,55.51 39.23,54.33"/> </edge> <edge id=":gneJ6_19" function="internal"> <lane id=":gneJ6_19_0" index="0" speed="9.84" length="13.37" shape="39.23,54.33 41.04,51.68 45.06,49.32 50.49,48.45"/> </edge> <edge id="gneE10" from="gneJ3" to="gneJ6" priority="-1"> <lane id="gneE10_0" index="0" speed="13.89" length="117.30" shape="24.36,177.47 34.03,60.57"/> <lane id="gneE10_1" index="1" speed="13.89" length="117.30" shape="27.55,177.74 37.22,60.84"/> </edge> <edge id="gneE12" from="gneJ2" to="gneJ6" priority="-1"> <lane id="gneE12_0" index="0" speed="13.89" length="189.02" shape="239.60,50.74 50.63,54.84"/> <lane id="gneE12_1" index="1" speed="13.89" length="189.02" shape="239.53,47.54 50.56,51.64"/> </edge> <edge id="gneE13" from="gneJ6" to="gneJ4" priority="-1"> <lane id="gneE13_0" index="0" speed="13.89" length="125.31" shape="35.37,39.26 40.71,-85.93"/> <lane id="gneE13_1" index="1" speed="13.89" length="125.31" shape="38.56,39.40 43.91,-85.80"/> </edge> <edge id="gneE14" from="gneJ4" to="gneJ6" priority="-1"> <lane id="gneE14_0" index="0" speed="13.89" length="125.31" shape="50.31,-85.53 44.96,39.67"/> <lane id="gneE14_1" index="1" speed="13.89" length="125.31" shape="47.11,-85.66 41.76,39.53"/> </edge> <edge id="gneE15" from="gneJ6" to="gneJ2" priority="-1"> <lane id="gneE15_0" index="0" speed="13.89" length="189.02" shape="50.42,45.25 239.40,41.14"/> <lane id="gneE15_1" index="1" speed="13.89" length="189.02" shape="50.49,48.45 239.47,44.34"/> </edge> <edge id="gneE16" from="gneJ5" to="gneJ6" priority="-1"> <lane id="gneE16_0" index="0" speed="13.89" length="182.23" shape="-152.99,39.06 29.14,45.13"/> <lane id="gneE16_1" index="1" speed="13.89" length="182.23" shape="-153.10,42.26 29.04,48.32"/> </edge> <edge id="gneE17" from="gneJ6" to="gneJ5" priority="-1"> <lane id="gneE17_0" index="0" speed="13.89" length="182.23" shape="28.82,54.72 -153.31,48.66"/> <lane id="gneE17_1" index="1" speed="13.89" length="182.23" shape="28.93,51.52 -153.20,45.46"/> </edge> <edge id="gneE9" from="gneJ6" to="gneJ3" priority="-1"> <lane id="gneE9_0" index="0" speed="13.89" length="117.30" shape="43.60,61.36 33.92,178.27"/> <lane id="gneE9_1" index="1" speed="13.89" length="117.30" shape="40.41,61.10 30.73,178.00"/> </edge> <tlLogic id="gneJ6" type="static" programID="0" offset="0"> <phase duration="42" state="rrrrGGGgrrrrGGGg"/> <phase duration="3" state="rrrryyyyrrrryyyy"/> <phase duration="42" state="GGGgrrrrGGGgrrrr"/> <phase duration="3" state="yyyyrrrryyyyrrrr"/> </tlLogic> <junction id="gneJ2" type="dead_end" x="239.50" y="45.94" incLanes="gneE15_0 gneE15_1" intLanes="" shape="239.50,45.94 239.36,39.54 239.50,45.94"/> <junction id="gneJ3" type="dead_end" x="29.14" y="177.87" incLanes="gneE9_0 gneE9_1" intLanes="" shape="29.14,177.87 35.52,178.40 29.14,177.87"/> <junction id="gneJ4" type="dead_end" x="45.51" y="-85.73" incLanes="gneE13_0 gneE13_1" intLanes="" shape="45.51,-85.73 39.12,-86.00 45.51,-85.73"/> <junction id="gneJ5" type="dead_end" x="-153.15" y="43.86" incLanes="gneE17_0 gneE17_1" intLanes="" shape="-153.15,43.86 -153.36,50.26 -153.15,43.86"/> <junction id="gneJ6" type="traffic_light" x="39.70" y="50.28" incLanes="gneE12_0 gneE12_1 gneE14_0 gneE14_1 gneE16_0 gneE16_1 gneE10_0 gneE10_1" intLanes=":gneJ6_0_0 :gneJ6_1_0 :gneJ6_1_1 :gneJ6_16_0 :gneJ6_4_0 :gneJ6_5_0 :gneJ6_5_1 :gneJ6_17_0 :gneJ6_8_0 :gneJ6_9_0 :gneJ6_9_1 :gneJ6_18_0 :gneJ6_12_0 :gneJ6_13_0 :gneJ6_13_1 :gneJ6_19_0" shape="50.66,56.44 50.38,43.65 48.18,43.25 47.43,42.71 46.91,41.95 46.62,40.96 46.56,39.74 33.77,39.19 33.17,41.66 32.53,42.52 31.65,43.11 30.54,43.45 29.20,43.53 28.77,56.32 30.95,56.84 31.69,57.42 32.18,58.21 32.43,59.22 32.44,60.44 45.19,61.49 45.98,58.74 46.77,57.76 47.81,57.05 49.11,56.61"> <request index="0" response="0000000001100000" foes="0000000001100000" cont="0"/> <request index="1" response="1111000011100000" foes="1111100011100000" cont="0"/> <request index="2" response="1111000011100000" foes="1111100011100000" cont="0"/> <request index="3" response="1110011011100000" foes="1110011011100000" cont="1"/> <request index="4" response="0000000000000000" foes="0000011000000000" cont="0"/> <request index="5" response="0000100000001000" foes="1000111000001111" cont="0"/> <request index="6" response="0000100000001000" foes="1000111000001111" cont="0"/> <request index="7" response="0110100000001000" foes="0110111000001110" cont="1"/> <request index="8" response="0110000000000000" foes="0110000000000000" cont="0"/> <request index="9" response="1110000011110000" foes="1110000011111000" cont="0"/> <request index="10" response="1110000011110000" foes="1110000011111000" cont="0"/> <request index="11" response="1110000011100110" foes="1110000011100110" cont="1"/> <request index="12" response="0000000000000000" foes="0000000000000110" cont="0"/> <request index="13" response="0000100000001000" foes="0000111110001110" cont="0"/> <request index="14" response="0000100000001000" foes="0000111110001110" cont="0"/> <request index="15" response="0000100001101000" foes="0000111001101110" cont="1"/> </junction> <junction id=":gneJ6_16_0" type="internal" x="43.47" y="50.01" incLanes=":gneJ6_3_0 gneE16_0 gneE16_1" intLanes=":gneJ6_5_0 :gneJ6_5_1 :gneJ6_7_0 :gneJ6_8_0 :gneJ6_9_0 :gneJ6_9_1 :gneJ6_13_0 :gneJ6_13_1 :gneJ6_15_0"/> <junction id=":gneJ6_17_0" type="internal" x="39.72" y="46.53" incLanes=":gneJ6_7_0 gneE10_0 gneE10_1" intLanes=":gneJ6_1_0 :gneJ6_1_1 :gneJ6_3_0 :gneJ6_9_0 :gneJ6_9_1 :gneJ6_11_0 :gneJ6_12_0 :gneJ6_13_0 :gneJ6_13_1"/> <junction id=":gneJ6_18_0" type="internal" x="35.42" y="49.96" incLanes=":gneJ6_11_0 gneE12_0 gneE12_1" intLanes=":gneJ6_0_0 :gneJ6_1_0 :gneJ6_1_1 :gneJ6_5_0 :gneJ6_5_1 :gneJ6_7_0 :gneJ6_13_0 :gneJ6_13_1 :gneJ6_15_0"/> <junction id=":gneJ6_19_0" type="internal" x="39.23" y="54.33" incLanes=":gneJ6_15_0 gneE14_0 gneE14_1" intLanes=":gneJ6_1_0 :gneJ6_1_1 :gneJ6_3_0 :gneJ6_4_0 :gneJ6_5_0 :gneJ6_5_1 :gneJ6_9_0 :gneJ6_9_1 :gneJ6_11_0"/> <connection from="gneE10" to="gneE17" fromLane="0" toLane="0" via=":gneJ6_12_0" tl="gneJ6" linkIndex="12" dir="r" state="O"/> <connection from="gneE10" to="gneE13" fromLane="0" toLane="0" via=":gneJ6_13_0" tl="gneJ6" linkIndex="13" dir="s" state="O"/> <connection from="gneE10" to="gneE13" fromLane="1" toLane="1" via=":gneJ6_13_1" tl="gneJ6" linkIndex="14" dir="s" state="O"/> <connection from="gneE10" to="gneE15" fromLane="1" toLane="1" via=":gneJ6_15_0" tl="gneJ6" linkIndex="15" dir="l" state="o"/> <connection from="gneE12" to="gneE9" fromLane="0" toLane="0" via=":gneJ6_0_0" tl="gneJ6" linkIndex="0" dir="r" state="o"/> <connection from="gneE12" to="gneE17" fromLane="0" toLane="0" via=":gneJ6_1_0" tl="gneJ6" linkIndex="1" dir="s" state="o"/> <connection from="gneE12" to="gneE17" fromLane="1" toLane="1" via=":gneJ6_1_1" tl="gneJ6" linkIndex="2" dir="s" state="o"/> <connection from="gneE12" to="gneE13" fromLane="1" toLane="1" via=":gneJ6_3_0" tl="gneJ6" linkIndex="3" dir="l" state="o"/> <connection from="gneE14" to="gneE15" fromLane="0" toLane="0" via=":gneJ6_4_0" tl="gneJ6" linkIndex="4" dir="r" state="O"/> <connection from="gneE14" to="gneE9" fromLane="0" toLane="0" via=":gneJ6_5_0" tl="gneJ6" linkIndex="5" dir="s" state="O"/> <connection from="gneE14" to="gneE9" fromLane="1" toLane="1" via=":gneJ6_5_1" tl="gneJ6" linkIndex="6" dir="s" state="O"/> <connection from="gneE14" to="gneE17" fromLane="1" toLane="1" via=":gneJ6_7_0" tl="gneJ6" linkIndex="7" dir="l" state="o"/> <connection from="gneE16" to="gneE13" fromLane="0" toLane="0" via=":gneJ6_8_0" tl="gneJ6" linkIndex="8" dir="r" state="o"/> <connection from="gneE16" to="gneE15" fromLane="0" toLane="0" via=":gneJ6_9_0" tl="gneJ6" linkIndex="9" dir="s" state="o"/> <connection from="gneE16" to="gneE15" fromLane="1" toLane="1" via=":gneJ6_9_1" tl="gneJ6" linkIndex="10" dir="s" state="o"/> <connection from="gneE16" to="gneE9" fromLane="1" toLane="1" via=":gneJ6_11_0" tl="gneJ6" linkIndex="11" dir="l" state="o"/> <connection from=":gneJ6_0" to="gneE9" fromLane="0" toLane="0" dir="r" state="M"/> <connection from=":gneJ6_1" to="gneE17" fromLane="0" toLane="0" dir="s" state="M"/> <connection from=":gneJ6_1" to="gneE17" fromLane="1" toLane="1" dir="s" state="M"/> <connection from=":gneJ6_3" to="gneE13" fromLane="0" toLane="1" via=":gneJ6_16_0" dir="l" state="m"/> <connection from=":gneJ6_16" to="gneE13" fromLane="0" toLane="1" dir="l" state="M"/> <connection from=":gneJ6_4" to="gneE15" fromLane="0" toLane="0" dir="r" state="M"/> <connection from=":gneJ6_5" to="gneE9" fromLane="0" toLane="0" dir="s" state="M"/> <connection from=":gneJ6_5" to="gneE9" fromLane="1" toLane="1" dir="s" state="M"/> <connection from=":gneJ6_7" to="gneE17" fromLane="0" toLane="1" via=":gneJ6_17_0" dir="l" state="m"/> <connection from=":gneJ6_17" to="gneE17" fromLane="0" toLane="1" dir="l" state="M"/> <connection from=":gneJ6_8" to="gneE13" fromLane="0" toLane="0" dir="r" state="M"/> <connection from=":gneJ6_9" to="gneE15" fromLane="0" toLane="0" dir="s" state="M"/> <connection from=":gneJ6_9" to="gneE15" fromLane="1" toLane="1" dir="s" state="M"/> <connection from=":gneJ6_11" to="gneE9" fromLane="0" toLane="1" via=":gneJ6_18_0" dir="l" state="m"/> <connection from=":gneJ6_18" to="gneE9" fromLane="0" toLane="1" dir="l" state="M"/> <connection from=":gneJ6_12" to="gneE17" fromLane="0" toLane="0" dir="r" state="M"/> <connection from=":gneJ6_13" to="gneE13" fromLane="0" toLane="0" dir="s" state="M"/> <connection from=":gneJ6_13" to="gneE13" fromLane="1" toLane="1" dir="s" state="M"/> <connection from=":gneJ6_15" to="gneE15" fromLane="0" toLane="1" via=":gneJ6_19_0" dir="l" state="m"/> <connection from=":gneJ6_19" to="gneE15" fromLane="0" toLane="1" dir="l" state="M"/> </net>
_______________________________________________ sumo-user mailing list [email protected] To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
