<?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: Processor only produce specific items by using &amp;quot;Query&amp;quot; in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/processor-only-produce-specific-items-by-using-quot-query-quot/m-p/13556838#M60224</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;
 Got it. Thank you !!
&lt;/DIV&gt;</description>
    <pubDate>Sat, 27 Aug 2022 14:59:05 GMT</pubDate>
    <dc:creator>fengjun0113</dc:creator>
    <dc:date>2022-08-27T14:59:05Z</dc:date>
    <item>
      <title>Processor only produce specific items by using "Query"</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/processor-only-produce-specific-items-by-using-quot-query-quot/m-p/13556832#M60218</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 16.1.2 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hello, this is a FlexSim 2016 model. In this model, there're three kind of processors and items. each processor can only produce specific items. I've made a Global Table "ItemType_Processor" to set the constraint for each processor. For example, Processor1 can only produce &lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;ItemType&lt;/SPAN&gt;1. My questions are:&lt;/P&gt;
 &lt;P&gt;1. How to use "Query" to make each processor get the constaint information in&lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt; "ItemType_Processor"?&lt;/SPAN&gt;&lt;/P&gt;
 &lt;P&gt;&lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;2. As you can see,&lt;/SPAN&gt; &lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;ItemType&lt;/SPAN&gt;1 can be produced by both Processor1 and Processor2. With this constaint, How can I push them to these two processors randomly?&lt;/P&gt;
 &lt;P&gt;&lt;A rel="nofollow" href="https://drive.google.com/file/d/1wVmJ81y33TMO_bSLrflMoyncNHAqSgtC/view?usp=sharing"&gt;https://drive.google.com/file/d/1wVmJ81y33TMO_bSLrflMoyncNHAqSgtC/view?usp=sharing&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 25 Aug 2022 08:54:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/processor-only-produce-specific-items-by-using-quot-query-quot/m-p/13556832#M60218</guid>
      <dc:creator>fengjun0113</dc:creator>
      <dc:date>2022-08-25T08:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Processor only produce specific items by using "Query"</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/processor-only-produce-specific-items-by-using-quot-query-quot/m-p/13556833#M60219</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;1. For the processors to influence which items are send to them, they have to be set to "Pull" items.&lt;/P&gt;&lt;P&gt;A "query" would be used to filter the items when pulling them off a list. If they are pulled from an upstream object this is done with the "Pull Requirement". If it evaluates to 'true' (a non-zero number), then the item can be pulled, if the result is 'false' (0) the item will not be pulled.&lt;/P&gt;&lt;P&gt;As such, to restrict the processor to items depending on the table you can use the value from the respective table cell as the pull requirement. The row is given by assigning a label to each processor denoting which row it belongs to. The column is the "ItemType" label on the item (note the offset of 1 for the column number, since the first column is the processor name)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1661420022614.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1512476i777A57A25C642BBF/image-size/large?v=v2&amp;amp;px=999" role="button" title="1661420022614.png" alt="1661420022614.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The same expression could be used to query the items when pulling off a list. By adding an expression field to the list you can then use it in the query. Note that its the same expression as above - only the reference are adjusted (&lt;EM&gt;current -&amp;gt; puller&lt;/EM&gt;, refers to the processor and &lt;EM&gt;item -&amp;gt; value&lt;/EM&gt; to the item).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1661420129766.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1512477iEF6F9CDA6784C258/image-size/large?v=v2&amp;amp;px=999" role="button" title="1661420129766.png" alt="1661420129766.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1661420239041.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1512478i7F0CA9E921D81E5D/image-size/large?v=v2&amp;amp;px=999" role="button" title="1661420239041.png" alt="1661420239041.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2. With the Pull option used as described in 1., the items would be distributed between the processors according to the constraints and enter the processor that is available first.&lt;/P&gt;&lt;P&gt;If you add the constraint to the "Send to Port" logic of the queue, the settings from 1. become redundant since the processor need not check anymore if they allowed to pull the item.&lt;/P&gt;&lt;P&gt;To do this you would have to write code that first finds all eligible port ranks and then choose one from those at random. Note that this does not work like the "First Available" logic above. An item might be send to a processor that is currently busy even if another eligible processor might be available.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1661421564579.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1512479iA25924DF3BDAF961/image-size/large?v=v2&amp;amp;px=999" role="button" title="1661421564579.png" alt="1661421564579.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For this code I changed the first column to contain the respective port numbers, so they can be used as the return value.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1661421609402.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1512480i52C93936BC1050AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="1661421609402.png" alt="1661421609402.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 25 Aug 2022 10:00:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/processor-only-produce-specific-items-by-using-quot-query-quot/m-p/13556833#M60219</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2022-08-25T10:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Processor only produce specific items by using "Query"</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/processor-only-produce-specific-items-by-using-quot-query-quot/m-p/13556834#M60220</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hello &lt;A rel="user" href="https://answers.flexsim.com/users/19365/felixmh.html" nodeid="19365"&gt;@Felix Möhlmann&lt;/A&gt;, is there any typo in your code (yellow line)?&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1661504942539.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1512482i4B1CEA3B1EA36B62/image-size/large?v=v2&amp;amp;px=999" role="button" title="1661504942539.png" alt="1661504942539.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 26 Aug 2022 09:09:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/processor-only-produce-specific-items-by-using-quot-query-quot/m-p/13556834#M60220</guid>
      <dc:creator>fengjun0113</dc:creator>
      <dc:date>2022-08-26T09:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Processor only produce specific items by using "Query"</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/processor-only-produce-specific-items-by-using-quot-query-quot/m-p/13556835#M60221</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;Your code is missing the "=" between 'queryString' and the value.&lt;/DIV&gt;</description>
      <pubDate>Fri, 26 Aug 2022 09:40:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/processor-only-produce-specific-items-by-using-quot-query-quot/m-p/13556835#M60221</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2022-08-26T09:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Processor only produce specific items by using "Query"</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/processor-only-produce-specific-items-by-using-quot-query-quot/m-p/13556836#M60222</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;1. Why it needs bracket in line 9 and lin 10?&lt;span class="lia-inline-image-display-wrapper" image-alt="1661609714952.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1512483i7DBEFD79A1426625/image-size/large?v=v2&amp;amp;px=999" role="button" title="1661609714952.png" alt="1661609714952.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;2. The minimun num in this uniform distribution would be 1. But, Processor2 doesn't produce ItemType1. &lt;span class="lia-inline-image-display-wrapper" image-alt="1661609779826.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1512484i3A18A306905BEBC7/image-size/large?v=v2&amp;amp;px=999" role="button" title="1661609779826.png" alt="1661609779826.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sat, 27 Aug 2022 14:20:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/processor-only-produce-specific-items-by-using-quot-query-quot/m-p/13556836#M60222</guid>
      <dc:creator>fengjun0113</dc:creator>
      <dc:date>2022-08-27T14:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Processor only produce specific items by using "Query"</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/processor-only-produce-specific-items-by-using-quot-query-quot/m-p/13556837#M60223</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;1. If a column name contains a free space (which the "ItemType X" columns do), it has to be enclosed in square brackets for the query to be correctly interpreted.&lt;P&gt;2. The query only returns rows that have a number &amp;gt; 0 in the respective column. So for item type 2 the first (and only) entry in the query result would be the second row of the table. The random number decides which of the eligible processors gets returned.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 27 Aug 2022 14:40:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/processor-only-produce-specific-items-by-using-quot-query-quot/m-p/13556837#M60223</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2022-08-27T14:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Processor only produce specific items by using "Query"</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/processor-only-produce-specific-items-by-using-quot-query-quot/m-p/13556838#M60224</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Got it. Thank you !!
&lt;/DIV&gt;</description>
      <pubDate>Sat, 27 Aug 2022 14:59:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/processor-only-produce-specific-items-by-using-quot-query-quot/m-p/13556838#M60224</guid>
      <dc:creator>fengjun0113</dc:creator>
      <dc:date>2022-08-27T14:59:05Z</dc:date>
    </item>
  </channel>
</rss>

