<?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: How to send items to specific output ports in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506740#M20642</link>
    <description>&lt;P&gt;Yes, that's true. You just need to go into the General tab of Queue1's properties, select Output Ports, and move Queue2 down to the last rank. Then open the Code Editor for the Send to Port (after you've changed it to Random Available Port) and replace line 10 with the following:&lt;/P&gt;
&lt;PRE&gt;for ( int index = 1; index &amp;lt;= arraysize - 1; index++) {&lt;!-- --&gt;&lt;/PRE&gt;
&lt;P&gt;The only difference is that it will now only send to the first three output ports (since we said arraysize - 1).&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jul 2016 19:56:16 GMT</pubDate>
    <dc:creator>adrian_haws</dc:creator>
    <dc:date>2016-07-29T19:56:16Z</dc:date>
    <item>
      <title>How to send items to specific output ports</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506736#M20638</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 16.1.0 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Hi, good afternoon. &lt;/P&gt;
&lt;P&gt;I'd like some help. The file attached "&lt;A href="https://answers.flexsim.com/storage/attachments/1601-samplemodel.fsm"&gt;samplemodel.fsm&lt;/A&gt;" works as follows:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1598-1.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1493893i3C39046D7218F4FB/image-size/large?v=v2&amp;amp;px=999" role="button" title="1598-1.png" alt="1598-1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;- The Queue 1 has the "Send to Port: 1" (Processor 5). &lt;/P&gt;
&lt;P&gt;- If the item stays more than 300 time units at Queue1, the item will be send to Queue2. (In order to do that, it has three Triggers working on Queue1. OnEntry, OnExit, OnMessage). &lt;/P&gt;
&lt;P&gt;What I'd like to do is to send the item to the FIRST RANDOM AVAILABLE of the 3 Processors that Queue1 has connected. &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1599-queu1.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1493892i0806FEA7DDEBFEC9/image-size/large?v=v2&amp;amp;px=999" role="button" title="1599-queu1.png" alt="1599-queu1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;What should I do in order to send the items from Queue1 randomly to a list of processors? &lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 19:11:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506736#M20638</guid>
      <dc:creator>brayan_leonardo_gil_guevara</dc:creator>
      <dc:date>2016-07-29T19:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to send items to specific output ports</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506737#M20639</link>
      <description>&lt;P&gt;There is a drop-down list by Send To Port with several options. It sounds like the best option for what you'd like to do is Random-&amp;gt;Random Available Port.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 19:44:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506737#M20639</guid>
      <dc:creator>adrian_haws</dc:creator>
      <dc:date>2016-07-29T19:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to send items to specific output ports</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506738#M20640</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/388/adrian.h.html" nodeid="388"&gt;@Adrian Haws&lt;/A&gt;, &lt;/P&gt;
&lt;P&gt;But since Queue2 is connected as an Outport to Queue1, the items will be also send to Queue2. That should only happen when the item has stayed more than 300 time units. &lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 19:46:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506738#M20640</guid>
      <dc:creator>brayan_leonardo_gil_guevara</dc:creator>
      <dc:date>2016-07-29T19:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to send items to specific output ports</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506739#M20641</link>
      <description>&lt;P&gt;I would suggest using a list where the first queue pushes to that list and the processors and the second queue pull items from that list. Here is an &lt;A href="https://answers.flexsim.com/storage/attachments/1603-samplemodel-lists.fsm"&gt;example model&lt;/A&gt; that shows this method.&lt;/P&gt;&lt;P&gt;In the Queue's Send To Port field it pushes each item to a list. &lt;/P&gt;&lt;P&gt;The processors then pull items from that list using their Pull Strategy field.&lt;/P&gt;&lt;P&gt;Queue2 also pulls from the list, but with a query of age &amp;gt; 300. I had to add a list reevaluation event to the list for the old items to be reconsidered.&lt;/P&gt;&lt;P&gt;Alternatively you could use Process Flow to control the items that time out. Here is an &lt;A href="https://answers.flexsim.com/storage/attachments/1604-samplemodel-processflow.fsm"&gt;example model&lt;/A&gt;l of that. &lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 19:52:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506739#M20641</guid>
      <dc:creator>Matthew_Gillespie</dc:creator>
      <dc:date>2016-07-29T19:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to send items to specific output ports</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506740#M20642</link>
      <description>&lt;P&gt;Yes, that's true. You just need to go into the General tab of Queue1's properties, select Output Ports, and move Queue2 down to the last rank. Then open the Code Editor for the Send to Port (after you've changed it to Random Available Port) and replace line 10 with the following:&lt;/P&gt;
&lt;PRE&gt;for ( int index = 1; index &amp;lt;= arraysize - 1; index++) {&lt;!-- --&gt;&lt;/PRE&gt;
&lt;P&gt;The only difference is that it will now only send to the first three output ports (since we said arraysize - 1).&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 19:56:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506740#M20642</guid>
      <dc:creator>adrian_haws</dc:creator>
      <dc:date>2016-07-29T19:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to send items to specific output ports</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506741#M20643</link>
      <description>&lt;P&gt;Brilliant ! I found very useful your answer. I'm running a larger model, and this "Lists" make things simpler. Thank you so much! I'll stick to it. &lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 22:56:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506741#M20643</guid>
      <dc:creator>brayan_leonardo_gil_guevara</dc:creator>
      <dc:date>2016-07-29T22:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to send items to specific output ports</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506742#M20644</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/87/matthew.g.html" nodeid="87"&gt;@Matthew Gillespie&lt;/A&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/388/adrian.h.html" nodeid="388"&gt;@Adrian Haws&lt;/A&gt; I have a quick question. &lt;/P&gt;
&lt;P&gt;I want to validate the itemtype and in the case that it has getitemtype(item) == 1&lt;STRONG&gt; &lt;U&gt;or 2&lt;/U&gt;&lt;/STRONG&gt; I want it to go to certain ports. It is working when I state getitemtype(item) == 1 but how do I add to validate for 2 as well?&lt;/P&gt;
&lt;P&gt;Do I use commas, or, what do I do to validate the itemtype for both 1 or 2?&lt;/P&gt;
&lt;P&gt;Thank you for your help!&lt;/P&gt;
&lt;P&gt;Edward Ellis&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2016 13:10:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506742#M20644</guid>
      <dc:creator>edward_ellis</dc:creator>
      <dc:date>2016-10-26T13:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to send items to specific output ports</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506743#M20645</link>
      <description>&lt;P&gt;Edward, &lt;/P&gt;&lt;P&gt;I would suggest asking this as a new question. Your question seems related to the title of the question, but I don't see how it is related to the specifics of the original question. This question has already been marked as answered, and since we prioritize answering questions that haven't been marked as answered yet, you'll be much more likely to get a prompt response. Furthermore, you've asked your new question by adding a new answer to this question, so it doesn't really look like a question.&lt;/P&gt;&lt;P&gt;If in your new question you want to reference this question, you can always provide a link to it and explain how your question is similar or different.&lt;/P&gt;&lt;P&gt;For your reference, here is our page about the &lt;A href="https://answers.flexsim.com/articles/22192/best-practices-for-using-this-answers-site.html"&gt;best practices for using this site.&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Welcome to answers!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2016 17:46:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506743#M20645</guid>
      <dc:creator>Matthew_Gillespie</dc:creator>
      <dc:date>2016-10-26T17:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to send items to specific output ports</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506744#M20646</link>
      <description>&lt;P&gt;@Edward Ellis I reposted this question here, as Matthew mentioned.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Oct 2016 01:34:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-send-items-to-specific-output-ports/m-p/13506744#M20646</guid>
      <dc:creator>adrian_haws</dc:creator>
      <dc:date>2016-10-30T01:34:26Z</dc:date>
    </item>
  </channel>
</rss>

