<?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 can I query the slots of a storage system? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-query-the-slots-of-a-storage-system/m-p/13514101#M26482</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/23965/victoriam2.html" nodeid="23965"&gt;@victoria.m2&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Go ahead and post this as a separate question. That will help us keep this forum more organized and help you faster.&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 22 Jul 2020 15:30:21 GMT</pubDate>
    <dc:creator>benjamin_w2</dc:creator>
    <dc:date>2020-07-22T15:30:21Z</dc:date>
    <item>
      <title>How can I query the slots of a storage system?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-query-the-slots-of-a-storage-system/m-p/13514095#M26476</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 19.2.4 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;
	I am looking for a string which find a slot availble ordered by&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;level,&lt;/LI&gt;&lt;LI&gt;bay,&lt;/LI&gt;&lt;LI&gt;slot or&lt;/LI&gt;&lt;LI&gt;not populated in a combined query or each attribute alone.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;
	Additional I thought it would be easier to get access to some basic data like maximum number of slots or available slots in the storage system. &lt;/P&gt;&lt;P&gt;
	But I didn't find such data. All I achieved, was to query the rack structure to put all slot nodes into a global list. Then I evaluated the value in the list to get additional data for level, bay, slot and dynamic current content. I queried this global list by a standard string and casted the pulled value into the Slot Assignment Strategy in the Rack object to realize placing the items by level &amp;gt; slot &amp;gt; bay into the rack. Attached is an example model.&lt;/P&gt;&lt;P&gt;
	How can I achieve such strategie without nested for-loops or my approach with a global list inside the Slot Assignment Strategy?&lt;/P&gt;&lt;P&gt;
	Many thanks! Regards Jörg&lt;/P&gt;&lt;P&gt;&lt;A id="24356" href="https://answers.flexsim.com/storage/attachments/24356-list-query-warhouse-rack.fsm"&gt;list-query-warhouse-rack.fsm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 15:50:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-query-the-slots-of-a-storage-system/m-p/13514095#M26476</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2019-12-19T15:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: How can I query the slots of a storage system?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-query-the-slots-of-a-storage-system/m-p/13514096#M26477</link>
      <description>&lt;PRE&gt;Storage.system.findSlot("WHERE slot.slotItems.length &amp;lt; 1 ORDER BY slot.levelID ASC")&lt;/PRE&gt;
&lt;P&gt;This will find an empty slot, ordered by level number.&lt;/P&gt;
&lt;PRE&gt;Storage.system.findSlot("WHERE slot.hasSpace($1) ORDER BY slot.levelID ASC", 0, item)&lt;/PRE&gt;
&lt;P&gt;This will find a slot that has space to place a specific item, ordered by level number.&lt;/P&gt;
&lt;P&gt;I think all of the things you want to do can be done with the Storage.system.findSlot() method, without for loops or Table.query(). Also, although technically I don't think you need a list at all, even if you did, I would suggest not using tree-based traversals for access, but to use the Storage API. For example, the bay number can be accessed with the expression &lt;A rel="noopener noreferrer" href="http://value.as" target="_blank"&gt;value.as&lt;/A&gt;(Storage.Slot).bayID. The level can be accessed with the expression &lt;A rel="noopener noreferrer" href="http://value.as" target="_blank"&gt;value.as&lt;/A&gt;(Storage.Slot).levelID. The number of items in the slot can be accessed with &lt;A rel="noopener noreferrer" href="http://value.as" target="_blank"&gt;value.as&lt;/A&gt;(Storage.Slot).slotItems.length.&lt;/P&gt;
&lt;P&gt;See also &lt;A href="https://answers.flexsim.com/questions/76633/how-to-use-sql-to-find-an-available-rack-slot-with.html"&gt;this question&lt;/A&gt;., and the &lt;A href="https://docs.flexsim.com/en/20.0/Reference/CodingInFlexSim/FlexScriptAPIReference/Warehousing/Storage.Slot.html"&gt;user manual&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 17:56:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-query-the-slots-of-a-storage-system/m-p/13514096#M26477</guid>
      <dc:creator>anthony_johnsonT83CM</dc:creator>
      <dc:date>2019-12-19T17:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: How can I query the slots of a storage system?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-query-the-slots-of-a-storage-system/m-p/13514097#M26478</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/207/anthony.j.html" nodeid="207"&gt;@anthony.johnson&lt;/A&gt;, thank you, I get it now. I oversaw the important parameter “slot” in the manual and its importance inside of SQL clauses. “findSlot” method works in my source code. I was just confused by the nested “for-loop” structure source code in the Assign Slot Strategy in rack objects, because a findSlot method looks so more elegant to me. &lt;BR /&gt;Currently I am struggling with the picklist warehousing options, but that will be perhaps another question.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Dec 2019 06:51:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-query-the-slots-of-a-storage-system/m-p/13514097#M26478</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2019-12-21T06:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I query the slots of a storage system?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-query-the-slots-of-a-storage-system/m-p/13514098#M26479</link>
      <description>&lt;P&gt;Hi Vogel,&lt;/P&gt;
&lt;P style="margin-left: 20px;"&gt;i got inspiration from your answers. I got another doubt, how to query if I want to find the least item type in a storage system? Could you please help? Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 06:09:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-query-the-slots-of-a-storage-system/m-p/13514098#M26479</guid>
      <dc:creator>kyle_y</dc:creator>
      <dc:date>2020-03-06T06:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: How can I query the slots of a storage system?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-query-the-slots-of-a-storage-system/m-p/13514099#M26480</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/9994/kyley.html" nodeid="9994"&gt;@Kyle Y&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please ask a new question. so we can help other users. Thank you! &lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 14:07:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-query-the-slots-of-a-storage-system/m-p/13514099#M26480</guid>
      <dc:creator>braydn_t</dc:creator>
      <dc:date>2020-03-06T14:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: How can I query the slots of a storage system?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-query-the-slots-of-a-storage-system/m-p/13514100#M26481</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;I can't get it to work if I have more than one rack in the model!&lt;/P&gt;
 &lt;P&gt;Can you help me?&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/temp/31201-tworacks.fsm" target="_blank"&gt;twoRacks.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 Jul 2020 15:04:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-query-the-slots-of-a-storage-system/m-p/13514100#M26481</guid>
      <dc:creator>victoria_m2</dc:creator>
      <dc:date>2020-07-22T15:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: How can I query the slots of a storage system?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-query-the-slots-of-a-storage-system/m-p/13514101#M26482</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/23965/victoriam2.html" nodeid="23965"&gt;@victoria.m2&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Go ahead and post this as a separate question. That will help us keep this forum more organized and help you faster.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 Jul 2020 15:30:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-query-the-slots-of-a-storage-system/m-p/13514101#M26482</guid>
      <dc:creator>benjamin_w2</dc:creator>
      <dc:date>2020-07-22T15:30:21Z</dc:date>
    </item>
  </channel>
</rss>

