2nd mesures+jtencule si je suis deja inséré
This commit is contained in:
parent
c61c92b3b0
commit
e8bb5ee157
4
Car.py
4
Car.py
@ -55,7 +55,7 @@ class Car():
|
||||
self.v=0
|
||||
self.a=10
|
||||
self.b=20
|
||||
self.minSpace=20
|
||||
self.minSpace=10
|
||||
self.leaderBefore=False
|
||||
self.distToInter=0
|
||||
self.timeStopped=0
|
||||
@ -421,7 +421,7 @@ class Car():
|
||||
# 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
|
||||
#print(tti, leader.T, marg, ltti)
|
||||
if self.distToInter > self.minSpace + dts or (tti + leader.T + marg) < ltti:
|
||||
if self.distToInter > self.minSpace + dts or self.distToInter < 5 or (tti + leader.T + marg) < ltti:
|
||||
self.v = min(vmax, self.v + self.a*dt)
|
||||
#print(self.id, "ca passe")
|
||||
else:# sinon on freine
|
||||
|
@ -1,40 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- generated on 2022-05-09 15:36:56 by Eclipse SUMO netedit Version 1.12.0
|
||||
<!-- generated on 2022-05-10 10:57:52 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">
|
||||
<param key="burstInterval" value="300"/>
|
||||
<param key="burstTime" value="60"/>
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="20"/>
|
||||
<route edges="E2 30807871 26745293#0 318654808 941887916 600325951#0 600325949 600325948 143886851#0 26745142 E3"/>
|
||||
</flow>
|
||||
<flow id="f_1" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<param key="burstInterval" value="300"/>
|
||||
<param key="burstTime" value="60"/>
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="20"/>
|
||||
<route edges="E2 30807871 26745293#0 318654808 941887917#0 -143879980 -E1"/>
|
||||
</flow>
|
||||
<flow id="f_2" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<param key="burstInterval" value="300"/>
|
||||
<param key="burstTime" value="60"/>
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="20"/>
|
||||
<route edges="E2 30807871 26745293#0 318654808 941887916 600325951#0 143879989#0 318654806#0 -E0"/>
|
||||
</flow>
|
||||
<flow id="f_3" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="3"/>
|
||||
<route edges="E0 -318654806#1 318654807#0 600325948 143886851#0 26745142 E3"/>
|
||||
</flow>
|
||||
<flow id="f_5" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="3"/>
|
||||
<route edges="E0 -318654806#1 318654807#0 600325948 143886851#0 301625138 -30807871 -E2"/>
|
||||
</flow>
|
||||
<flow id="f_6" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="3"/>
|
||||
<route edges="E0 -318654806#1 318654807#0 600325948 600325946 318654808 941887917#0 -143879980 -E1"/>
|
||||
</flow>
|
||||
<flow id="f_7" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="7"/>
|
||||
<route edges="E1 143879980 941887918#0 600325951#0 143879989#0 318654806#0 -E0"/>
|
||||
</flow>
|
||||
<flow id="f_8" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="7"/>
|
||||
<route edges="E1 143879980 941887918#0 600325951#0 600325949 600325948 143886851#0 26745142 E3"/>
|
||||
</flow>
|
||||
<flow id="f_9" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="7"/>
|
||||
<route edges="E1 143879980 941887918#0 600325951#0 600325949 600325948 143886851#0 301625138 -30807871 -E2"/>
|
||||
</flow>
|
||||
</routes>
|
||||
|
52
rdpt_polytech_burst_2.rou.xml
Normal file
52
rdpt_polytech_burst_2.rou.xml
Normal file
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- generated on 2022-05-10 11:33:54 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">
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="9"/>
|
||||
<route edges="E2 30807871 26745293#0 318654808 941887916 600325951#0 600325949 600325948 143886851#0 26745142 E3"/>
|
||||
</flow>
|
||||
<flow id="f_1" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="9"/>
|
||||
<route edges="E2 30807871 26745293#0 318654808 941887917#0 -143879980 -E1"/>
|
||||
</flow>
|
||||
<flow id="f_2" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="9"/>
|
||||
<route edges="E2 30807871 26745293#0 318654808 941887916 600325951#0 143879989#0 318654806#0 -E0"/>
|
||||
</flow>
|
||||
<flow id="f_3" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="7"/>
|
||||
<route edges="E0 -318654806#1 318654807#0 600325948 143886851#0 26745142 E3"/>
|
||||
</flow>
|
||||
<flow id="f_5" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="7"/>
|
||||
<route edges="E0 -318654806#1 318654807#0 600325948 143886851#0 301625138 -30807871 -E2"/>
|
||||
</flow>
|
||||
<flow id="f_6" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="7"/>
|
||||
<route edges="E0 -318654806#1 318654807#0 600325948 600325946 318654808 941887917#0 -143879980 -E1"/>
|
||||
</flow>
|
||||
<flow id="f_7" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="15"/>
|
||||
<route edges="E1 143879980 941887918#0 600325951#0 143879989#0 318654806#0 -E0"/>
|
||||
</flow>
|
||||
<flow id="f_8" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="15"/>
|
||||
<route edges="E1 143879980 941887918#0 600325951#0 600325949 600325948 143886851#0 26745142 E3"/>
|
||||
</flow>
|
||||
<flow id="f_9" begin="0.00" end="3600.00" vehsPerHour="1800.00">
|
||||
<param key="burstInterval" value="30"/>
|
||||
<param key="burstTime" value="15"/>
|
||||
<route edges="E1 143879980 941887918#0 600325951#0 600325949 600325948 143886851#0 301625138 -30807871 -E2"/>
|
||||
</flow>
|
||||
</routes>
|
Loading…
x
Reference in New Issue
Block a user