diff --git a/Car.py b/Car.py index 8904024..126c69e 100644 --- a/Car.py +++ b/Car.py @@ -445,7 +445,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.interMinSpace + dts or (tti + leaderAtInter.T + 0.1 + marg) < ltti: + if self.distToInter > max(self.interMinSpace, self.route[nextInternalIndex].getLength()) + dts or (tti + leaderAtInter.T + 0.1 + marg) < ltti: vsecInter = min(vmax, self.v + self.a*dt) #print(self.id, "ca passe") else:# sinon on freine diff --git a/rdpt_polytech_burst_2_shortcut_2.rou.xml b/rdpt_polytech_burst_2_shortcut_2.rou.xml new file mode 100644 index 0000000..2a4c21d --- /dev/null +++ b/rdpt_polytech_burst_2_shortcut_2.rou.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rdpt_polytech_shortcut_2.net.xml b/rdpt_polytech_shortcut_2.net.xml new file mode 100644 index 0000000..696de1c --- /dev/null +++ b/rdpt_polytech_shortcut_2.net.xml @@ -0,0 +1,473 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +