How should I model traffic flow given this specific scenario

41 Views Asked by At

I would like to have some advice on the general approaches to this specific traffic flow scenario which I am creating a model on.

enter image description here

This is my school's parking lot, and there is a gate at which students get dropped off (so cars stop at those locations for a few seconds). In the image, $c_1, c_2... c_9$ represents cars.I am assuming that the parking lot at most can have 9 cars in the traffic. I am also assuming that each car is traveling at a constant velocity $v$, the length of each car is a constant $s$, the time in which each cars stop is 5 seconds at the gate.

First, I can find parametric equations that model the red shape (the shape of the route which the cars follow) $f(x)$.

enter image description here

I can then find distance between each car through

$$\int_{c_n}^{c_{n+1}}\sqrt{1+[f'(x)]^2}dx$$

After this, I was thinking that I can derive car accelerations but I am not sure how I should systematically approach this problem.

Ultimately, I want to create an animation in code to model the car movements. Should I model each car movement individually? How should I create a general model that models this scenario? Any advice would be appreciated.