<?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: Queue logic in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524903#M34993</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;Can you upload your current model and say at what model time you observe this? It's difficult to say what might be going wrong from just your description.&lt;/DIV&gt;</description>
    <pubDate>Wed, 12 Jan 2022 11:05:33 GMT</pubDate>
    <dc:creator>moehlmann_fe</dc:creator>
    <dc:date>2022-01-12T11:05:33Z</dc:date>
    <item>
      <title>Queue logic</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524898#M34988</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 20.1.3 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi all,&lt;/P&gt;
 &lt;P style="margin: 0px 0px 10px; color: rgb(51, 51, 51); font-family: ;"&gt;FYI, the red and green item will go through 3 phases: green processor -&amp;gt; pink processor -&amp;gt; yellow processor. At most of the "out queues" (blue), the priority of the port connection is always the "in queue" within the same tower. If no queues are available, the robots will send the item to "BF for PMIC" queue.&lt;/P&gt;
 &lt;P style="margin: 0px 0px 10px; color: rgb(51, 51, 51); font-family: ;"&gt;The blue item will go through only 2 phases: green processor -&amp;gt; yellow processor. If no "in queues" are available, send the item to "BF for RF" queue.&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;My current model right now is sending first available for the el and pmic out queues ( see the code at those queues). I want to modify code at those out queues to be sent to the shortest queues if available queue but I am not sure how. Right now I am just doing the port rankings based on distance and I am not sure if it is also performing the same way as the shortest queue if available.&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/47402-finalised-current-state-model.fsm" target="_blank"&gt;Finalised Current state model.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 31 Dec 2021 13:15:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524898#M34988</guid>
      <dc:creator>xinyan_chua188</dc:creator>
      <dc:date>2021-12-31T13:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Queue logic</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524899#M34989</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;There is a picklist option in Send To Port function in 3D property pane called &lt;EM&gt;shortest queue If available&lt;/EM&gt;. If you select it, you can open the source code editor over the „parchment roll“ icon. Then you can see, how previously developer has solved this problem.&lt;/DIV&gt;</description>
      <pubDate>Sun, 02 Jan 2022 12:07:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524899#M34989</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2022-01-02T12:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Queue logic</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524900#M34990</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;"Shortest Queue" sends the item to the queue with the least currently in it. Since all of your queues have a maximum capacity of 1 this setting wouldn't actually do anything, since the queues with an item in them aren't available anyway.&lt;/P&gt;&lt;P&gt;To send the items to the closest queue (by distance) ordering the ranks of the connections should be enough to achieve that with the current logic.&lt;/P&gt;&lt;P&gt;If the positions of the queues might change often, you can use code like the following to send to the closest available regardless of ranking.&lt;/P&gt;&lt;PRE&gt;int bestindex = 0;
double closest_dist = 999999;
for(int index = 1; index &amp;lt;= current.outObjects.length; index++)
{
    if(opavailable(current, index))
    {
        Vec3 dist_vec = current.outObjects[index].getLocation(0.5, 0.5, 0) - current.getLocation(0.5, 0.5, 0);
        double dist = dist_vec.magnitude;
        if(dist &amp;lt; closest_dist)
        {
            closest_dist = dist;
            bestindex = index;
        }
    }
}

// Return closest available queue
return bestindex;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 03 Jan 2022 10:15:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524900#M34990</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2022-01-03T10:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Queue logic</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524901#M34991</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/32074/chuax2.html" nodeid="32074"&gt;@Chua X2&lt;/A&gt;, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 06 Jan 2022 17:41:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524901#M34991</guid>
      <dc:creator>ryan_c10</dc:creator>
      <dc:date>2022-01-06T17:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Queue logic</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524902#M34992</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/19365/felixmh.html" nodeid="19365"&gt;@Felix Möhlmann&lt;/A&gt; , thank you! I also noticed that despite ranking them the nearest distance, the robots placed the flow items at the furthest input queue but second pick, it went to the nearest queue. Is this a flexsim bug?&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Jan 2022 10:15:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524902#M34992</guid>
      <dc:creator>xinyan_chua188</dc:creator>
      <dc:date>2022-01-12T10:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Queue logic</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524903#M34993</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;Can you upload your current model and say at what model time you observe this? It's difficult to say what might be going wrong from just your description.&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Jan 2022 11:05:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524903#M34993</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2022-01-12T11:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Queue logic</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524904#M34994</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/19365/felixmh.html" nodeid="19365"&gt;@Felix Möhlmann&lt;/A&gt; , as mentioned above, I did port rankings by nearest distance to make the closest queue if available logic. At 173s, this is the first time when both robots will pick the flow items at the input station queue and place the flow items on the input queues in front of the EL processor but they went for the furthest queue. After that, they went for the nearest queue which is correct. Why did the first time both robots go for the furthest queue?&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/47683-current-state-model-fix-max.fsm" target="_blank"&gt;Current state model - fix max.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Jan 2022 15:05:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524904#M34994</guid>
      <dc:creator>xinyan_chua188</dc:creator>
      <dc:date>2022-01-12T15:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Queue logic</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524905#M34995</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Each item the robots pick up at that point have their own task sequence. Whether or not a task executer can "acquire" mutiple task sequences at the same time is determined by the "Break To" setting. For example, setting it to "Same Load Station" would mean, after loading the first item, only task sequences that originate from the same object could be assigned to the robot. &lt;/P&gt;&lt;P&gt;Each task sequence that is acquired that way will move in front of the previous sequence so the robot first picks up all items, then delivers them. This has the side effect, that the items are unloaded in the opposite order they are loaded in. The item that is loaded first is indeed unloaded at the nearest queue, it just happens as the last action. &lt;/P&gt;&lt;P&gt;Other than the first unload happening slightly later, this shouldn't have a large effect. The total time for all deliveries should be the same either way. I also don't know of a good way one might reverse the unloading order in this case.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Jan 2022 17:21:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524905#M34995</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2022-01-12T17:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Queue logic</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524906#M34996</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/32074/chuax2.html" nodeid="32074"&gt;@Chua X2&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;In the future, please write any replies to answers as comments instead of separate answers. That helps to keep things organized. Please see &lt;A href="https://answers.flexsim.com/articles/22192/best-practices-for-using-this-answers-site.html"&gt;Best practices for using this Answers site - FlexSim Community&lt;/A&gt; for more details. Thanks!&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Jan 2022 21:04:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524906#M34996</guid>
      <dc:creator>ryan_c10</dc:creator>
      <dc:date>2022-01-12T21:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Queue logic</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524907#M34997</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Hi 
 &lt;A rel="user" href="https://answers.flexsim.com/users/19365/felixmh.html" nodeid="19365"&gt;@Felix Möhlmann&lt;/A&gt; the model works well now. thank you so much for the help !
&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Jan 2022 06:25:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524907#M34997</guid>
      <dc:creator>xinyan_chua188</dc:creator>
      <dc:date>2022-01-24T06:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Queue logic</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524908#M34998</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;That's great to hear! Always happy to help.&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Jan 2022 07:27:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/queue-logic/m-p/13524908#M34998</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2022-01-24T07:27:52Z</dc:date>
    </item>
  </channel>
</rss>

