Interrelated resources

邮差的信 提交于 2019-12-12 04:53:13

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/26553392/interrelated-resources

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!