stall adv
This commit is contained in:
parent
8434ba6d29
commit
a820bd99e3
5
Car.py
5
Car.py
@ -380,7 +380,7 @@ class Car():
|
||||
# alors on accelere pour s'inserer
|
||||
if self.distToInter > self.minSpace + dts or (tti + leader.T + marg) < ltti:
|
||||
self.v = min(vmax, self.v + self.a*dt)
|
||||
print(self.id, "ca passe")
|
||||
#print(self.id, "ca passe")
|
||||
else:# sinon on freine
|
||||
self.v = max(0, self.v - self.b*dt)
|
||||
self.updateGraph(self.v, vmax, 0)
|
||||
@ -406,6 +406,9 @@ class Car():
|
||||
if self.controller.t < self.startTime:
|
||||
return
|
||||
|
||||
if self.v < 1 and self.getCurrentEdge().isSpecial():
|
||||
print(f"{self.id} stalled where he souldn't have")
|
||||
|
||||
self.leader=self.getLeader(100)
|
||||
|
||||
self.conduiteKrauss(self.vmax,self.leader,dt)
|
||||
|
Loading…
x
Reference in New Issue
Block a user