<?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: pull the items from list based on label value in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589781#M85892</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Queue2 will pull items as long as it has capacity. As such the list will immediately be empty, because all items are pulled at the beginning of the simulation. The resulting task sequences are queued up in the ASRS and by default done in the order in which they were created.&lt;/P&gt;&lt;P&gt;You can either limit the capacity of the queue to 1, so it only pulls one item at a time (then move the item to a different queue upon entry). Or you alter the "Queue Strategy" of the ASRS so it finishes task sequences that involve items with a lower "Order" value first.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;/**Custom Code*/&lt;BR /&gt;TaskSequence taskSequence = param(1);
Dispatcher current = ownerobject(c);

Object item = taskSequence.tasks[2].involved1;
return -item.Order;&lt;/PRE&gt;&lt;P&gt;(The negative "Order" value is returned because the queue strategy orders in descending order.)&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/82976-pull-the-items-from-list-based-on-label-value-ques.fsm" target="_blank"&gt;pull-the-items-from-list-based-on-label-value-ques(1).fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 21 May 2024 10:04:13 GMT</pubDate>
    <dc:creator>moehlmann_fe</dc:creator>
    <dc:date>2024-05-21T10:04:13Z</dc:date>
    <item>
      <title>pull the items from list based on label value</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589776#M85887</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 24.0.0 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi flexsim,&lt;/P&gt;
 &lt;P&gt;I would like to let Queue2 pull the items from list(SlotList1).The smaller the label value ,the earlier it will be moved from Rack to Queue2.&lt;/P&gt;
 &lt;P&gt;I have pushed the label value to list on slot entry trigger.&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1716117556747.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1523986i98E1C7977DD6C969/image-size/large?v=v2&amp;amp;px=999" role="button" title="1716117556747.png" alt="1716117556747.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;And set Queue2's Pull Strategy.&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1716117885381.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1523987i870ACE37F37D7BB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="1716117885381.png" alt="1716117885381.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;But it can't work.&lt;/P&gt;
 &lt;P&gt;&lt;SPAN id="isPasted" style="color: rgb(51, 51, 51); font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;"&gt;The attachment is as follows.Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;
 &lt;P&gt;&lt;SPAN id="isPasted"&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/82918-pull-the-items-from-list-based-on-label-value-ques.fsm" target="_blank"&gt;pull the items from list based on label value_Question.fsm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sun, 19 May 2024 11:34:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589776#M85887</guid>
      <dc:creator>KANG</dc:creator>
      <dc:date>2024-05-19T11:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: pull the items from list based on label value</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589777#M85888</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/43622/kang.html" nodeid="43622"&gt;@Rykou&lt;/A&gt;, your value is an array. If you evaluate an array like a single value, only first entry gets evaluated.&lt;/DIV&gt;</description>
      <pubDate>Sun, 19 May 2024 16:21:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589777#M85888</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2024-05-19T16:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: pull the items from list based on label value</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589778#M85889</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Thanks for your reply. I've tried to use unnested the array structure and store the single value.But it seems that flexsim doesn't support the unnested function. I'm confused about is there any other possible way to do it?If so, can you help me to fix it? Thanks in advance.
