diff --git a/Car.py b/Car.py index 9e38d47..3447cc8 100644 --- a/Car.py +++ b/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 diff --git a/rdpt_polytech_burst.rou.xml b/rdpt_polytech_burst.rou.xml index c20d5e8..5708022 100644 --- a/rdpt_polytech_burst.rou.xml +++ b/rdpt_polytech_burst.rou.xml @@ -1,40 +1,52 @@ - - - + + - - + + - - + + + + + + + + + + + + + + diff --git a/rdpt_polytech_burst_2.rou.xml b/rdpt_polytech_burst_2.rou.xml new file mode 100644 index 0000000..97f34a7 --- /dev/null +++ b/rdpt_polytech_burst_2.rou.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +