question

Fiona Kattenstroth avatar image
1 Like"
Fiona Kattenstroth asked Fiona Kattenstroth commented

Mixed up item order on queue/ processor

Hello,
I have an issue with the order of items I'm moving into a queue, that is directly connected to a processor. When I'm moving the items, there are still 5 of another Type left in the queue, so according to FIFO they have to be sent to the processor first. But the problem is that one of the moved items gets on the processor directly.

Can that be related to the time, when I'm moving the other items? In the picture you can see that there is this 6th item right on its way to the processor, but when I click on him (the processor), it says that there is no item and if I look in the tree of the item, it says that it's already inside of the processor.

1660822518500.png

So right after that, the red items are moved and somehow one of those red boxes got on the processor and it is for once processing two items at the same time:

1660822675782.png

Does anybody know why that happens? I uploaded a simple model that shows the error, it's called: Queues_22.2.0_FK_1

FlexSim 22.2.0
mixed up order
1660822518500.png (65.6 KiB)
1660822675782.png (66.2 KiB)
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

·
Kavika F avatar image
0 Likes"
Kavika F answered Fiona Kattenstroth commented

Hey @Fiona Kattenstroth, I think you could refactor your Process Flow to make it simpler to follow which in turn will eliminate the error you see.

I started by keeping your top block but changing it to spawn boxes one at a time (shouldn't make a difference) and then change their color based on Type using a "Change Visual" activity rather than a Custom Code block. The "Create Box" activity also assigned the "Type" label to the boxes created.

1660861885397.png

I pulled values from this Table for consistency:

1660864127221.png

Next I have a Event-Triggered Source which will spawn a token when Queue1's content decreases to 5 (like you had it for the Wait for Event activity). I have a Breath after this (just a Delay with a 0 second delay). Read this Answer if you want to learn more about when/where to put Breaths.

1660862450970.png

Then I get the Type of one of the boxes on Queue1 and assign the Type label to the opposite value of the lastType.

1660863716575.png

I made a number of tokens equal to how many boxes I needed to spawn based on Type.

1660863836805.png

That way when I made a new box I could change its color using a Change Visual activity.

1660863861881.png


There are other ways you could approach this problem, but this solves the main problem you were facing earlier.


1660861885397.png (11.4 KiB)
1660862450970.png (24.1 KiB)
1660863716575.png (29.4 KiB)
1660863836805.png (29.4 KiB)
1660863861881.png (19.0 KiB)
1660864127221.png (5.2 KiB)
· 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.

Fiona Kattenstroth avatar image Fiona Kattenstroth commented ·
Hey @Kavika F, thanks for your effort! I've been able to solve the problem with that breathing activity. Nevertheless I've been surprised that the order can be mixed up. I'll be more careful about taking functionalities for guaranteed.
1 Like 1 ·

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.