<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Send a batch from a queue to other queue with roundrobin configuration in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/send-a-batch-from-a-queue-to-other-queue-with-roundrobin/m-p/13536511#M44202</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;3D Logic approach:&lt;/P&gt;&lt;P&gt;Triggers:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;On Entry:&lt;/EM&gt; you set a new label value at each item to 0. I called it "tag".&lt;/P&gt;&lt;P&gt;&lt;EM&gt;On End&lt;/EM&gt; Collecting: you set the label value tag to 1.&lt;/P&gt;&lt;P&gt;There result is all items are have label named tag and only the last item of the batch has got a value of one. The other labels of "tag" have values of zero. Now you can increment a label at the queue itself by the exiting items by there label value of "tag".&lt;/P&gt;&lt;P&gt;On Exit increment a label value. Replace item by current and use a labelname you have created at your queue,&lt;span class="lia-inline-image-display-wrapper" image-alt="increment-label.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1506574iD538044AC8A5EC1B/image-size/large?v=v2&amp;amp;px=999" role="button" title="increment-label.png" alt="increment-label.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;item.tag&lt;/EM&gt; is mostly 0, but the last item of your batch inrements the label at your queue by one.&lt;/P&gt;&lt;P&gt;Function on Flow tab in Properties window&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Send To Port&lt;/EM&gt;: you choose a picklist property &lt;EM&gt;Port By Case&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;Case Function: There you evaluate the label of your queue which gets incremented. But saddly after the fourth batch you are forced to reset the label value back to zero. You can write a conditional logic in on Exit trigger. Or it doesn't matter that the label rises on, because you use a modulus operater which does a integer division returning the rest of this division. A modulus is for example "%".&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;A sequence of values like 0,1,2,3,4,5,6,7,8,.. returns by a modulus operator to 4 : 0,1,2,3,0,1,2,3,0,...&lt;/P&gt;&lt;PRE style="margin-left: 20px;"&gt;current.batchCount%current.outObjects.length  &lt;/PRE&gt;&lt;P style="margin-left: 20px;"&gt;where &lt;CODE&gt;current.outObjects.length&lt;/CODE&gt; is equal to the number of output ports or number of receiving queues.&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="port-by-case-modulus.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1506575i16920FB072AFB110/image-size/large?v=v2&amp;amp;px=999" role="button" title="port-by-case-modulus.png" alt="port-by-case-modulus.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/41141-send-batch-round-robin-jv.fsm" target="_blank"&gt;send_batch_round_robin_JV.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 24 Jun 2021 10:09:42 GMT</pubDate>
    <dc:creator>joerg_vogel_HsH</dc:creator>
    <dc:date>2021-06-24T10:09:42Z</dc:date>
    <item>
      <title>Send a batch from a queue to other queue with roundrobin configuration</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/send-a-batch-from-a-queue-to-other-queue-with-roundrobin/m-p/13536510#M44201</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 18.0.10 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hello,&lt;BR /&gt;&lt;SPAN id="s2_2"&gt;Thank you so much for the help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN id="s2_3"&gt;They know that what I want to do is to be able to make a batch of 8 pieces to the queue and leave the 8 pieces in the next queue, that is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN id="s2_4"&gt;Collect 8 pieces of queue1 and leave the 8 pieces in queue2, then again collect 8 pieces of queue1 and leave the 8 pieces in queue3 independently if there is space in the previous queue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN id="s2_5"&gt;It is to send the batch of 8 pieces to the different queue with the round-robin configuration.&lt;/SPAN&gt;&lt;/P&gt;
 &lt;P&gt;&lt;SPAN id="s2_5"&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/41117-send-batch-to-queue-with-round-robin-2.fsm" target="_blank"&gt;send batch to queue with round robin 2.fsm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 24 Jun 2021 01:49:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/send-a-batch-from-a-queue-to-other-queue-with-roundrobin/m-p/13536510#M44201</guid>
      <dc:creator>simulaciones_dctc</dc:creator>
      <dc:date>2021-06-24T01:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Send a batch from a queue to other queue with roundrobin configuration</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/send-a-batch-from-a-queue-to-other-queue-with-roundrobin/m-p/13536511#M44202</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;3D Logic approach:&lt;/P&gt;&lt;P&gt;Triggers:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;On Entry:&lt;/EM&gt; you set a new label value at each item to 0. I called it "tag".&lt;/P&gt;&lt;P&gt;&lt;EM&gt;On End&lt;/EM&gt; Collecting: you set the label value tag to 1.&lt;/P&gt;&lt;P&gt;There result is all items are have label named tag and only the last item of the batch has got a value of one. The other labels of "tag" have values of zero. Now you can increment a label at the queue itself by the exiting items by there label value of "tag".&lt;/P&gt;&lt;P&gt;On Exit increment a label value. Replace item by current and use a labelname you have created at your queue,&lt;span class="lia-inline-image-display-wrapper" image-alt="increment-label.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1506574iD538044AC8A5EC1B/image-size/large?v=v2&amp;amp;px=999" role="button" title="increment-label.png" alt="increment-label.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;item.tag&lt;/EM&gt; is mostly 0, but the last item of your batch inrements the label at your queue by one.&lt;/P&gt;&lt;P&gt;Function on Flow tab in Properties window&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Send To Port&lt;/EM&gt;: you choose a picklist property &lt;EM&gt;Port By Case&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;Case Function: There you evaluate the label of your queue which gets incremented. But saddly after the fourth batch you are forced to reset the label value back to zero. You can write a conditional logic in on Exit trigger. Or it doesn't matter that the label rises on, because you use a modulus operater which does a integer division returning the rest of this division. A modulus is for example "%".&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;A sequence of values like 0,1,2,3,4,5,6,7,8,.. returns by a modulus operator to 4 : 0,1,2,3,0,1,2,3,0,...&lt;/P&gt;&lt;PRE style="margin-left: 20px;"&gt;current.batchCount%current.outObjects.length  &lt;/PRE&gt;&lt;P style="margin-left: 20px;"&gt;where &lt;CODE&gt;current.outObjects.length&lt;/CODE&gt; is equal to the number of output ports or number of receiving queues.&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="port-by-case-modulus.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1506575i16920FB072AFB110/image-size/large?v=v2&amp;amp;px=999" role="button" title="port-by-case-modulus.png" alt="port-by-case-modulus.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/41141-send-batch-round-robin-jv.fsm" target="_blank"&gt;send_batch_round_robin_JV.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 24 Jun 2021 10:09:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/send-a-batch-from-a-queue-to-other-queue-with-roundrobin/m-p/13536511#M44202</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2021-06-24T10:09:42Z</dc:date>
    </item>
  </channel>
</rss>