&lt;/DIV&gt;</description>
      <pubDate>Mon, 20 May 2024 17:28:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589778#M85889</guid>
      <dc:creator>KANG</dc:creator>
      <dc:date>2024-05-20T17:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: pull the items from list based on label value</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589779#M85890</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;The list in your model does not contain any reference to the items themselves. It only holds information about the slots (address, content and which order the content belongs to). To pull items, it would be better to create a separate list to which you push the individual items. Pulling them ordered by the "Order" value should be straightforward then.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 May 2024 07:04:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589779#M85890</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2024-05-21T07:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: pull the items from list based on label value</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589780#M85891</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;. Thanks for your reply. I've tried to push the label(item.order) to a new list(IitemList1) dynamically &lt;SPAN id="isPasted" style="color: rgb(51, 51, 51); font-family: "&gt;and let Queue2 pull from list by label(item.order).&lt;/SPAN&gt;&lt;/P&gt;
 &lt;P id="isPasted" style="margin: 0px 0px 10px; color: rgb(51, 51, 51); font-family: "&gt;But it exists two problems.&lt;/P&gt;
 &lt;P style="margin: 0px 0px 10px; color: rgb(51, 51, 51); font-family: "&gt;&lt;A rel="nofollow noopener noreferrer" href="http://1.it/" target="_blank"&gt;1.It&lt;/A&gt; only works when all the items are on the rack at the beginning. If I set the items first enter Queue1 then move to Queue2, the logic will be invalid.&lt;/P&gt;
 &lt;P style="margin: 0px 0px 10px; color: rgb(51, 51, 51); font-family: "&gt;2.List does not display item information.&lt;/P&gt;
 &lt;P style="margin: 0px 0px 10px; color: rgb(51, 51, 51); font-family: "&gt;How can I fix the problem?&lt;/P&gt;
 &lt;P style="margin: 0px 0px 10px; color: rgb(51, 51, 51); font-family: "&gt;&lt;SPAN style="color: rgb(51, 51, 51); font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;"&gt;The attachment is as follows.&lt;/SPAN&gt;&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/82973-pull-the-items-from-list-based-on-label-value-ques.fsm" target="_blank"&gt;pull the items from list based on label value_Question.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 May 2024 09:02:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589780#M85891</guid>
      <dc:creator>KANG</dc:creator>
      <dc:date>2024-05-21T09:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: pull the items from list based on label value</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589781#M85892</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Queue2 will pull items as long as it has capacity. As such the list will immediately be empty, because all items are pulled at the beginning of the simulation. The resulting task sequences are queued up in the ASRS and by default done in the order in which they were created.&lt;/P&gt;&lt;P&gt;You can either limit the capacity of the queue to 1, so it only pulls one item at a time (then move the item to a different queue upon entry). Or you alter the "Queue Strategy" of the ASRS so it finishes task sequences that involve items with a lower "Order" value first.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;/**Custom Code*/&lt;BR /&gt;TaskSequence taskSequence = param(1);
Dispatcher current = ownerobject(c);

