DTSO-Mtech_2025/sumo_configs/intersection.net.xml

97 lines
6.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<net version="1.16" junctionCornerDetail="5" limitTurnSpeed="5.50">
<location netOffset="0.00,0.00" convBoundary="-500.00,-500.00,500.00,500.00" origBoundary="-500.00,-500.00,500.00,500.00" projParameter="!"/>
<!-- Nodes (Junctions) -->
<junction id="intersection_1" type="traffic_light" x="0.00" y="0.00"
incLanes="N_to_intersection_0 N_to_intersection_1 E_to_intersection_0 E_to_intersection_1 S_to_intersection_0 S_to_intersection_1 W_to_intersection_0 W_to_intersection_1"
intLanes=":intersection_1_0_0 :intersection_1_1_0 :intersection_1_2_0 :intersection_1_3_0"
shape="-8.00,8.00 8.00,8.00 8.00,-8.00 -8.00,-8.00"/>
<junction id="N_junction" type="dead_end" x="0.00" y="500.00" incLanes="" intLanes="" shape="-5.60,500.00 1.60,500.00"/>
<junction id="E_junction" type="dead_end" x="500.00" y="0.00" incLanes="" intLanes="" shape="500.00,-5.60 500.00,1.60"/>
<junction id="S_junction" type="dead_end" x="0.00" y="-500.00" incLanes="" intLanes="" shape="5.60,-500.00 -1.60,-500.00"/>
<junction id="W_junction" type="dead_end" x="-500.00" y="0.00" incLanes="" intLanes="" shape="-500.00,5.60 -500.00,-1.60"/>
<junction id="N_end" type="dead_end" x="0.00" y="500.00" incLanes="intersection_to_N_0 intersection_to_N_1" intLanes="" shape="-0.80,500.00 5.60,500.00"/>
<junction id="E_end" type="dead_end" x="500.00" y="0.00" incLanes="intersection_to_E_0 intersection_to_E_1" intLanes="" shape="500.00,-0.80 500.00,5.60"/>
<junction id="S_end" type="dead_end" x="0.00" y="-500.00" incLanes="intersection_to_S_0 intersection_to_S_1" intLanes="" shape="0.80,-500.00 -5.60,-500.00"/>
<junction id="W_end" type="dead_end" x="-500.00" y="0.00" incLanes="intersection_to_W_0 intersection_to_W_1" intLanes="" shape="-500.00,0.80 -500.00,-5.60"/>
<!-- Edges (Roads) -->
<!-- Incoming edges -->
<edge id="N_to_intersection" from="N_junction" to="intersection_1" priority="1">
<lane id="N_to_intersection_0" index="0" speed="13.89" length="500.00" shape="-4.00,500.00 -4.00,8.00"/>
<lane id="N_to_intersection_1" index="1" speed="13.89" length="500.00" shape="-0.80,500.00 -0.80,8.00"/>
</edge>
<edge id="E_to_intersection" from="E_junction" to="intersection_1" priority="1">
<lane id="E_to_intersection_0" index="0" speed="13.89" length="500.00" shape="500.00,-4.00 8.00,-4.00"/>
<lane id="E_to_intersection_1" index="1" speed="13.89" length="500.00" shape="500.00,-0.80 8.00,-0.80"/>
</edge>
<edge id="S_to_intersection" from="S_junction" to="intersection_1" priority="1">
<lane id="S_to_intersection_0" index="0" speed="13.89" length="500.00" shape="4.00,-500.00 4.00,-8.00"/>
<lane id="S_to_intersection_1" index="1" speed="13.89" length="500.00" shape="0.80,-500.00 0.80,-8.00"/>
</edge>
<edge id="W_to_intersection" from="W_junction" to="intersection_1" priority="1">
<lane id="W_to_intersection_0" index="0" speed="13.89" length="500.00" shape="-500.00,4.00 -8.00,4.00"/>
<lane id="W_to_intersection_1" index="1" speed="13.89" length="500.00" shape="-500.00,0.80 -8.00,0.80"/>
</edge>
<!-- Outgoing Edges -->
<edge id="intersection_to_N" from="intersection_1" to="N_end" priority="1">
<lane id="intersection_to_N_0" index="0" speed="13.89" length="500.00" shape="0.80,8.00 0.80,500.00"/>
<lane id="intersection_to_N_1" index="1" speed="13.89" length="500.00" shape="4.00,8.00 4.00,500.00"/>
</edge>
<edge id="intersection_to_E" from="intersection_1" to="E_end" priority="1">
<lane id="intersection_to_E_0" index="0" speed="13.89" length="500.00" shape="8.00,0.80 500.00,0.80"/>
<lane id="intersection_to_E_1" index="1" speed="13.89" length="500.00" shape="8.00,4.00 500.00,4.00"/>
</edge>
<edge id="intersection_to_S" from="intersection_1" to="S_end" priority="1">
<lane id="intersection_to_S_0" index="0" speed="13.89" length="500.00" shape="-0.80,-8.00 -0.80,-500.00"/>
<lane id="intersection_to_S_1" index="1" speed="13.89" length="500.00" shape="-4.00,-8.00 -4.00,-500.00"/>
</edge>
<edge id="intersection_to_W" from="intersection_1" to="W_end" priority="1">
<lane id="intersection_to_W_0" index="0" speed="13.89" length="500.00" shape="-8.00,-0.80 -500.00,-0.80"/>
<lane id="intersection_to_W_1" index="1" speed="13.89" length="500.00" shape="-8.00,-4.00 -500.00,-4.00"/>
</edge>
<!-- Traffic Light Logic -->
<tlLogic id="intersection_1" type="static" programID="0" offset="0">
<phase duration="30" state="GGrrrrGGrrrr" name="North-South"/>
<phase duration="3" state="yyrrrryyrrrr" name="North-South Yellow"/>
<phase duration="30" state="rrGGrrrrGGrr" name="East-West"/>
<phase duration="3" state="rryyrrrryyrr" name="East-West Yellow"/>
<phase duration="20" state="GrrrGrrrGrrr" name="North-South Left"/>
<phase duration="3" state="yrrryrrryrrr" name="North-South Left Yellow"/>
<phase duration="20" state="rrrGrrrrrGrr" name="East-West Left"/>
<phase duration="3" state="rrryrrrrryrr" name="East-West Left Yellow"/>
</tlLogic>
<!-- Connections -->
<connection from="N_to_intersection" to="intersection_to_S" fromLane="0" toLane="0"/>
<connection from="N_to_intersection" to="intersection_to_S" fromLane="1" toLane="1"/>
<connection from="N_to_intersection" to="intersection_to_E" fromLane="1" toLane="0"/>
<connection from="N_to_intersection" to="intersection_to_W" fromLane="0" toLane="1"/>
<connection from="E_to_intersection" to="intersection_to_W" fromLane="0" toLane="0"/>
<connection from="E_to_intersection" to="intersection_to_W" fromLane="1" toLane="1"/>
<connection from="E_to_intersection" to="intersection_to_S" fromLane="1" toLane="0"/>
<connection from="E_to_intersection" to="intersection_to_N" fromLane="0" toLane="1"/>
<connection from="S_to_intersection" to="intersection_to_N" fromLane="0" toLane="0"/>
<connection from="S_to_intersection" to="intersection_to_N" fromLane="1" toLane="1"/>
<connection from="S_to_intersection" to="intersection_to_W" fromLane="1" toLane="0"/>
<connection from="S_to_intersection" to="intersection_to_E" fromLane="0" toLane="1"/>
<connection from="W_to_intersection" to="intersection_to_E" fromLane="0" toLane="0"/>
<connection from="W_to_intersection" to="intersection_to_E" fromLane="1" toLane="1"/>
<connection from="W_to_intersection" to="intersection_to_N" fromLane="1" toLane="0"/>
<connection from="W_to_intersection" to="intersection_to_S" fromLane="0" toLane="1"/>
</net>