Suppose there are two trains:
- Train 1 and Train 2 have different departure times ($t_1$ and $t_2$) and capacities ($c_1$ and $c_2$).
- There are two types of passengers, Type 1 with $d_1$ passengers and Type 2 with $d_2$ passengers.
- The total number of passengers, $d_1+d_2$, will arrive at the station independently: Type 1 passengers are going to arrive at the station at $A_{1n}=t_1-b_1+T_{1n}$ (where $b_1$ can be viewed as the buffer time) and similarly, Type 2 passengers are going to arrive at $A_{2n}=t_2-b_2+T_{2n}$. $T_{ij}$ are i.i.d. distributed and the cdf is $F$.
- After arriving, passengers will board the trains in a First-Come-First-Serve (FCFS) manner.
The problem is to determine the probability of each batch of passengers taking each train and the probability of them being late (if they arrive after the departure time) or the capacity being full and not being able to board any train.
I used to think it is a simple setting, but I soonly find the complexity is over my ability. I can only deal with the situation when the capacity is sufficiently large.
That is, when the capacity is sufficiently large,
- The probability of Type 1 passengers taking Train 1 is: $P(A_1 \leq t_1) = F(b_1)$;
- The probability of Type 2 passengers taking Train 1 is: $P(A_2 \leq t_1) = F(b_2+t_1-t_2)$;
- The probability of Type 1 passengers taking Train 2 is: $P(t_1 < A_1 \leq t_2) = F(b_1+t_2-t_1) - F(b_1)$;
- The probability of Type 2 passengers taking Train 2 is: $P(t_1 < A_2 \leq t_2) = F(b_2) - F(b_2+t_1-t_2)$;
- The probability of Type 1 passengers being late is: $P(A_1 > t_2) = 1 - F(b_1+t_2-t_1)$;
- The probability of Type 2 passengers being late is: $P(A_2 > t_2) = 1 - F(b_2)$.
But when the capacity is not that sufficient, though some passengers may arrive at the station very early (say, before $t_1$), they may not be able to board the train due to the capacity constraint in a FCFS way.