I have been trying to make this simulation using Simpy, but I just can't figure out how it works. If you have any tips on how to learn it from example code (starting at the bottom and going up through functions, or the other way around?), or any good sources that would already be of great help.
What I want to simulate: A bike rental service with S rental stations and T bikes at t=0. Customers arrivals and rental times are exponentially distributed. When a bike is rented, there is a given probability to go to any of the rental stations. For example, with S=2, the probabilities are [[0.9,0.1],[0.5,0.5]].
I tried to do it without simpy, but I don't know how to manage the number of bikes at the stations and manage arrivals while rentals are happening.
Any help is more than welcome as I am starting to get kind of desperate. Thank you!
Here is one way to do it