Match Entities Based on Attributes
This example shows how to build a model to store and match entities representing bicycle components. The model uses an Entity Store block for storage and an Entity Selector block to match a set of bicycle wheels to the corresponding size frame for assembly.
Produce Bicycle Frames and Wheels
Suppose that you are modeling an assembly line that produces bicycles sized small, medium, and large. Each bicycle is manufactured by matching the set of wheels to the corresponding size frame. The wheels are produced at a facility. The frames are ordered from a supplier and they arrive at the facility ready to assemble. Given this arrangement, frame arrival rate is slower than the wheel production rate, and the set of wheels are stored in a bin.
In the model:
The Bicycle Frame Block generates
5to represent slow arrival rate of bicycle frames. A
Framecan be of size
3, and each
Framecarries an attribute
FrameSizethat represents its size.
The Raw Wheel Material Block generates
WheelSizeattribute that represents the size of each generated wheel. The initial value of
WheelSizeis set to
In the Produce Wheels with Various Size block, wheels are set to size
The Entity Store block is named Store Wheels in a Bin and it stores the processed wheels.
The Entity Selector block is named Match Wheels to Frames and it matches
'WheelSize'to the corresponding
Simulate the Model and Review Results
Simulate the model. Open the Simulation Data Inspector. Observe that, for the bicycle assembly, the size of the set of wheels and the frames are exactly matched by the Entity Selector block. Although the wheels are generated faster, they are stored in the Entity Store block, and they wait to be matched to the arriving frames for assembly.