27 lines
936 B
Markdown
27 lines
936 B
Markdown
|
# Thoughts
|
||
|
|
||
|
## Approach
|
||
|
|
||
|
1. write down the formulas, play with them a little
|
||
|
2. figure out how to get average and maximum customer processing (not waiting) time
|
||
|
3. figure out how to model queue length for average and maximum customer processing time
|
||
|
4. use 1, 2. and 3. to model waiting times
|
||
|
|
||
|
## Queue length
|
||
|
|
||
|
The key is creating a model for the queue length. The easiest approach is to
|
||
|
set a probability value x and say "a person appears at the bank when the
|
||
|
probability is greater or equal to x". Then the probability drops to 0
|
||
|
and increases over time until it hits x again.
|
||
|
|
||
|
Another possibility would be to generate a random number every second and
|
||
|
compare it to the current probability of a person appearing.
|
||
|
|
||
|
## Waiting time
|
||
|
|
||
|
The waiting time depends on the queue length. The maximum waiting time
|
||
|
is the time the person who came last has to wait wrt size of the max queue
|
||
|
length (times max processing time).
|
||
|
|
||
|
Average is similar.
|