1. Learn
  2. /
  3. Courses
  4. /
  5. Discrete Event Simulation in Python

Connected

Exercise

Manage taxi company: run model

Now that you have successfully randomized events in the previous exercise, let's apply these new concepts in the context of a discrete-event model.

A taxi company with ten taxis wants to optimize their business to maximize profit.

You know that taxis usually:

  1. Wait between one to ten minutes for new customer calls, and
  2. Take between one and ten minutes to arrive at the customer pick-up location (random duration between the given interval).

The average ride takes 20 minutes with a standard deviation of five minutes. Let's build a discrete-event model and run it for an eight-hour shift.

The time in the model is in minutes.

Instructions 1/2

undefined XP
    1
    2
  • Clock-in the time between taxi dispatch and passenger boarding, randomly generating time durations as float numbers.
  • Clock in the riding time, from passenger pick-up to drop-off.