I would like to know whether it is possible to control workers without import requests and brokers from a method.
I have tried this:
where available_operator is a variable holding an Operator (a Worker duplicate, I changed its name to Operator). The travel mode of the Operator_pool (WorkerPool duplicate) of the Operator is "Beam to workplace". There is no footpath.
When that line runs in the method, the Operator stays in the Operator_pool. I also created two logical user-defined attributes for the Operator, but I doubt that this matters. The Operator_pool has a yellow dot at the top, indicating that it is blocked.
The reason I can't really use a Broker and Import requests is as follows.
I need to simulate assembly part by part. Adding each part to the half-complete assembly may result in an incorrigible reject or a corrigible reject (stochastic simulation). When it is an incorrigible reject, it is removed from the simulation. When it is a corrigible reject, the last part needs to be added again. The assembly time of each new part is also stochastic. I simulate adding each part by changing the proctime of the station every time, then I use the command outIn to make the station process the very same container again.
So when I start a new assembly, it is unclear what will happen. The station ends processing the container many times. If I used Import requests, I would have to know the exact duration of the assembly, and set that as the processing time (otherwise the Worker would leave, I guess). I also would like to workers to stay when an assembly is completed, and not go away, because the next assembly is about to start. So this is really complicated. This is why I wanted to control the workers from my control methods too, but I can't. Do you have any idea how to resolve this problem?
The simplest solution I could think of is creating another image for the Workplace object, and set that, and make the Workers disappear somehow, and collect statistics manually. This way, I would not have to move the workers.
Thank you in advance for your help!
Solved! Go to Solution.
you can set the worker attribute automaticMediation to false, then the broker will not mediate this worker; you can use the entrance control of the workplaces to trigger controls (e.g. to load the worker and walk to the next station).
here you find an example:
As for our model, it can't be shared online. I guess my problem was not having a Broker in the Frame. I do not know about any possibility to convert newer models to older versions.
Hi @Steffen_B ,
Your example is very helpful. I have one question: what would be the code, if I need the worker to setup the machine for every part before the worker moves the part to next station?
As seen in the image,what i mean is that I want to control the worker by method to setup the part on station and then carry the part to station1.
With your post above, I am able to move the part between station and station1. I am not able to write a method to ask the worker to first setup the station, wait/do other task till the station finishes the processing and then cary the part to next station.
I am having this issue and so i thought that I can try to program:
Do you have any suggestioins?