Jump to content

Worker Problem


Recommended Posts

I modeled a brewery where customers enter, get "combined" with a beer (with a combiner) and go on...there is also a worker serving them (by bringing the beer to the costumers from another server connected to a source).

I would like to know what I could do to make the worker only go to the combiner if there's at least one customer there (selection condition doesn't work because if the value is false once, it'll always be false) and if there isn't, he would just stand by the server.

Link to comment
Share on other sites

You could use the add-on process for the worker named Evaluating Seize Request that would check the size of the queue where the customers are waiting (and I assume this is where they are requesting the worker to bring beer) - and if the size of the queue is not at least 2, then refuse the request (assign the 'Token.ReturnValue' to 'False' or '0'). The below info was taken from the help on resources (which is similar for workers/vehicles used in a seize manner as well).


Evaluating Seize Request Add On Process


In the Resource object from the standard object library, there is an Add On Process called Evaluating Seize Request. This Add On Process is executed when the object is evaluating whether to accept or reject the capacity allocation request. In the executed decision process, the user should assign a value of less than or equal to '0' to the executing token’s Return Value state (Token.ReturnValue) to indicate that the allocation attempt is rejected. The value '1' indicates that the allocation attempt was successful.

Link to comment
Share on other sites

you can also monitor the queue lenght by using a monitor element. If there exist one or more customer in the queue you can trigger a process (you should define a new process) where you use a seize step to seize the worker. For more about the monitor element you should refer to simbits...

Link to comment
Share on other sites

×
×
  • Create New...