In my model I have 2 operators, 3 stations, 1 dispatcher. What code to write in the "PassTo" Field in Dispatcher, so that it can decide from which station task is coming and accordinly will dispatch the task among the operators.
In my model I have 2 operators, 3 stations, 1 dispatcher. What code to write in the "PassTo" Field in Dispatcher, so that it can decide from which station task is coming and accordinly will dispatch the task among the operators.
Hi @Titli D
The code in the PassTo field should return the dispatcheroutput port number that the operator is connected to that you want to give the task to. So the operators need to be connected to the dispatcher and then you need to somehow choose the operator based on the station that the task comes from.
If you use the default code for getting the operator to a processor, i.e. check the "Use operator(s) for process" then the station is found in the second task of the task sequence. (see the attached image below). You can access this with the gettaskinvolved command in the passTo trigger.
/**passTo code*/ treenode tasksequence = param(1); return gettaskinvolved(tasksequence, 2,1);
Hope this helps.
Hi
In my model I have 3 stations. 2 operators and 1 dispatcher. The model should work in the following way:
Operator1's main job is to move items from queue1 to station1. Operator2's main job is to move items from queue2 to station 3. Operator 2 can flex between station 2 and station 3. Now how the dispatcher will assign the operators to flex between station 2 and station 3 depending on the task? I need a code for this scenarion to write in the "Pass To" filed
Hi @Titli D
For a very easy solution you can give the operator with a direct reference e.g. with the centerport connection in the transport of queue's and the stations. Then just connect operator1 to station 1 and queue1 and operator2 to queue2 and stations 2 and 3.
For more control you might be able to use the conditional decide picklist option for passto or alternatively write code with a few if statements.
7 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved