question

Yifei Wang avatar image
0 Likes"
Yifei Wang asked Jordan Johnson answered

How to limit the amount of each itemtype a source will produce?

Hi,

Please see the attached model. I have a few questions about my model.

1. I would like to have the source to keep producing items until all itemtypes' capacity in queque 1 to 5 have been reached. Then, after flowitems goes out of the storage queue 1-5 (when certain itemtype is below its capacity in any queue 1~5) , the source should start producing the itemtype in shortage again. Otherwise, the source will be at rest. Could you please show me how to make it happen?

2. I tried to let Queue_1 and Queue_2 to pull desired itemtypes from Queue 1~5. However, it is not working properly. Could you please let me know what is wrong with it?

Thanks!

Yifei Wang

FlexSim 16.0.1
pull strategyforklift
combined.fsm (28.4 KiB)
· 4
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

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered

To make a source that keeps queues full based on a table, you can use process flow:

This flow has many activities, but it's easier to understand than it looks.

  • Each schedule source (Items for Queue N) creates a single token. That token get a label pointing to the correct queue, and a label with the column number for that queue in the Capacities table.
  • That token then creates tokens that represent possible items in the queue. There are enough "possible item" tokens to fill the queue to total capacity.
  • Each "possible item" passes through a Zone with a Max Content of 1, and a Queue Strategy of "ORDER BY RAND()", which randomizes the possible items, and sends the random order through. This simulates a source with an inter-arrival time.
  • Once through the Zone, each "possible item" token creates a 3D item on the correct queue, and sets its itemtype and color.
  • Then, each "possible item" waits for the 3D item to leave the queue. When that happens, the "possible item" loops back to wait in the Zone again, and to create another item.

The end result is that the queues will stay full of the correct kinds of items. You can change the table, and those changes will be reflected in the model.

Based on the other code you had in the source (which I replaced with a Process Flow), this probably isn't exactly what you want. However, it might give you a better idea of how you could do what you want.

You should also consider using the Zone's Partition and Partition Constraints features (new in version 16.1). You may find it helpful to achieve the behavior you need.

combined-2.fsm


autofillsource.png (39.5 KiB)
combined-2.fsm (32.6 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.