Queue Capacity

All topics on the Atoms in any Enterprise Dynamics Library.
Post Reply
Yfke
Posts: 14
Joined: Friday 13 April, 2018 - 10:54

Queue Capacity

Post by Yfke » Thursday 07 June, 2018 - 16:25

Hi!

I would like to simulate in 3D. When the capacity of my queues is equal or smaller than 10, I can see all the product in the queue. That is what I want.
But if I change my queue capacity to more than 10, I can only see one product in the queue. I need to change the queue capacity to more than 10, because otherwise I got a lot of other problems within my model. Does anyone know, how I can solve this?

I hope someone can help me, thanks in advance!

Kind regards,
Yfke

User avatar
HarryBunnik
Posts: 310
Joined: Monday 07 February, 2011 - 11:22

Re: Queue Capacity

Post by HarryBunnik » Thursday 07 June, 2018 - 16:51

Ha Yfke,

Yes, that is a measure to speed up the animation. However, I agree it would be nice if you have a bit more control over it.

For the moment you can solve it using the following code on the entry- and exit trigger of the queue. With this code, you are placing the products yourself (which the queue is up to 10 products doing itself).

ForAtomLayerUnder(
c,
Do(
Setcs(a) {active atom, so the one currently selected in the loop. Note that after referring to another atom, the active shifts focus!},

SetLoc(
xSize(c) - xSize(c)/Att([Capacity], c) * GetRank(cs), {x-location}
0.5 * ySize(c) - 0.5 * ySize(cs), {y-location}
0,
cs
)
)
)


Here you loop every time a product enters or leaves the queue over the content of the queue and locate it again. This is necessary since every time a product leaves, all products have to move a position. With the x-location (based on the length of the queue and the capacity of it) you have to subtract it from the length of the product to start placing it from the right. If you skip this "xSize(c) -", products are placed from the left.

I also added a small example model.
Queue3D.mod
(15.64 KiB) Downloaded 93 times
I hope this helps you further,

Gr. Harry

Yfke
Posts: 14
Joined: Friday 13 April, 2018 - 10:54

Re: Queue Capacity

Post by Yfke » Thursday 07 June, 2018 - 17:13

Thank you Harry! :D

Post Reply