question

Andre T6 avatar image
0 Likes"
Andre T6 asked Joerg Vogel commented

Picking and sending in series

Hi,
I have some problem with my custom code. When the model run at start, the model picking box from queue 2 or 3 as intended, and send it to queue 5. And when a box arrive in queue 1, the crane will move the box from queue 1 to queue 4.
After some time, the crane will only move the box from queue 1 to queue 4 and moving the box from queue 4 to queue 5 and leaving queue 2 and 3 empty
How do i fix this in my custom code?
1638003231208.png

FlexSim 21.2.2
custom codefifo
1638003231208.png (28.5 KiB)
· 3
5 |100000

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

1 Answer

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel commented

Probably the content of queue 4 never exceeds 20. This happens, because for each item there is already created an transport tasksequence and it is not counted for current content. The current content is content of stored items + items in transit to this queue - items in transit to other objects. And when an item is just waiting to get transported, then it doesn’t belong anymore to the counted content of the queue. You need a customized logic, that prevents items to be send right from arriving in the queue. I would choose something like holditem or do not release item through an On Entry event. Then whenever a situation occurs where the crane gets available I would release the last item by command releaseitem Or similar action in process flow. This command calls automatically the function of Send to Port and the actual situation gets evaluated.

· 17
5 |100000

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