Object item = taskSequence.tasks[2].involved1;
return -item.Order;&lt;/PRE&gt;&lt;P&gt;(The negative "Order" value is returned because the queue strategy orders in descending order.)&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/82976-pull-the-items-from-list-based-on-label-value-ques.fsm" target="_blank"&gt;pull-the-items-from-list-based-on-label-value-ques(1).fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 May 2024 10:04:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589781#M85892</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2024-05-21T10:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: pull the items from list based on label value</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589782#M85893</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P id="isPasted"&gt;&lt;SPAN style="color: rgb(51, 51, 51); font-family: "&gt;Hi, &lt;/SPAN&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/19365/felixmh.html" nodeid="19365"&gt;@Felix Möhlmann&lt;/A&gt;&lt;SPAN style="color: rgb(51, 51, 51); font-family: "&gt;. Thanks for your reply. I realized that I can set the moving rules through the Query Strategy. &lt;/SPAN&gt;&lt;/P&gt;
 &lt;P&gt;&lt;SPAN style="color: rgb(51, 51, 51); font-family: "&gt;I would like to separate the logic of moving items between input and output, such as first input all the items to rack by random, then output items from rack to Queue2 by label(item.order) value ASC. So I prefer to &lt;SPAN style="color: rgb(51, 51, 51); font-family: "&gt;limit the capacity of the Queue2 to 1. But I found it isn't work properly.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
 &lt;P&gt;&lt;SPAN style="color: rgb(51, 51, 51); font-family: "&gt;One of the bug I found is that Items are stacked in the same slot .But &lt;/SPAN&gt;&lt;SPAN style="color: rgb(51, 51, 51); font-family: "&gt;I want each slot just can contains one item.&lt;/SPAN&gt;&lt;/P&gt;
 &lt;P&gt;&lt;SPAN style="color: rgb(51, 51, 51); font-family: "&gt;I have set the storage method in Queue1 on exit trigger.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: rgb(51, 51, 51); font-family: "&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1716309936300.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1523977i54A2CD6D53EEBCE6/image-size/large?v=v2&amp;amp;px=999" role="button" title="1716309936300.png" alt="1716309936300.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: rgb(51, 51, 51); font-family: "&gt;And I have set the MaxContent of Rack.&lt;/SPAN&gt;&lt;/P&gt;
 &lt;P&gt;&lt;SPAN style="color: rgb(51, 51, 51); font-family: "&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1716309941282.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1523979i25C3A51DBFAA06F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="1716309941282.png" alt="1716309941282.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;But it exists one of the slot contains more than one item.&lt;span class="lia-inline-image-display-wrapper" image-alt="1716310111916.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1523980iED17BE05FACA3A50/image-size/large?v=v2&amp;amp;px=999" role="button" title="1716310111916.png" alt="1716310111916.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;I think this might be one of the reason that it can't output by label(item.order) properly. But I have no idea to solve the bug.&lt;/P&gt;
 &lt;P&gt;&lt;SPAN id="isPasted" style="color: rgb(51, 51, 51); font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;The attachment is as follows.Thanks alot.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN id="isPasted"&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/83006-pull-by-label-question.fsm" target="_blank"&gt;pull by label _Question.fsm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 May 2024 16:53:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589782#M85893</guid>
      <dc:creator>KANG</dc:creator>
      <dc:date>2024-05-21T16:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: pull the items from list based on label value</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589783#M85894</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;I uploaded the wrong file. The attachment is the updated file.Thanks alot.&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/83009-pull-the-items-from-list-based-on-label-value-ques.fsm" target="_blank"&gt;pull-the-items-from-list-based-on-label-value-ques.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 May 2024 18:15:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589783#M85894</guid>
      <dc:creator>KANG</dc:creator>
      <dc:date>2024-05-21T18:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: pull the items from list based on label value</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589784#M85895</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P id="isPasted"&gt;It's important here to understand how the send/pull logic between a fixed resource and a rack works.&lt;/P&gt;&lt;P&gt;By default, a storage object (rack or floor storage) will have its "Pull" option on the Input tab in the properties activated. This means that when an fixed resource sends an item to the port that leads to the rack, this item is 'made available' for the rack to pull. Whether or not the item is actually pulled and moved to the rack is determined by the rack's "Pull Requirement". By default, this tries to assign to a slot to the item based on the rack's Slot Assignment Strategy. Only if this was successful is the item moved.&lt;/P&gt;&lt;P&gt;This means that the item will only exit the queue, firing the On Exit trigger after it has already been assigned a slot. This slot is then overwritten in the On Exit trigger. For the first 5 items this still works, because the code in the On Exit trigger can always find another valid in the rack. However for the 6th item, since it has already been assigned to a slot, there are no empty slots left and "findSlot" returns NULL. This is then set as the item's slot, essentiall removing the slot assignment. The transport still happens though because the item as pulled by the rack before all of this happened. So when the item is supposed to be unloaded to the rack, FlexSim notices that it has no slot assigned to it and uses the rack's Slot Assignment Strategy to find a slot for the item. Since this only checks if there is space, not if there are any items already in the slot, the first available slot is chosen and the item is placed into an already occupied slot.&lt;/P&gt;&lt;P&gt;Fixing this would be easiest by removing the exit trigger and altering the Slot Assignment Strategy of the rack to choose a random empty slot in the first place.&lt;/P&gt;&lt;P&gt;To stop the queue from pulling items while the ASRS is still filling up the rack, you could alter the Pull Strategy to not add a backorder when not item is found. (So the queue doesn't 'wait' for items to be available if it couldn't find one). Then, in the "On Resource Available" trigger of the ASRS, make the queue reevaluate the pull strategy by sending a message to the queue (see On Message trigger of queue) if the ASRS has no further tasks (and thus, no more input into the rack is pending).&lt;/P&gt;&lt;P&gt;Overall, you'd probably have more control by building the pull logic in Process Flow though.&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/83026-pull-items-fm.fsm" target="_blank"&gt;pull-items-fm.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 May 2024 06:49:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589784#M85895</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2024-05-22T06:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: pull the items from list based on label value</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589785#M85896</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Thank you very much for your reply with patient. I learned how the send/pull logic works. Your reply is very helpful.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 27 May 2024 16:10:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/pull-the-items-from-list-based-on-label-value/m-p/13589785#M85896</guid>
      <dc:creator>KANG</dc:creator>
      <dc:date>2024-05-27T16:10:54Z</dc:date>
    </item>
  </channel>
</rss>

