0

I am modelling a train station(using simpy, with python 2.7) where there are some incoming routes, some outgoing routes and some platforms. Now, when one of these resources is occupied, I can't assign a train to certain other resources.

Now when a train engages a route - i.e. traverses it - some other routes in the stations area become unusable for some time. If I were to model a route as a resource, then a request yielded at that resource will affect/engage other resources as well.

Is there some way of modelling resources, such that engagement of one resource_A puts resource_B, resource_C out of action for some predetermined amount of time?

Aseem Awad

Aseem Awad
  • 173
  • 1
  • 9
  • Let me clarify this a little bit more. You have a set of resources. The event of a train engaging a resource means that the resource will be occupied for the traversal_time of the train. Now while yielding the request for that resource we need to check whether other resources are engaged or not. – Aseem Awad Oct 26 '14 at 12:12
  • Thanks, Aseem. Instead of signing your post, you can change your display name from user14916 to be your name or your nickname. – M. K. Hunter Nov 08 '14 at 16:39

1 Answers1

0

I guess you can just request the other resources (B and C; maybe using preemption) once you get resource A and release all three resources once you are done with A.

Stefan Scherfke
  • 3,012
  • 1
  • 19
  • 28
  • Thank you. Nice to get a response from Stefan himself! The preemption option doesn't really work for me as when a resource is being used, i.e. a train is traversing a track-section, preemption doesn't make sense. – Aseem Awad Dec 05 '14 at 08:14