Count Boxes in a rack that has both pallets and boxes mixed

Count Boxes in a rack that has both pallets and boxes mixed

GerardoRodea
Not applicable
21 Views
8 Replies
Message 1 of 9

Count Boxes in a rack that has both pallets and boxes mixed

GerardoRodea
Not applicable

[ FlexSim 23.1.4 ]

Hello,

In my model, I have both boxes and pallets with boxes stored. When I do the counting, the box and the pallet count as 1, regardless if the pallet contains for example 5 boxes.

How can I make it counting the total boxes?

I am attaching my model and the picture that best describes the problem.

Additional point: If you count the boxes/pallets, in the picture and compare it with the model, it is always adding 1. I cannot understand where this additional 1 is coming from.

Example new.fsmexample of counting boxes pallet.JPG

0 Likes
Accepted solutions (1)
22 Views
8 Replies
Replies (8)
Message 2 of 9

moehlmann_fe
Observer
Observer
Accepted solution

The offset of 1 stems from the row label starting at 1 instead of 0.

1691672973459.png

To account for pallets, change the "Delta" value to either return the number of subnodes of the entering/exiting item if there are any and 1 otherwise. (Negative values for exit event)

1691673030534.png

0 Likes
Message 3 of 9

GerardoRodea
Not applicable
Thanks for the reply.


I want to count boxes, not pallets. As you can see from my model, I have a mix of both in the rack and it is only counting 1 either is a pallet with multiple boxes or 1 box.
0 Likes
Message 4 of 9

moehlmann_fe
Observer
Observer
That's what the change is for. "To account for pallets..." was meant as: To account for the fact that an entering item could be a pallet and count the content instead of the pallet itself....
0 Likes
Message 5 of 9

GerardoRodea
Not applicable
Thanks for the clarification,

So then, I would need to modify the Delta to the custom code you have shown. Does it needs to be done for the On Slot Entry / On Slot Exit? or only for one of them?

0 Likes
Message 6 of 9

julie_weller
Not applicable
For both, and the slot exit would be the same code but negative for the numbers to return
Message 7 of 9

julie_weller
Not applicable

Hi @GRodea, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. 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
Message 8 of 9

GerardoRodea
Not applicable

Hello,

I did the change as you mentioned and the values in my dashboard completely dissapeared. (Dashboard 2/XXXRack Content by SKU.

Aslo, the Systems Console started showing some lines that were not there before, related to the Statistic Collector that were modified.Example with expansion.fsm

0 Likes
Message 9 of 9

moehlmann_fe
Observer
Observer

1. There is a spelling mistake in the code(s).

1692277099883.png

2. You have to return the negative number of subnodes for the exit event.

1692277157209.png