question

jaehwans avatar image
0 Likes"
jaehwans asked Ben Wilson commented

How to unload to multiple destinations with seperators in roundrobin?

Hello, in the model, the combiner sends packed containers to the separators in round robin. Than, I am trying to make the Operator2 to unload to the three queues in round robin. Any help would be thankful.

20210303_How to unload to multiple destinations with seperators in roundrobin.fsm

FlexSim 21.0.2
task executerflexsim 21.0.2separatorround robinmultiple destination
· 1
5 |100000

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

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @jaehwans, was Clair A's or Jörg Vogel's answer helpful? If so, please click the red "Accept" button at the bottom of one of their answers. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·
Clair A avatar image
1 Like"
Clair A answered

Hello @jaehwan.s,

What you are looking for is actually a mix between 2 pickoptions:

  • the Default Separator option
  • the Round Robin option

By combining and adapting the code of the 2 pickoptions above, you can send the container to the 1st output port, and the content in a round robin fashion from outport port #2 to #4.

Here is the code used in the attached model 20210303-how-to-unload-to-multiple-destinations-wi.fsm:

int outputport = 0;

if(item.rank == 1){
    outputport = 1; //the container will exit through output port 1
}
else{
    //round robin from output port 2
    treenode curlabel = current.labels.assert("f_cursendport", 2);

    if (getoutput(current) == 0 && item.rank == 1)  
        current.f_cursendport = 2;  //reset round robin to 2 counter if first part

    outputport = curlabel.value;
    curlabel.value += 1;
    if (curlabel.value > current.outObjects.length)
        current.f_cursendport = 2; 
}

return outputport;

I also updated the transport reference such that the forklift (center port #1) is called when a flowitem exits through port 1 (i.e. the tote), and for all other outpout ports the operator will be called (center port #2 by default).

Hope this helps.


5 |100000

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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered jaehwans commented

The quick and easy answer is, you place a queue behind the separator, which sends the items by pick list property round robin or round robin if available. Therefore you connects the output side of the separator with two connections to the queue. If you like, you can set them queue maximum content to one. As a visual option you can hide the queue behind the separator.

· 3
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

if you don’t like the quick and easy answer you can copy the source code of round robin of a queue‘s send to port property into the separator, but you need to adjust the source code for the container item going back to the combiner.

0 Likes 0 ·
jaehwans avatar image jaehwans Joerg Vogel commented ·

Is this what you suggested?

When you mention 'sends the items by pick list property' does that mean push the items to a list?

How do I send the empty tote back to queue1 with the Transporter while the unpacked items to the downstream?
0 Likes 0 ·
1615953642116.png (234.8 KiB)
Joerg Vogel avatar image Joerg Vogel jaehwans commented ·

I spoke about two connections at the exit of the separator. One Output connection and this is the first one is going to a queue (qCombine) in front of your combiner. qCombine has got additionally an input of your source, which delivers your totes. [This flow structure is new].qCombine has got an output connection to the first input port of your combiner. This part is the process cycle for totes in system.

The separators’ second output port is connected to a queue (qRR) I spoke about in my answer. qRR distributes items in round robin strategy. The separator output property sends items in default separator Send to Port strategy.

I have adjusted my answer of two output connections to meet the new condition you have introduced in your comment, Initially both output port connections should have gone to qRR.

How to use different Taskexecuters for Transport is a picklist property in function Use Transport of Output property pane. If you need more help as an answer, then ask a new question. You haven’t described this part in your question.

0 Likes 0 ·

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.