We like to determine the wait times based on car arrival and charging rate, and display a simulation for demonstration purposes.
The motivation to design this simulation is obtained from a statistical consulting project involving the operation of electric vehicles at UBC. The report can be found here.
As cars enter the station, they are placed at one of the charging locations shown as black rectangles in the canvas. If the charging locations are all full, incoming cars begin to form a queue. Cars are removed when charging is complete.
The number of cars that arrive is poisson distributed with paramter $\lambda$ (average number of cars per hour). In other words, $$\mathbf{Cars\ Arrive}\sim\mathcal{P}(\lambda).$$
The time a car charges per station is exponentially distributed with parameter $\mu$ (Number of cars charged per hour for a single station). In other words, $$\mathbf{Time\ Charge}\sim\mathsf{Exp}(\mu).$$
The average wait time in the queue can be computed with $\rho=\frac{\lambda}{\mu}$ and $s=10$ charging stations as follows: $$\mathbf{Wait\ Time\ =\ }\left[\left(\frac{1}{\mu(s-\rho)}\right)\left(\frac{\rho^{s}}{s!}\right)\left(\frac{s}{s-\rho}\right)\middle/\left(\frac{s\rho^{s}}{(s!)(s-\rho)}+\sum_{i=0}^{s-1}\frac{\rho^{i}}{i!}\right) \right] $$ Variation of the equation can be found in Wikipedia's page on M/M/c. Some algebra manipulation is required.
The following are interaction plots of wait times based on number of stations, car arrival and charging rates. The max wait time is defaulted to 180 minutes.
For example, if the charging rate is 1.25 cars per hour and number of cars arriving is 6 per hour as shown as the orange line in the top right graph, we would want the number of stations to be roughly greater than 6-8 to ensure the wait times are not too long.