There are four EntityGenerators which create SimEntities (Red, Green, Blue, and Yellow). Each EntityGenerator has its own maximum number of Entities to generate and appearance times for those Entities.
All the Entities flow along a conveyor with a fixed transit time and enter Queue 1.
Queue1 uses this.obj.Type as the match condition. Type is defined in the AttributeDefintionList of the Entity. Each Entity defines a Type which is "Red", "Green", etc. This is ultimately used in Pack1 and Pack2 to try to pack a given number of similar Entities (i.e. all Red, all Green, etc).
Pack1 uses Queue1 as its "feeder" and seeks to pack batches of 100 Entities of the same type (colour) into a Container.
Entities that enter Queue1 are given a RenegeTime, that is a time at which they will leave Qeueue1 and, in this instance, be sent via an assign block (Assign1) which keeps count of how many Entities (of each colour) pass through. The Entities then go via another EntityConveyor to Queue2. The idea being that I want to make batches of 100 Entities of the same colour, but at some point, if there are insufficient of a colour to make a full batch of 100, I want to create a batch with whatever number remains. For this there is a second pack object, Pack2, which has Queue2 as its "feeder".
Pack2 behaves much the same as Pack1 but with two important differences. The NumberOfEntities (to pack) is defined as: [Assign1].Count([Queue2].NextItemType). And Pack1's Recalculate setting (look in Pack1's Options tab) can be set to be True or False. If set to be True, then the intended behaviour is achieved, and any leftover Entities (fewer than 100 of a given colour) are then packed into a container which holds Entities of the same colour.
From your question I think the difference in understanding is that I send Entities directly to the Queues, rather than to the Pack objects. You could try both methods to see whether you get the same outcome.
Hope this adds the extra information you need to understand the "what/how/why"" of the model.
Regards
John