Using SimPy to simulate the refueling process of a gas station

If you own a car, visiting a gas station every other week has most likely become part of your routine: pull over next to the pump, swipe your card (or pay inside), fuel up your car, and leave.

However, if you put yourself in the shoes of a gas station owner before it is even built, a number of possible questions come to mind:

  • What is the frequency of cars pulling over to fill up?
  • How would that affect the wait time for each driver? (We do not want a driver to wait for too long as he or she might choose a competitor.)
  • Will the number of distributors be enough to satisfy demand?
  • How often will I have to call the supplier to replenish the tanks?
  • How much profit can I make?

These are, however, ...

Get Practical Data Analysis Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.