Main Content

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 Frame with Period 5 to represent slow arrival rate of bicycle frames. A Frame can be of size 1, 2, or 3, and each Frame carries an attribute FrameSize that represents its size.

  • The Raw Wheel Material Block generates Wheel with Period 1. Each Wheel carries a WheelSize attribute that represents the size of each generated wheel. The initial value of WheelSize is set to 0.

  • In the Produce Wheels with Various Size block, wheels are set to size 1, 2, or 3.

  • 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 'FrameSize'.

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.

See Also

| | | |

Related Examples

More About