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.

Natalie White avatar image Natalie White commented ·

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 0 ·
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.

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

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:

1689258924059.png

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

0 Likes 0 ·
1689258727829.png (71.9 KiB)
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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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