question

Briankuo avatar image
0 Likes"
Briankuo asked Natalie White commented

How to set an item stacking rule on task executer?

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!

FlexSim 22.0.16
queuetaskexecutorstacking itemstackingstack
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

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


· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

David Seo avatar image
0 Likes"
David Seo answered David Seo edited

@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.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.