dep circulaires+fix priorités
This commit is contained in:
parent
4239c23495
commit
a51b3e1dd6
57
Car.py
57
Car.py
@ -3,6 +3,7 @@ from math import dist, ceil, sqrt, log, cos, sin, atan2, pi
|
||||
from random import randint, uniform
|
||||
from PySide6.QtGui import QPainter
|
||||
from PySide6.QtCore import QPointF, Signal, QObject, Qt
|
||||
from itertools import islice
|
||||
|
||||
class updateSignals(QObject):
|
||||
updateDisp = Signal(tuple)
|
||||
@ -54,12 +55,14 @@ class Car():
|
||||
self.v=0
|
||||
self.a=10
|
||||
self.b=20
|
||||
self.minSpace=10
|
||||
self.minSpace=20
|
||||
self.leaderBefore=False
|
||||
self.distToInter=0
|
||||
self.timeStopped=0
|
||||
self.speedPercentage=0
|
||||
self.ticksLived=0
|
||||
self.timeAtInter = 0
|
||||
self.forceThrough = False
|
||||
|
||||
self.vmax=0
|
||||
|
||||
@ -127,6 +130,7 @@ class Car():
|
||||
l = 0
|
||||
carsHere = self.controller.getCarsOnLane(self.route[edgeInd].getID(), laneId)
|
||||
carsHere = list(filter(lambda c: c.id != self.id, carsHere))
|
||||
self.leaderBefore = False
|
||||
while(l<maxDist):
|
||||
endPos = laneShape[shapeInd+1]
|
||||
|
||||
@ -173,7 +177,6 @@ class Car():
|
||||
l+=dist(laneShape[shapeInd], closest.pos)
|
||||
if l <= maxDist:
|
||||
self.leaderDist = l
|
||||
self.leaderBefore = False
|
||||
return closest
|
||||
else:
|
||||
return
|
||||
@ -200,10 +203,12 @@ class Car():
|
||||
return
|
||||
edgeInd = edgeInd + 1
|
||||
if edgeInd >= len(self.route):
|
||||
print(self.id,"fu")
|
||||
return None
|
||||
while self.route[prevInd].isSpecial():
|
||||
prevInd -= 1
|
||||
if prevInd < 0:
|
||||
print(self.id, "fu2")
|
||||
return None
|
||||
inter = self.route[edgeInd-1].getFromNode()
|
||||
connections = self.route[prevInd].getConnections(self.route[edgeInd])
|
||||
@ -213,6 +218,7 @@ class Car():
|
||||
connection = connections[0]
|
||||
linkInd = inter.getLinkIndex(connection)
|
||||
if(linkInd == -1): # Ca devrait pas arriver, mais de toute évidence ça arrive
|
||||
print(self.id, "fu3")
|
||||
return;
|
||||
resp = inter._prohibits[linkInd] # Si je me souvient bien les variables précédées d'un _ doivent pas être touchées?
|
||||
connRaw = inter.getConnections()
|
||||
@ -231,7 +237,9 @@ class Car():
|
||||
intLane = self.map.getLane(conn[i].getViaLaneID())
|
||||
intLaneLgt = intLane.getLength()
|
||||
carsInEdge = self.controller.getCarsOnLane(edge.getID(), laneInd)
|
||||
carsInEdge = list(filter(lambda c: not c.turnNext(), carsInEdge))
|
||||
carsInEdge = list(filter(lambda c: c.nextNonSpecialEdge() == conn[i].getTo(), carsInEdge))
|
||||
#carsInEdge = list(carsInEdge)
|
||||
#carsInEdge = list(filter(lambda c: c.nextNonSpecialEdge() == self.nextNonSpecialEdge(), carsInEdge))
|
||||
if len(carsInEdge) != 0:
|
||||
carsInEdge = zip([self.getCarDist(c, edge, laneInd)+intLaneLgt for c in carsInEdge], carsInEdge)
|
||||
closest = min(carsInEdge, key=lambda c: c[0])
|
||||
@ -251,8 +259,15 @@ class Car():
|
||||
def turnNext(self):
|
||||
return self.cligno[self.index] != self.CLIGNO_NONE
|
||||
|
||||
def nextNonSpecialEdge(self):
|
||||
return next(filter(lambda e: not e.isSpecial(), islice(self.route, self.index + 1, None)))
|
||||
|
||||
def draw(self,painter):
|
||||
pt = QPointF(*self.pos)
|
||||
if self.forceThrough:
|
||||
painter.setPen(Qt.blue)
|
||||
elif self.leader is None:
|
||||
painter.setPen(Qt.gray)
|
||||
painter.drawEllipse(pt,self.size,self.size)
|
||||
painter.drawLine(self.pos[0], self.pos[1], self.pos[0]+5*cos(self.dir), self.pos[1]+5*sin(self.dir))
|
||||
|
||||
@ -356,6 +371,9 @@ class Car():
|
||||
if False and ("f_0" in self.id or "f_1" in self.id or "f_2" in self.id):
|
||||
self.v = 0
|
||||
return
|
||||
|
||||
if not self.leaderBefore:
|
||||
self.forceThrough = False
|
||||
|
||||
if leader is None:
|
||||
vd = min(self.v + self.a * dt, vmax)
|
||||
@ -367,6 +385,11 @@ class Car():
|
||||
|
||||
# si on est à une intersection
|
||||
if(self.leaderBefore):
|
||||
if self.v == 0:
|
||||
self.timeAtInter += dt
|
||||
else:
|
||||
self.timeAtInter = 0
|
||||
|
||||
# on calcule le temps qu'on va mettre à arriver à l'intersection
|
||||
# et le temps que le leader va mettre
|
||||
|
||||
@ -381,7 +404,19 @@ class Car():
|
||||
|
||||
tts = self.v/self.b # time to stop, temps pour s'arreter si on freine mnt
|
||||
dts = self.v*tts - (self.b*tts**2)/2 # distance to stop, distance parcouru en tts si on freine
|
||||
|
||||
#print(self.distToInter, self.minSpace, dts)
|
||||
|
||||
# Si on est bloqué dans une dépendance circulaire
|
||||
if self.timeAtInter > 10 and self.circularLeaderDep():
|
||||
self.forceThrough = True
|
||||
|
||||
if self.forceThrough:
|
||||
self.leader = None # On supprime le leader (pour que seulement la premiere voiture detecte la dependance circulaire)
|
||||
self.v = min(vmax, self.v + self.a*dt)
|
||||
return
|
||||
|
||||
|
||||
# si on est suffisement loin de l'intersection (i.e on s'en fout du leader)
|
||||
# ou si on as le temps d'arriver à l'intersection avant le leader (plus un marge pour garder un distance de sécu)
|
||||
# alors on accelere pour s'inserer
|
||||
@ -400,6 +435,20 @@ class Car():
|
||||
vd = min(self.v + self.a * dt, vsec, vmax)
|
||||
self.v = max(0, vd-self.nu)
|
||||
self.updateGraph(self.v, vmax, vsec)
|
||||
|
||||
# fonction pour verifier si on as pas une dependence circulaire de leader
|
||||
def circularLeaderDep(self):
|
||||
l = self.leader
|
||||
timeout = 5
|
||||
ls = []
|
||||
while l is not None and timeout > 0:
|
||||
ls.append(l.id)
|
||||
if l.id == self.id:
|
||||
print(ls)
|
||||
return True
|
||||
timeout -= 1
|
||||
l = l.leader
|
||||
return False
|
||||
|
||||
def updateGraph(self, v, vmax, vsec):
|
||||
if self.infoWidg is None:
|
||||
@ -460,7 +509,7 @@ class Car():
|
||||
return
|
||||
self.signals.updateDisp.emit(("Position", self.pos))
|
||||
self.signals.updateDisp.emit(("Vitesse", self.v))
|
||||
self.signals.updateDisp.emit(("Leader", self.leader if self.leader is None else f"{self.leader.id} @ {self.leaderDist:.2f}m"))
|
||||
self.signals.updateDisp.emit(("Leader", self.leader if self.leader is None else f"{self.leader.id} @ {self.leaderDist:.2f}m (inter : {self.leaderBefore})"))
|
||||
|
||||
def __copy__(self):
|
||||
copy = Car(self.id, self.rawRoute, self.startTime, self.map, self.controller, self.infoWidg)
|
||||
|
@ -123,6 +123,7 @@ class CarController:
|
||||
|
||||
def fromPath(self,path):
|
||||
self.cars=[]
|
||||
self.flows=[]
|
||||
self.t=0
|
||||
|
||||
while self.infoWidget is not None and self.infoWidget.count() != 0:
|
||||
|
216
comp_inter.net.xml
Normal file
216
comp_inter.net.xml
Normal file
@ -0,0 +1,216 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- generated on 2022-05-07 12:49:51 by Eclipse SUMO netedit Version 1.12.0
|
||||
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/netconvertConfiguration.xsd">
|
||||
|
||||
<output>
|
||||
<output-file value="/home/leo/Sketchbook/python/Traffic/comp_inter.net.xml"/>
|
||||
</output>
|
||||
|
||||
<processing>
|
||||
<offset.disable-normalization value="true"/>
|
||||
</processing>
|
||||
|
||||
<junctions>
|
||||
<no-turnarounds value="true"/>
|
||||
</junctions>
|
||||
|
||||
<report>
|
||||
<aggregate-warnings value="5"/>
|
||||
</report>
|
||||
|
||||
</configuration>
|
||||
-->
|
||||
|
||||
<net version="1.9" 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="-70.00,-100.00,400.00,180.00" origBoundary="10000000000.00,10000000000.00,-10000000000.00,-10000000000.00" projParameter="!"/>
|
||||
|
||||
<edge id=":J3_0" function="internal">
|
||||
<lane id=":J3_0_0" index="0" speed="13.89" length="0.10" shape="-60.00,41.60 -60.00,41.60"/>
|
||||
</edge>
|
||||
<edge id=":J3_1" function="internal">
|
||||
<lane id=":J3_1_0" index="0" speed="13.89" length="0.10" shape="-60.00,38.40 -60.00,38.40"/>
|
||||
</edge>
|
||||
<edge id=":J4_0" function="internal">
|
||||
<lane id=":J4_0_0" index="0" speed="6.51" length="9.03" shape="148.40,47.20 148.05,44.75 147.00,43.00 145.25,41.95 142.80,41.60"/>
|
||||
</edge>
|
||||
<edge id=":J4_1" function="internal">
|
||||
<lane id=":J4_1_0" index="0" speed="13.89" length="14.40" shape="148.40,47.20 148.40,32.80"/>
|
||||
</edge>
|
||||
<edge id=":J4_2" function="internal">
|
||||
<lane id=":J4_2_0" index="0" speed="8.00" length="14.19" shape="148.40,47.20 148.95,43.35 150.60,40.60 153.35,38.95 157.20,38.40"/>
|
||||
</edge>
|
||||
<edge id=":J4_3" function="internal">
|
||||
<lane id=":J4_3_0" index="0" speed="6.51" length="9.03" shape="157.20,41.60 154.75,41.95 153.00,43.00 151.95,44.75 151.60,47.20"/>
|
||||
</edge>
|
||||
<edge id=":J4_4" function="internal">
|
||||
<lane id=":J4_4_0" index="0" speed="13.89" length="14.40" shape="157.20,41.60 142.80,41.60"/>
|
||||
</edge>
|
||||
<edge id=":J4_5" function="internal">
|
||||
<lane id=":J4_5_0" index="0" speed="8.00" length="14.19" shape="157.20,41.60 153.35,41.05 150.60,39.40 148.95,36.65 148.40,32.80"/>
|
||||
</edge>
|
||||
<edge id=":J4_6" function="internal">
|
||||
<lane id=":J4_6_0" index="0" speed="6.51" length="9.03" shape="151.60,32.80 151.95,35.25 153.00,37.00 154.75,38.05 157.20,38.40"/>
|
||||
</edge>
|
||||
<edge id=":J4_7" function="internal">
|
||||
<lane id=":J4_7_0" index="0" speed="13.89" length="14.40" shape="151.60,32.80 151.60,47.20"/>
|
||||
</edge>
|
||||
<edge id=":J4_8" function="internal">
|
||||
<lane id=":J4_8_0" index="0" speed="8.00" length="14.19" shape="151.60,32.80 151.05,36.65 149.40,39.40 146.65,41.05 142.80,41.60"/>
|
||||
</edge>
|
||||
<edge id=":J4_9" function="internal">
|
||||
<lane id=":J4_9_0" index="0" speed="6.51" length="9.03" shape="142.80,38.40 145.25,38.05 147.00,37.00 148.05,35.25 148.40,32.80"/>
|
||||
</edge>
|
||||
<edge id=":J4_10" function="internal">
|
||||
<lane id=":J4_10_0" index="0" speed="13.89" length="14.40" shape="142.80,38.40 157.20,38.40"/>
|
||||
</edge>
|
||||
<edge id=":J4_11" function="internal">
|
||||
<lane id=":J4_11_0" index="0" speed="8.00" length="14.19" shape="142.80,38.40 146.65,38.95 149.40,40.60 151.05,43.35 151.60,47.20"/>
|
||||
</edge>
|
||||
<edge id=":J5_0" function="internal">
|
||||
<lane id=":J5_0_0" index="0" speed="13.89" length="0.10" shape="390.00,41.60 390.00,41.60"/>
|
||||
</edge>
|
||||
<edge id=":J5_1" function="internal">
|
||||
<lane id=":J5_1_0" index="0" speed="13.89" length="0.10" shape="390.00,38.40 390.00,38.40"/>
|
||||
</edge>
|
||||
<edge id=":J6_0" function="internal">
|
||||
<lane id=":J6_0_0" index="0" speed="13.89" length="0.10" shape="148.40,-90.00 148.40,-90.00"/>
|
||||
</edge>
|
||||
<edge id=":J6_1" function="internal">
|
||||
<lane id=":J6_1_0" index="0" speed="13.89" length="0.10" shape="151.60,-90.00 151.60,-90.00"/>
|
||||
</edge>
|
||||
<edge id=":J7_0" function="internal">
|
||||
<lane id=":J7_0_0" index="0" speed="13.89" length="0.10" shape="148.40,170.00 148.40,170.00"/>
|
||||
</edge>
|
||||
<edge id=":J7_1" function="internal">
|
||||
<lane id=":J7_1_0" index="0" speed="13.89" length="0.10" shape="151.60,170.00 151.60,170.00"/>
|
||||
</edge>
|
||||
|
||||
<edge id="-E1" from="J4" to="J3" priority="-1">
|
||||
<lane id="-E1_0" index="0" speed="13.89" length="202.80" shape="142.80,41.60 -60.00,41.60"/>
|
||||
</edge>
|
||||
<edge id="-E2" from="J4" to="J5" priority="-1">
|
||||
<lane id="-E2_0" index="0" speed="13.89" length="232.80" shape="157.20,38.40 390.00,38.40"/>
|
||||
</edge>
|
||||
<edge id="-E3" from="J4" to="J6" priority="-1">
|
||||
<lane id="-E3_0" index="0" speed="13.89" length="122.80" shape="148.40,32.80 148.40,-90.00"/>
|
||||
</edge>
|
||||
<edge id="-E4" from="J4" to="J7" priority="-1">
|
||||
<lane id="-E4_0" index="0" speed="13.89" length="122.80" shape="151.60,47.20 151.60,170.00"/>
|
||||
</edge>
|
||||
<edge id="-E5" from="J3" to="J8" priority="-1">
|
||||
<lane id="-E5_0" index="0" speed="13.89" length="10.00" shape="-60.00,41.60 -70.00,41.60"/>
|
||||
</edge>
|
||||
<edge id="-E6" from="J6" to="J9" priority="-1">
|
||||
<lane id="-E6_0" index="0" speed="13.89" length="10.00" shape="148.40,-90.00 148.40,-100.00"/>
|
||||
</edge>
|
||||
<edge id="-E7" from="J5" to="J10" priority="-1">
|
||||
<lane id="-E7_0" index="0" speed="13.89" length="10.00" shape="390.00,38.40 400.00,38.40"/>
|
||||
</edge>
|
||||
<edge id="-E8" from="J7" to="J11" priority="-1">
|
||||
<lane id="-E8_0" index="0" speed="13.89" length="10.00" shape="151.60,170.00 151.60,180.00"/>
|
||||
</edge>
|
||||
<edge id="E1" from="J3" to="J4" priority="-1">
|
||||
<lane id="E1_0" index="0" speed="13.89" length="202.80" shape="-60.00,38.40 142.80,38.40"/>
|
||||
</edge>
|
||||
<edge id="E2" from="J5" to="J4" priority="-1">
|
||||
<lane id="E2_0" index="0" speed="13.89" length="232.80" shape="390.00,41.60 157.20,41.60"/>
|
||||
</edge>
|
||||
<edge id="E3" from="J6" to="J4" priority="-1">
|
||||
<lane id="E3_0" index="0" speed="13.89" length="122.80" shape="151.60,-90.00 151.60,32.80"/>
|
||||
</edge>
|
||||
<edge id="E4" from="J7" to="J4" priority="-1">
|
||||
<lane id="E4_0" index="0" speed="13.89" length="122.80" shape="148.40,170.00 148.40,47.20"/>
|
||||
</edge>
|
||||
<edge id="E5" from="J8" to="J3" priority="-1">
|
||||
<lane id="E5_0" index="0" speed="13.89" length="10.00" shape="-70.00,38.40 -60.00,38.40"/>
|
||||
</edge>
|
||||
<edge id="E6" from="J9" to="J6" priority="-1">
|
||||
<lane id="E6_0" index="0" speed="13.89" length="10.00" shape="151.60,-100.00 151.60,-90.00"/>
|
||||
</edge>
|
||||
<edge id="E7" from="J10" to="J5" priority="-1">
|
||||
<lane id="E7_0" index="0" speed="13.89" length="10.00" shape="400.00,41.60 390.00,41.60"/>
|
||||
</edge>
|
||||
<edge id="E8" from="J11" to="J7" priority="-1">
|
||||
<lane id="E8_0" index="0" speed="13.89" length="10.00" shape="148.40,180.00 148.40,170.00"/>
|
||||
</edge>
|
||||
|
||||
<junction id="J10" type="dead_end" x="400.00" y="40.00" incLanes="-E7_0" intLanes="" shape="400.00,40.00 400.00,36.80 400.00,40.00"/>
|
||||
<junction id="J11" type="dead_end" x="150.00" y="180.00" incLanes="-E8_0" intLanes="" shape="150.00,180.00 153.20,180.00 150.00,180.00"/>
|
||||
<junction id="J3" type="priority" x="-60.00" y="40.00" incLanes="-E1_0 E5_0" intLanes=":J3_0_0 :J3_1_0" shape="-60.00,43.20 -60.00,36.80 -60.00,43.20">
|
||||
<request index="0" response="00" foes="00" cont="0"/>
|
||||
<request index="1" response="00" foes="00" cont="0"/>
|
||||
</junction>
|
||||
<junction id="J4" type="right_before_left" x="150.00" y="40.00" incLanes="E4_0 E2_0 E3_0 E1_0" intLanes=":J4_0_0 :J4_1_0 :J4_2_0 :J4_3_0 :J4_4_0 :J4_5_0 :J4_6_0 :J4_7_0 :J4_8_0 :J4_9_0 :J4_10_0 :J4_11_0" shape="146.80,47.20 153.20,47.20 153.64,44.98 154.20,44.20 154.98,43.64 155.98,43.31 157.20,43.20 157.20,36.80 154.98,36.36 154.20,35.80 153.64,35.02 153.31,34.02 153.20,32.80 146.80,32.80 146.36,35.02 145.80,35.80 145.02,36.36 144.02,36.69 142.80,36.80 142.80,43.20 145.02,43.64 145.80,44.20 146.36,44.98 146.69,45.98">
|
||||
<request index="0" response="000000000000" foes="000100010000" cont="0"/>
|
||||
<request index="1" response="111000000000" foes="111100110000" cont="0"/>
|
||||
<request index="2" response="110011000000" foes="110111110000" cont="0"/>
|
||||
<request index="3" response="000000000000" foes="100010000000" cont="0"/>
|
||||
<request index="4" response="000000000111" foes="100110000111" cont="0"/>
|
||||
<request index="5" response="011000000110" foes="111110000110" cont="0"/>
|
||||
<request index="6" response="000000000000" foes="010000000100" cont="0"/>
|
||||
<request index="7" response="000000111000" foes="110000111100" cont="0"/>
|
||||
<request index="8" response="000000110111" foes="110000110111" cont="0"/>
|
||||
<request index="9" response="000000000000" foes="000000100010" cont="0"/>
|
||||
<request index="10" response="000111000000" foes="000111100110" cont="0"/>
|
||||
<request index="11" response="000110111000" foes="000110111110" cont="0"/>
|
||||
</junction>
|
||||
<junction id="J5" type="priority" x="390.00" y="40.00" incLanes="E7_0 -E2_0" intLanes=":J5_0_0 :J5_1_0" shape="390.00,43.20 390.00,36.80 390.00,43.20">
|
||||
<request index="0" response="00" foes="00" cont="0"/>
|
||||
<request index="1" response="00" foes="00" cont="0"/>
|
||||
</junction>
|
||||
<junction id="J6" type="priority" x="150.00" y="-90.00" incLanes="-E3_0 E6_0" intLanes=":J6_0_0 :J6_1_0" shape="146.80,-90.00 153.20,-90.00 146.80,-90.00">
|
||||
<request index="0" response="00" foes="00" cont="0"/>
|
||||
<request index="1" response="00" foes="00" cont="0"/>
|
||||
</junction>
|
||||
<junction id="J7" type="priority" x="150.00" y="170.00" incLanes="E8_0 -E4_0" intLanes=":J7_0_0 :J7_1_0" shape="146.80,170.00 153.20,170.00 146.80,170.00">
|
||||
<request index="0" response="00" foes="00" cont="0"/>
|
||||
<request index="1" response="00" foes="00" cont="0"/>
|
||||
</junction>
|
||||
<junction id="J8" type="dead_end" x="-70.00" y="40.00" incLanes="-E5_0" intLanes="" shape="-70.00,40.00 -70.00,43.20 -70.00,40.00"/>
|
||||
<junction id="J9" type="dead_end" x="150.00" y="-100.00" incLanes="-E6_0" intLanes="" shape="150.00,-100.00 146.80,-100.00 150.00,-100.00"/>
|
||||
|
||||
<connection from="-E1" to="-E5" fromLane="0" toLane="0" via=":J3_0_0" dir="s" state="M"/>
|
||||
<connection from="-E2" to="-E7" fromLane="0" toLane="0" via=":J5_1_0" dir="s" state="M"/>
|
||||
<connection from="-E3" to="-E6" fromLane="0" toLane="0" via=":J6_0_0" dir="s" state="M"/>
|
||||
<connection from="-E4" to="-E8" fromLane="0" toLane="0" via=":J7_1_0" dir="s" state="M"/>
|
||||
<connection from="E1" to="-E3" fromLane="0" toLane="0" via=":J4_9_0" dir="r" state="="/>
|
||||
<connection from="E1" to="-E2" fromLane="0" toLane="0" via=":J4_10_0" dir="s" state="="/>
|
||||
<connection from="E1" to="-E4" fromLane="0" toLane="0" via=":J4_11_0" dir="l" state="="/>
|
||||
<connection from="E2" to="-E4" fromLane="0" toLane="0" via=":J4_3_0" dir="r" state="="/>
|
||||
<connection from="E2" to="-E1" fromLane="0" toLane="0" via=":J4_4_0" dir="s" state="="/>
|
||||
<connection from="E2" to="-E3" fromLane="0" toLane="0" via=":J4_5_0" dir="l" state="="/>
|
||||
<connection from="E3" to="-E2" fromLane="0" toLane="0" via=":J4_6_0" dir="r" state="="/>
|
||||
<connection from="E3" to="-E4" fromLane="0" toLane="0" via=":J4_7_0" dir="s" state="="/>
|
||||
<connection from="E3" to="-E1" fromLane="0" toLane="0" via=":J4_8_0" dir="l" state="="/>
|
||||
<connection from="E4" to="-E1" fromLane="0" toLane="0" via=":J4_0_0" dir="r" state="="/>
|
||||
<connection from="E4" to="-E3" fromLane="0" toLane="0" via=":J4_1_0" dir="s" state="="/>
|
||||
<connection from="E4" to="-E2" fromLane="0" toLane="0" via=":J4_2_0" dir="l" state="="/>
|
||||
<connection from="E5" to="E1" fromLane="0" toLane="0" via=":J3_1_0" dir="s" state="M"/>
|
||||
<connection from="E6" to="E3" fromLane="0" toLane="0" via=":J6_1_0" dir="s" state="M"/>
|
||||
<connection from="E7" to="E2" fromLane="0" toLane="0" via=":J5_0_0" dir="s" state="M"/>
|
||||
<connection from="E8" to="E4" fromLane="0" toLane="0" via=":J7_0_0" dir="s" state="M"/>
|
||||
|
||||
<connection from=":J3_0" to="-E5" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J3_1" to="E1" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J4_0" to="-E1" fromLane="0" toLane="0" dir="r" state="M"/>
|
||||
<connection from=":J4_1" to="-E3" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J4_2" to="-E2" fromLane="0" toLane="0" dir="l" state="M"/>
|
||||
<connection from=":J4_3" to="-E4" fromLane="0" toLane="0" dir="r" state="M"/>
|
||||
<connection from=":J4_4" to="-E1" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J4_5" to="-E3" fromLane="0" toLane="0" dir="l" state="M"/>
|
||||
<connection from=":J4_6" to="-E2" fromLane="0" toLane="0" dir="r" state="M"/>
|
||||
<connection from=":J4_7" to="-E4" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J4_8" to="-E1" fromLane="0" toLane="0" dir="l" state="M"/>
|
||||
<connection from=":J4_9" to="-E3" fromLane="0" toLane="0" dir="r" state="M"/>
|
||||
<connection from=":J4_10" to="-E2" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J4_11" to="-E4" fromLane="0" toLane="0" dir="l" state="M"/>
|
||||
<connection from=":J5_0" to="E2" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J5_1" to="-E7" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J6_0" to="-E6" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J6_1" to="E3" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J7_0" to="E4" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J7_1" to="-E8" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
|
||||
</net>
|
43
comp_inter.rou.xml
Normal file
43
comp_inter.rou.xml
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- generated on 2022-05-07 12:51:00 by Eclipse SUMO netedit Version 1.12.0
|
||||
-->
|
||||
|
||||
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
|
||||
<flow id="f_0" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E5 E1 -E3 -E6"/>
|
||||
</flow>
|
||||
<flow id="f_1" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E5 E1 -E2 -E7"/>
|
||||
</flow>
|
||||
<flow id="f_10" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E8 E4 -E3 -E6"/>
|
||||
</flow>
|
||||
<flow id="f_11" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E8 E4 -E2 -E7"/>
|
||||
</flow>
|
||||
<flow id="f_2" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E5 E1 -E4 -E8"/>
|
||||
</flow>
|
||||
<flow id="f_3" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E6 E3 -E2 -E7"/>
|
||||
</flow>
|
||||
<flow id="f_4" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E6 E3 -E4 -E8"/>
|
||||
</flow>
|
||||
<flow id="f_5" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E6 E3 -E1 -E5"/>
|
||||
</flow>
|
||||
<flow id="f_6" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E7 E2 -E4 -E8"/>
|
||||
</flow>
|
||||
<flow id="f_7" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E7 E2 -E1 -E5"/>
|
||||
</flow>
|
||||
<flow id="f_8" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E7 E2 -E3 -E6"/>
|
||||
</flow>
|
||||
<flow id="f_9" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E8 E4 -E1 -E5"/>
|
||||
</flow>
|
||||
</routes>
|
13
comp_inter_t1.rou.xml
Normal file
13
comp_inter_t1.rou.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- generated on 2022-05-07 12:54:23 by Eclipse SUMO netedit Version 1.12.0
|
||||
-->
|
||||
|
||||
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
|
||||
<vehicle id="v_0" depart="0.00">
|
||||
<route edges="E5 E1 -E2 -E7"/>
|
||||
</vehicle>
|
||||
<vehicle id="v_1" depart="6.00">
|
||||
<route edges="E6 E3 -E4 -E8"/>
|
||||
</vehicle>
|
||||
</routes>
|
19
comp_inter_t2.rou.xml
Normal file
19
comp_inter_t2.rou.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- generated on 2022-05-07 18:47:14 by Eclipse SUMO netedit Version 1.12.0
|
||||
-->
|
||||
|
||||
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
|
||||
<vehicle id="v_0" depart="0.00">
|
||||
<route edges="E5 E1 -E4 -E8"/>
|
||||
</vehicle>
|
||||
<vehicle id="v_1" depart="5.00">
|
||||
<route edges="E6 E3 -E1 -E5"/>
|
||||
</vehicle>
|
||||
<vehicle id="v_2" depart="0.00">
|
||||
<route edges="E7 E2 -E3 -E6"/>
|
||||
</vehicle>
|
||||
<vehicle id="v_3" depart="5.00">
|
||||
<route edges="E8 E4 -E2 -E7"/>
|
||||
</vehicle>
|
||||
</routes>
|
250
comp_rdp.net.xml
Normal file
250
comp_rdp.net.xml
Normal file
@ -0,0 +1,250 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- generated on 2022-05-07 15:18:19 by Eclipse SUMO netedit Version 1.12.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="/home/leo/Sketchbook/python/Traffic/comp_inter.net.xml"/>
|
||||
</input>
|
||||
|
||||
<output>
|
||||
<output-file value="/home/leo/Sketchbook/python/Traffic/comp_rdp.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.9" 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="-70.00,-100.00,400.00,180.00" origBoundary="-10000000000.00,-10000000000.00,10000000000.00,10000000000.00" projParameter="!"/>
|
||||
|
||||
<edge id=":J0_0" function="internal">
|
||||
<lane id=":J0_0_0" index="0" speed="6.55" length="7.80" shape="148.40,60.91 148.12,58.84 147.27,57.24 145.86,56.10 143.89,55.42"/>
|
||||
</edge>
|
||||
<edge id=":J0_1" function="internal">
|
||||
<lane id=":J0_1_0" index="0" speed="6.55" length="7.80" shape="156.11,55.42 154.14,56.10 152.73,57.24 151.88,58.84 151.60,60.91"/>
|
||||
</edge>
|
||||
<edge id=":J0_2" function="internal">
|
||||
<lane id=":J0_2_0" index="0" speed="13.89" length="12.32" shape="156.11,55.42 152.82,55.97 150.00,56.15 147.18,55.97 143.89,55.42"/>
|
||||
</edge>
|
||||
<edge id=":J1_0" function="internal">
|
||||
<lane id=":J1_0_0" index="0" speed="6.55" length="7.80" shape="170.91,41.60 168.84,41.88 167.24,42.73 166.10,44.14 165.42,46.11"/>
|
||||
</edge>
|
||||
<edge id=":J1_1" function="internal">
|
||||
<lane id=":J1_1_0" index="0" speed="6.55" length="7.80" shape="165.42,33.89 166.10,35.86 167.24,37.27 168.84,38.12 170.91,38.40"/>
|
||||
</edge>
|
||||
<edge id=":J1_2" function="internal">
|
||||
<lane id=":J1_2_0" index="0" speed="13.89" length="12.32" shape="165.42,33.89 165.97,37.18 166.15,40.00 165.97,42.82 165.42,46.11"/>
|
||||
</edge>
|
||||
<edge id=":J12_0" function="internal">
|
||||
<lane id=":J12_0_0" index="0" speed="6.55" length="7.80" shape="134.58,46.11 133.90,44.14 132.76,42.73 131.16,41.88 129.09,41.60"/>
|
||||
</edge>
|
||||
<edge id=":J12_1" function="internal">
|
||||
<lane id=":J12_1_0" index="0" speed="13.89" length="12.32" shape="134.58,46.11 134.03,42.82 133.85,40.00 134.03,37.18 134.58,33.89"/>
|
||||
</edge>
|
||||
<edge id=":J12_2" function="internal">
|
||||
<lane id=":J12_2_0" index="0" speed="6.55" length="7.80" shape="129.09,38.40 131.16,38.12 132.76,37.27 133.90,35.86 134.58,33.89"/>
|
||||
</edge>
|
||||
<edge id=":J2_0" function="internal">
|
||||
<lane id=":J2_0_0" index="0" speed="6.55" length="7.80" shape="151.60,19.09 151.88,21.16 152.73,22.76 154.14,23.90 156.11,24.58"/>
|
||||
</edge>
|
||||
<edge id=":J2_1" function="internal">
|
||||
<lane id=":J2_1_0" index="0" speed="6.55" length="7.80" shape="143.89,24.58 145.86,23.90 147.27,22.76 148.12,21.16 148.40,19.09"/>
|
||||
</edge>
|
||||
<edge id=":J2_2" function="internal">
|
||||
<lane id=":J2_2_0" index="0" speed="13.89" length="12.32" shape="143.89,24.58 147.18,24.03 150.00,23.85 152.82,24.03 156.11,24.58"/>
|
||||
</edge>
|
||||
<edge id=":J3_0" function="internal">
|
||||
<lane id=":J3_0_0" index="0" speed="13.89" length="0.10" shape="-60.00,41.60 -60.00,41.60"/>
|
||||
</edge>
|
||||
<edge id=":J3_1" function="internal">
|
||||
<lane id=":J3_1_0" index="0" speed="13.89" length="0.10" shape="-60.00,38.40 -60.00,38.40"/>
|
||||
</edge>
|
||||
<edge id=":J5_0" function="internal">
|
||||
<lane id=":J5_0_0" index="0" speed="13.89" length="0.10" shape="390.00,41.60 390.00,41.60"/>
|
||||
</edge>
|
||||
<edge id=":J5_1" function="internal">
|
||||
<lane id=":J5_1_0" index="0" speed="13.89" length="0.10" shape="390.00,38.40 390.00,38.40"/>
|
||||
</edge>
|
||||
<edge id=":J6_0" function="internal">
|
||||
<lane id=":J6_0_0" index="0" speed="13.89" length="0.10" shape="148.40,-90.00 148.40,-90.00"/>
|
||||
</edge>
|
||||
<edge id=":J6_1" function="internal">
|
||||
<lane id=":J6_1_0" index="0" speed="13.89" length="0.10" shape="151.60,-90.00 151.60,-90.00"/>
|
||||
</edge>
|
||||
<edge id=":J7_0" function="internal">
|
||||
<lane id=":J7_0_0" index="0" speed="13.89" length="0.10" shape="148.40,170.00 148.40,170.00"/>
|
||||
</edge>
|
||||
<edge id=":J7_1" function="internal">
|
||||
<lane id=":J7_1_0" index="0" speed="13.89" length="0.10" shape="151.60,170.00 151.60,170.00"/>
|
||||
</edge>
|
||||
|
||||
<edge id="-E10" from="J12" to="J3" priority="-1">
|
||||
<lane id="-E10_0" index="0" speed="13.89" length="189.09" shape="129.09,41.60 -60.00,41.60"/>
|
||||
</edge>
|
||||
<edge id="-E20" from="J1" to="J5" priority="-1">
|
||||
<lane id="-E20_0" index="0" speed="13.89" length="219.09" shape="170.91,38.40 390.00,38.40"/>
|
||||
</edge>
|
||||
<edge id="-E30" from="J2" to="J6" priority="-1">
|
||||
<lane id="-E30_0" index="0" speed="13.89" length="109.09" shape="148.40,19.09 148.40,-90.00"/>
|
||||
</edge>
|
||||
<edge id="-E40" from="J0" to="J7" priority="-1">
|
||||
<lane id="-E40_0" index="0" speed="13.89" length="109.09" shape="151.60,60.91 151.60,170.00"/>
|
||||
</edge>
|
||||
<edge id="-E5" from="J3" to="J8" priority="-1">
|
||||
<lane id="-E5_0" index="0" speed="13.89" length="10.00" shape="-60.00,41.60 -70.00,41.60"/>
|
||||
</edge>
|
||||
<edge id="-E6" from="J6" to="J9" priority="-1">
|
||||
<lane id="-E6_0" index="0" speed="13.89" length="10.00" shape="148.40,-90.00 148.40,-100.00"/>
|
||||
</edge>
|
||||
<edge id="-E7" from="J5" to="J10" priority="-1">
|
||||
<lane id="-E7_0" index="0" speed="13.89" length="10.00" shape="390.00,38.40 400.00,38.40"/>
|
||||
</edge>
|
||||
<edge id="-E8" from="J7" to="J11" priority="-1">
|
||||
<lane id="-E8_0" index="0" speed="13.89" length="10.00" shape="151.60,170.00 151.60,180.00"/>
|
||||
</edge>
|
||||
<edge id="E0" from="J1" to="J0" priority="-1" shape="165.00,40.00 163.86,45.74 160.61,50.61 155.74,53.86 150.00,55.00">
|
||||
<lane id="E0_0" index="0" speed="13.89" length="13.51" shape="165.42,46.11 165.37,46.36 161.76,51.76 156.36,55.37 156.11,55.42"/>
|
||||
</edge>
|
||||
<edge id="E1" from="J3" to="J12" priority="-1">
|
||||
<lane id="E1_0" index="0" speed="13.89" length="189.09" shape="-60.00,38.40 129.09,38.40"/>
|
||||
</edge>
|
||||
<edge id="E10" from="J12" to="J2" priority="-1" shape="135.00,40.00 136.14,34.26 139.39,29.39 144.26,26.14 150.00,25.00">
|
||||
<lane id="E10_0" index="0" speed="13.89" length="13.51" shape="134.58,33.89 134.63,33.64 138.24,28.24 143.64,24.63 143.89,24.58"/>
|
||||
</edge>
|
||||
<edge id="E11" from="J0" to="J12" priority="-1" shape="150.00,55.00 144.26,53.86 139.39,50.61 136.14,45.74 135.00,40.00">
|
||||
<lane id="E11_0" index="0" speed="13.89" length="13.51" shape="143.89,55.42 143.64,55.37 138.24,51.76 134.63,46.36 134.58,46.11"/>
|
||||
</edge>
|
||||
<edge id="E2" from="J5" to="J1" priority="-1">
|
||||
<lane id="E2_0" index="0" speed="13.89" length="219.09" shape="390.00,41.60 170.91,41.60"/>
|
||||
</edge>
|
||||
<edge id="E3" from="J6" to="J2" priority="-1">
|
||||
<lane id="E3_0" index="0" speed="13.89" length="109.09" shape="151.60,-90.00 151.60,19.09"/>
|
||||
</edge>
|
||||
<edge id="E4" from="J7" to="J0" priority="-1">
|
||||
<lane id="E4_0" index="0" speed="13.89" length="109.09" shape="148.40,170.00 148.40,60.91"/>
|
||||
</edge>
|
||||
<edge id="E5" from="J8" to="J3" priority="-1">
|
||||
<lane id="E5_0" index="0" speed="13.89" length="10.00" shape="-70.00,38.40 -60.00,38.40"/>
|
||||
</edge>
|
||||
<edge id="E6" from="J9" to="J6" priority="-1">
|
||||
<lane id="E6_0" index="0" speed="13.89" length="10.00" shape="151.60,-100.00 151.60,-90.00"/>
|
||||
</edge>
|
||||
<edge id="E7" from="J10" to="J5" priority="-1">
|
||||
<lane id="E7_0" index="0" speed="13.89" length="10.00" shape="400.00,41.60 390.00,41.60"/>
|
||||
</edge>
|
||||
<edge id="E8" from="J11" to="J7" priority="-1">
|
||||
<lane id="E8_0" index="0" speed="13.89" length="10.00" shape="148.40,180.00 148.40,170.00"/>
|
||||
</edge>
|
||||
<edge id="E9" from="J2" to="J1" priority="-1" shape="150.00,25.00 155.74,26.14 160.61,29.39 163.86,34.26 165.00,40.00">
|
||||
<lane id="E9_0" index="0" speed="13.89" length="13.51" shape="156.11,24.58 156.36,24.63 161.76,28.24 165.37,33.64 165.42,33.89"/>
|
||||
</edge>
|
||||
|
||||
<junction id="J0" type="priority" x="150.00" y="55.00" incLanes="E4_0 E0_0" intLanes=":J0_0_0 :J0_1_0 :J0_2_0" shape="146.80,60.91 153.20,60.91 153.56,59.02 154.01,58.29 154.63,57.71 155.44,57.27 156.42,56.99 155.79,53.83 153.83,54.92 151.91,55.56 150.00,55.78 148.09,55.56 146.17,54.92 144.21,53.83 143.58,56.99 145.37,57.71 145.99,58.29 146.44,59.02 146.71,59.89">
|
||||
<request index="0" response="100" foes="100" cont="0"/>
|
||||
<request index="1" response="000" foes="000" cont="0"/>
|
||||
<request index="2" response="000" foes="001" cont="0"/>
|
||||
</junction>
|
||||
<junction id="J1" type="priority" x="165.00" y="40.00" incLanes="E2_0 E9_0" intLanes=":J1_0_0 :J1_1_0 :J1_2_0" shape="170.91,43.20 170.91,36.80 169.02,36.44 168.29,35.99 167.71,35.37 167.27,34.56 166.99,33.58 163.83,34.21 164.92,36.17 165.56,38.09 165.78,40.00 165.56,41.91 164.92,43.83 163.83,45.79 166.99,46.42 167.71,44.63 168.29,44.01 169.02,43.56 169.89,43.29">
|
||||
<request index="0" response="100" foes="100" cont="0"/>
|
||||
<request index="1" response="000" foes="000" cont="0"/>
|
||||
<request index="2" response="000" foes="001" cont="0"/>
|
||||
</junction>
|
||||
<junction id="J10" type="dead_end" x="400.00" y="40.00" incLanes="-E7_0" intLanes="" shape="400.00,40.00 400.00,36.80 400.00,40.00"/>
|
||||
<junction id="J11" type="dead_end" x="150.00" y="180.00" incLanes="-E8_0" intLanes="" shape="150.00,180.00 153.20,180.00 150.00,180.00"/>
|
||||
<junction id="J12" type="priority" x="135.00" y="40.00" incLanes="E11_0 E1_0" intLanes=":J12_0_0 :J12_1_0 :J12_2_0" shape="133.01,46.42 136.17,45.79 135.08,43.83 134.44,41.91 134.22,40.00 134.44,38.09 135.08,36.17 136.17,34.21 133.01,33.58 132.29,35.37 131.71,35.99 130.98,36.44 130.11,36.71 129.09,36.80 129.09,43.20 130.98,43.56 131.71,44.01 132.29,44.63 132.73,45.44">
|
||||
<request index="0" response="000" foes="000" cont="0"/>
|
||||
<request index="1" response="000" foes="100" cont="0"/>
|
||||
<request index="2" response="010" foes="010" cont="0"/>
|
||||
</junction>
|
||||
<junction id="J2" type="priority" x="150.00" y="25.00" incLanes="E3_0 E10_0" intLanes=":J2_0_0 :J2_1_0 :J2_2_0" shape="155.79,26.17 156.42,23.01 154.63,22.29 154.01,21.71 153.56,20.98 153.29,20.11 153.20,19.09 146.80,19.09 146.44,20.98 145.99,21.71 145.37,22.29 144.56,22.73 143.58,23.01 144.21,26.17 146.17,25.08 148.09,24.44 150.00,24.22 151.91,24.44 153.83,25.08">
|
||||
<request index="0" response="100" foes="100" cont="0"/>
|
||||
<request index="1" response="000" foes="000" cont="0"/>
|
||||
<request index="2" response="000" foes="001" cont="0"/>
|
||||
</junction>
|
||||
<junction id="J3" type="priority" x="-60.00" y="40.00" incLanes="-E10_0 E5_0" intLanes=":J3_0_0 :J3_1_0" shape="-60.00,43.20 -60.00,36.80 -60.00,43.20">
|
||||
<request index="0" response="00" foes="00" cont="0"/>
|
||||
<request index="1" response="00" foes="00" cont="0"/>
|
||||
</junction>
|
||||
<junction id="J5" type="priority" x="390.00" y="40.00" incLanes="E7_0 -E20_0" intLanes=":J5_0_0 :J5_1_0" shape="390.00,43.20 390.00,36.80 390.00,43.20">
|
||||
<request index="0" response="00" foes="00" cont="0"/>
|
||||
<request index="1" response="00" foes="00" cont="0"/>
|
||||
</junction>
|
||||
<junction id="J6" type="priority" x="150.00" y="-90.00" incLanes="-E30_0 E6_0" intLanes=":J6_0_0 :J6_1_0" shape="146.80,-90.00 153.20,-90.00 146.80,-90.00">
|
||||
<request index="0" response="00" foes="00" cont="0"/>
|
||||
<request index="1" response="00" foes="00" cont="0"/>
|
||||
</junction>
|
||||
<junction id="J7" type="priority" x="150.00" y="170.00" incLanes="E8_0 -E40_0" intLanes=":J7_0_0 :J7_1_0" shape="146.80,170.00 153.20,170.00 146.80,170.00">
|
||||
<request index="0" response="00" foes="00" cont="0"/>
|
||||
<request index="1" response="00" foes="00" cont="0"/>
|
||||
</junction>
|
||||
<junction id="J8" type="dead_end" x="-70.00" y="40.00" incLanes="-E5_0" intLanes="" shape="-70.00,40.00 -70.00,43.20 -70.00,40.00"/>
|
||||
<junction id="J9" type="dead_end" x="150.00" y="-100.00" incLanes="-E6_0" intLanes="" shape="150.00,-100.00 146.80,-100.00 150.00,-100.00"/>
|
||||
|
||||
<connection from="-E10" to="-E5" fromLane="0" toLane="0" via=":J3_0_0" dir="s" state="M"/>
|
||||
<connection from="-E20" to="-E7" fromLane="0" toLane="0" via=":J5_1_0" dir="s" state="M"/>
|
||||
<connection from="-E30" to="-E6" fromLane="0" toLane="0" via=":J6_0_0" dir="s" state="M"/>
|
||||
<connection from="-E40" to="-E8" fromLane="0" toLane="0" via=":J7_1_0" dir="s" state="M"/>
|
||||
<connection from="E0" to="-E40" fromLane="0" toLane="0" via=":J0_1_0" dir="r" state="M"/>
|
||||
<connection from="E0" to="E11" fromLane="0" toLane="0" via=":J0_2_0" dir="s" state="M"/>
|
||||
<connection from="E1" to="E10" fromLane="0" toLane="0" via=":J12_2_0" dir="r" state="m" visibility="9.00"/>
|
||||
<connection from="E10" to="-E30" fromLane="0" toLane="0" via=":J2_1_0" dir="r" state="M"/>
|
||||
<connection from="E10" to="E9" fromLane="0" toLane="0" via=":J2_2_0" dir="s" state="M"/>
|
||||
<connection from="E11" to="-E10" fromLane="0" toLane="0" via=":J12_0_0" dir="r" state="M"/>
|
||||
<connection from="E11" to="E10" fromLane="0" toLane="0" via=":J12_1_0" dir="s" state="M"/>
|
||||
<connection from="E2" to="E0" fromLane="0" toLane="0" via=":J1_0_0" dir="r" state="m" visibility="9.00"/>
|
||||
<connection from="E3" to="E9" fromLane="0" toLane="0" via=":J2_0_0" dir="r" state="m" visibility="9.00"/>
|
||||
<connection from="E4" to="E11" fromLane="0" toLane="0" via=":J0_0_0" dir="r" state="m" visibility="9.00"/>
|
||||
<connection from="E5" to="E1" fromLane="0" toLane="0" via=":J3_1_0" dir="s" state="M"/>
|
||||
<connection from="E6" to="E3" fromLane="0" toLane="0" via=":J6_1_0" dir="s" state="M"/>
|
||||
<connection from="E7" to="E2" fromLane="0" toLane="0" via=":J5_0_0" dir="s" state="M"/>
|
||||
<connection from="E8" to="E4" fromLane="0" toLane="0" via=":J7_0_0" dir="s" state="M"/>
|
||||
<connection from="E9" to="-E20" fromLane="0" toLane="0" via=":J1_1_0" dir="r" state="M"/>
|
||||
<connection from="E9" to="E0" fromLane="0" toLane="0" via=":J1_2_0" dir="s" state="M"/>
|
||||
|
||||
<connection from=":J0_0" to="E11" fromLane="0" toLane="0" dir="r" state="M"/>
|
||||
<connection from=":J0_1" to="-E40" fromLane="0" toLane="0" dir="r" state="M"/>
|
||||
<connection from=":J0_2" to="E11" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J1_0" to="E0" fromLane="0" toLane="0" dir="r" state="M"/>
|
||||
<connection from=":J1_1" to="-E20" fromLane="0" toLane="0" dir="r" state="M"/>
|
||||
<connection from=":J1_2" to="E0" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J12_0" to="-E10" fromLane="0" toLane="0" dir="r" state="M"/>
|
||||
<connection from=":J12_1" to="E10" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J12_2" to="E10" fromLane="0" toLane="0" dir="r" state="M"/>
|
||||
<connection from=":J2_0" to="E9" fromLane="0" toLane="0" dir="r" state="M"/>
|
||||
<connection from=":J2_1" to="-E30" fromLane="0" toLane="0" dir="r" state="M"/>
|
||||
<connection from=":J2_2" to="E9" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J3_0" to="-E5" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J3_1" to="E1" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J5_0" to="E2" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J5_1" to="-E7" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J6_0" to="-E6" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J6_1" to="E3" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J7_0" to="E4" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
<connection from=":J7_1" to="-E8" fromLane="0" toLane="0" dir="s" state="M"/>
|
||||
|
||||
<roundabout nodes="J0 J1 J12 J2" edges="E0 E10 E11 E9"/>
|
||||
|
||||
</net>
|
43
comp_rdp.rou.xml
Normal file
43
comp_rdp.rou.xml
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- generated on 2022-05-07 15:18:30 by Eclipse SUMO netedit Version 1.12.0
|
||||
-->
|
||||
|
||||
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
|
||||
<flow id="f_0" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E5 E1 E10 -E30 -E6"/>
|
||||
</flow>
|
||||
<flow id="f_1" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E5 E1 E10 E9 -E20 -E7"/>
|
||||
</flow>
|
||||
<flow id="f_10" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E8 E4 E11 E10 -E30 -E6"/>
|
||||
</flow>
|
||||
<flow id="f_11" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E8 E4 E11 E10 E9 -E20 -E7"/>
|
||||
</flow>
|
||||
<flow id="f_2" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E5 E1 E10 E9 E0 -E40 -E8"/>
|
||||
</flow>
|
||||
<flow id="f_3" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E6 E3 E9 -E20 -E7"/>
|
||||
</flow>
|
||||
<flow id="f_4" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E6 E3 E9 E0 -E40 -E8"/>
|
||||
</flow>
|
||||
<flow id="f_5" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E6 E3 E9 E0 E11 -E10 -E5"/>
|
||||
</flow>
|
||||
<flow id="f_6" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E7 E2 E0 -E40 -E8"/>
|
||||
</flow>
|
||||
<flow id="f_7" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E7 E2 E0 E11 -E10 -E5"/>
|
||||
</flow>
|
||||
<flow id="f_8" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E7 E2 E0 E11 E10 -E30 -E6"/>
|
||||
</flow>
|
||||
<flow id="f_9" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<route edges="E8 E4 E11 -E10 -E5"/>
|
||||
</flow>
|
||||
</routes>
|
2
main.py
2
main.py
@ -85,7 +85,7 @@ class MainWindow(QMainWindow):
|
||||
averageTimeStopped = controller.totalStopped / controller.carsDestroyed
|
||||
speedPercentage = controller.speedPercentageTotal / controller.carsDestroyed
|
||||
newline = '\n'
|
||||
widget.setText(f"temps d'arrêt : {averageTimeStopped:.2f}s/voiture \n<vitesse/vitesse max>T : {speedPercentage:.2f} \nbacklog total : {controller.getFlowBacklog():.2f} \n{newline.join(f'{f.id} : {f.backlog(controller.t):.2f}' for f in controller.flows)}")
|
||||
widget.setText(f"temps : {controller.t} \ntemps d'arrêt : {averageTimeStopped:.2f}s/voiture \n<vitesse/vitesse max>T : {speedPercentage:.2f} \nbacklog total : {controller.getFlowBacklog():.2f} \n{newline.join(f'{f.id} : {f.backlog(controller.t):.2f}' for f in controller.flows)}")
|
||||
|
||||
@Slot(int)
|
||||
def updatePhysicsFps(self,t):
|
||||
|
@ -63,6 +63,8 @@ class mainLoop(QObject):
|
||||
def update(self):
|
||||
try:
|
||||
self.controller.update()
|
||||
if self.controller.t > 3600:
|
||||
self.stopTimer()
|
||||
except:
|
||||
(type, value, traceback) = sys.exc_info()
|
||||
print(type, value, traceback.print_tb())
|
||||
@ -86,9 +88,9 @@ class mainLoop(QObject):
|
||||
|
||||
@threadSafe
|
||||
def quickLoad(self):
|
||||
self.map.fromPath("rdpt_polytech.net.xml")
|
||||
self.map.fromPath("comp_inter.net.xml")
|
||||
self.painter.generateTransform()
|
||||
self.controller.fromPath("rdpt_polytech.rou.xml")
|
||||
self.controller.fromPath("comp_inter.rou.xml")
|
||||
self.controller.prepareRoute()
|
||||
|
||||
def updateFps(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user