Closed peterlai1 closed 1 year ago
If you want to commit/push the two small changes (method name and type hinting) we can wrap this one up.
If you want to commit/push the two small changes (method name and type hinting) we can wrap this one up.
Renamed to can_accept_agent()
As per #58
Additional changes:
SpurRequest
class as well that inherits SimPy'sRequest
class; this custom class also takes in the agent making the request, so that in the_do_put()
method ofSpurResource
, the associated component'scheck_usage_eligibility()
method could be called with the specific agent.accept_agent()
method is now called directly within the_do_put()
method, such that if the request is successful, the agent is added into both the resource's list of users and also the component's own data structures as well; this synchronized update eliminates event ordering issues arising from concurrency.release_agent()
is now invoked in the main tour traversal loop of theTrain
class, instead of being part of thetransfer_to()
method.