question

Lincoln Sellers avatar image
1 Like"
Lincoln Sellers asked Sam Stubbs answered

Dispatching Task Executors

I am trying to dispatch task executors in groups. I need to have them dispatched 12 at a time (in 3 different lines, with 4 per line), wait on materials to be unloaded, and brought back to the start to wait behind more task executors. Simultaneously as they are done being unloaded, I need the next set of task executors to replace whichever line of task executors finishes unloading. I have successfully made them wait until unloading was done, but am having trouble dispatching the next task executors and recycling task executors back to the dispatcher. What is the best approach to this? -- Should the task executors be put in groups, should there be an availability switch for the task executors waiting at dispatcher (and how to do this if topic is applicable), etc?

I am using Flexsim 7.5.4, so I do not believe I have access to process flow.

FlexSim 7.5.4
task executerdispatchergroups
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

·
Sam Stubbs avatar image
2 Likes"
Sam Stubbs answered

So after examining your question I think I've come with something that might work as an example for what you're doing. The way you can accomplish this is with Dispatcher objects, Labels, and some custom code. (As a side note, I would definitely encourage you to update your FlexSim to the newer versions, as you will find getting some the things done that you need in Process Flow will be much simpler.)

So first of all I set up the the model with the number of Dispatchers equal to the number of groups of Task Executers. Then I set two labels in the first Queue object: one to keep track of which Dispatcher is being called, and one to iterate through the number of operators/task executers in each group. Then I put some custom code within the "Use Transport" field in the same Queue. That looks something like this:

/**Custom Code*/
treenode item = parnode(1);
treenode current = ownerobject(c);
int port = parval(2);
int numOp = getlabel(current,"numOperators");
int disNum = getlabel(current,"dispatchNum");
if (numOp == 0) {
   numOp = 2;
   disNum++;
   if (disNum>3) {
      disNum = 1;
   }
}
numOp--;
setlabel(current,"dispatchNum",disNum);
setlabel(current,"numOperators",numOp);
return centerobject(current, getlabel(current,"dispatchNum"));
Finally I checked the Perform Batching checkbox on the Queue with the batch number equal to the number of operators coming to retrieve the items, so as to ensure that they come in groups to grab the items. (I also set the processors to be able to hold up to 3 items (equal to the number of groups) so that the groups wouldn't just all stand waiting for the processor to finish. You can look at my model here, and copy anything you need from it. Again I would strongly encourage you to get the newer versions of FlexSim. You'll find Process Flow and Lists will be able to accomplish a lot more, with a lot less custom code and managing object triggers. dispatchexample.fsm

dispatchexample.fsm (59.2 KiB)
5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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