How to set an item stacking rule on task executer?

How to set an item stacking rule on task executer?

Briankuo
Not applicable
38 Views
4 Replies
Message 1 of 5

How to set an item stacking rule on task executer?

Briankuo
Not applicable

[ FlexSim 22.0.16 ]

I would like to have my task executer stack items like how queue does. Each layer stacks nine item, and they are stacked from first layer upwards. Here's what i write in trigger function On Load:

treenode item = param(1);

treenode current = ownerobject(c);

treenode station = param(2);
{

treenode involved = item;

double x = xloc(item)+.59;

double y = yloc(item)+.07;

double z = zloc(item)-1.2;

setloc(involved, x, y, z);

}

and it stacks items in a tower. How can i revise the code? Thank you in advance!

0 Likes
Accepted solutions (1)
39 Views
4 Replies
Replies (4)
Message 2 of 5

support5CRPZ
Advocate
Advocate

@Briankuo

You can solve your stacking method using item property changed.

Use container item like Tote or Pallet not basic item box.

You can add new a container item in Flowitem Bin and change the new pallet visual to box visual.

You do not need to use setloc() script code.

0 Likes
Message 3 of 5

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

You need to refer to the rank and size of the item in your stacking logic. You can do it in the Visual>Set Location option of the OnLoad trigger.

This example stacks items in 3 x 3 layers:

1689246146852.png

Example model attached.

OnLoadStackingLogic.fsm


1689247140349.png

0 Likes
Message 4 of 5

jason_lightfootVL7B4
Autodesk
Autodesk

Here's another version where you can just specify the x and y dimensions (and offset position) using the labels on the task executer:

1689258727829.png


OnLoadStackingLogic2.fsm

In this case the expressions are a little more complex:

Image.png

(note: strictly speaking I should have used 'involved' rather than 'item')

0 Likes
Message 5 of 5

natalie_white
Not applicable

Hi @Briankuo, was one of Jason Lightfoot's or David Seo's answers 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.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes