Reputation: 21
Since I got great help with the last question and didn't find any helpful tips in the help/tutorials, I'll try again :) Simplified situation is:
Product
with parameter productID
)service
); each station has 2 machines (modelled as ResourcePool
)My idea is to record the machine status as variable/parameter (MachineStatus
). When a resource unit is seized (code executed "on seize"), then it is compared whether productID
= machineStatus
. If they are equal, then no delay, if they are different, then interrupt for a certain time. However, I have two or three problems:
MachineStatus
to a unit of ResourcePool? Especially if I have 2 machines in a resource pool and therefore separate MachineStatus?Thanks for your help!
Upvotes: 1
Views: 388
Reputation: 21
Maybe someone is interested in how I solved the problem (a little bit different from my idea):
MachineStatus
and a function "RetoolingTime"DelayTime
of my service block:MachineStatus.equals(agent.productID) ? 30 : 30 + RetoolingTime(agent.productID, RetoolingTime)
Note that 30s is my normal processing time and in case I have to retool, there is an additional retooling-time, which is calculated by the function.
To get the retooling-time I wrote the code into the function body of the function RetoolingTime
:
Upvotes: 1