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
.
Jordan Johnson
Principal Software Engineer
>