question

Titli D avatar image
0 Likes"
Titli D asked Axel Kohonen edited

How Dispatcher decides which task to assign which operator ?

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.

FlexSim (other)
FlexSim (other - please specify)
operatorsdispatchertaskassignment
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Axel Kohonen avatar image
1 Like"
Axel Kohonen answered dg commented

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.


· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Titli D avatar image Titli D commented ·

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

0 Likes 0 ·
Axel Kohonen avatar image Axel Kohonen commented ·

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.

0 Likes 0 ·