Closed acseckin closed 5 years ago
Hi,
AFAIK, simpy does not directly support your use-case. However, you could keep a list of free carwashes and push / pop into that. Something along the lines:
carwashes = range(5)
with ... as req:
yield req
my_carwash = carwashes.pop() # get a free carwash
print(f'Driving into carwash {my_carwash}')
...
print(f'Driving out of carwash {my_carwash}')
carwashes.append(my_carwash) # return the carwash to the list of unused ones
Does that help?
Thanks. I've already done it in other ways. I wish it could be done with this library.
I want to access resource identifier.
The codeIt is designed for 2 carwash machine and multiple car order. ıt is from this link: https://simpy.readthedocs.io/en/3.0.3/examples/carwash.html gives.
here is my project
But I want to log match results like below (multiple carwash machine and multiple car order.)
How can I do this? is there a way access to resource requests identifiers
Note: below link is a similar but I want to make it in resource type
SimPy Resource of 3 where each has different characteristics
here is my project with 3 different resource