<?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: store packed pallet in floor storage 2019 in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/store-packed-pallet-in-floor-storage-2019/m-p/13491181#M8661</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;The stacking logic does not take into account any items contained inside the stored object (such as boxes on a pallet).&lt;/P&gt;&lt;P&gt;But you can use the "On Entry" trigger to adjust the location of the entering item (pallet) based on the position of the items on the previous pallet. The following code will set its z-location to be equal to the highest item position on the previous pallet:&lt;/P&gt;&lt;PRE&gt;Object current = ownerobject(c);
Object item = param(1);
int port = param(2);
int bay = param(3);
int level = param(4);

// Restack items in cell
int cellContent = rackgetcellcontent(current, bay, level);
if(cellContent &amp;gt; 1)
{
&amp;nbsp; &amp;nbsp; Object prevPallet = rackgetitembybaylevel(current, bay, level, cellContent-1);
&amp;nbsp; &amp;nbsp; double maxHeight = 0;
&amp;nbsp; &amp;nbsp; for(int rank = 1; rank &amp;lt;= prevPallet.subnodes.length; rank++)
&amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Get item reference
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Object item = prevPallet.subnodes[rank];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Is item top higher than current maxHeight?
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(item.getLocation(0.5, 0.5, 1).z &amp;gt; maxHeight)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; maxHeight = item.getLocation(0.5, 0.5, 1).z;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; item.location.z = prevPallet.getLocation(0.5, 0.5, 0).z + maxHeight;
}&lt;/PRE&gt;&lt;P&gt;If it's possible that the pallets leave the rack in a different order you might want to also re-position all pallets in a rack cell whenever an item exits (On Exit trigger).&lt;/P&gt;&lt;P&gt;I added an example to the attached model.&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/51090-packed-pallet-fm.fsm" target="_blank"&gt;packed-pallet-fm.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 20 Apr 2022 06:39:13 GMT</pubDate>
    <dc:creator>moehlmann_fe</dc:creator>
    <dc:date>2022-04-20T06:39:13Z</dc:date>
    <item>
      <title>store packed pallet in floor storage 2019</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/store-packed-pallet-in-floor-storage-2019/m-p/13491180#M8660</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 19.0.0 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi, I have a combiner that combines 8 boxes in one packed pallet. (2019 version)&lt;/P&gt;
 &lt;P&gt;when I store them in a floor storage rack the pallets are put over each other ignoring the boxes.&lt;/P&gt;
 &lt;P&gt;How can I make the next packed pallet stored upper the previous one?&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/51093-packed-pallet.fsm" target="_blank"&gt;Packed_pallet.fsm&lt;/A&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1650431245013.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1509924i61B207117B432F67/image-size/large?v=v2&amp;amp;px=999" role="button" title="1650431245013.png" alt="1650431245013.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Apr 2022 05:08:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/store-packed-pallet-in-floor-storage-2019/m-p/13491180#M8660</guid>
      <dc:creator>raji_a2</dc:creator>
      <dc:date>2022-04-20T05:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: store packed pallet in floor storage 2019</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/store-packed-pallet-in-floor-storage-2019/m-p/13491181#M8661</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;The stacking logic does not take into account any items contained inside the stored object (such as boxes on a pallet).&lt;/P&gt;&lt;P&gt;But you can use the "On Entry" trigger to adjust the location of the entering item (pallet) based on the position of the items on the previous pallet. The following code will set its z-location to be equal to the highest item position on the previous pallet:&lt;/P&gt;&lt;PRE&gt;Object current = ownerobject(c);
Object item = param(1);
int port = param(2);
int bay = param(3);
int level = param(4);

// Restack items in cell
int cellContent = rackgetcellcontent(current, bay, level);
if(cellContent &amp;gt; 1)
{
&amp;nbsp; &amp;nbsp; Object prevPallet = rackgetitembybaylevel(current, bay, level, cellContent-1);
&amp;nbsp; &amp;nbsp; double maxHeight = 0;
&amp;nbsp; &amp;nbsp; for(int rank = 1; rank &amp;lt;= prevPallet.subnodes.length; rank++)
&amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Get item reference
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Object item = prevPallet.subnodes[rank];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Is item top higher than current maxHeight?
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(item.getLocation(0.5, 0.5, 1).z &amp;gt; maxHeight)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; maxHeight = item.getLocation(0.5, 0.5, 1).z;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; item.location.z = prevPallet.getLocation(0.5, 0.5, 0).z + maxHeight;
}&lt;/PRE&gt;&lt;P&gt;If it's possible that the pallets leave the rack in a different order you might want to also re-position all pallets in a rack cell whenever an item exits (On Exit trigger).&lt;/P&gt;&lt;P&gt;I added an example to the attached model.&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/51090-packed-pallet-fm.fsm" target="_blank"&gt;packed-pallet-fm.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Apr 2022 06:39:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/store-packed-pallet-in-floor-storage-2019/m-p/13491181#M8661</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2022-04-20T06:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: store packed pallet in floor storage 2019</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/store-packed-pallet-in-floor-storage-2019/m-p/13491182#M8662</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/37126/rajia2.html" nodeid="37126"&gt;@Raji A2&lt;/A&gt;, was  Felix Möhlmann's  answer helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. 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>Tue, 26 Apr 2022 23:22:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/store-packed-pallet-in-floor-storage-2019/m-p/13491182#M8662</guid>
      <dc:creator>jason_lightfoot_adsk</dc:creator>
      <dc:date>2022-04-26T23:22:16Z</dc:date>
    </item>
  </channel>
</rss>

