Match
Entity-Related Operation Statement
The Match statement instructs two Entities to wait at their respective Locations until the specified Attribute value is the same for both Entities with the Match statement. Note that two Entities must have a Match statement with the same specified Attribute for the statement to work correctly. The two Match statements may either be defined in the same Location on each of the two Entity's Flows, or at completely unrelated Locations.
Syntax
Match <attribute>
Syntax Example
Match Attr1
Parameters
<attribute>
The Attribute name that must have a matching value for both Entities in a Match statement before they are allowed to continue.
Parameters Examples
Suppose you have a model where both Boulder Entities and Geode Entities are broken up in a machine into Rock Entities. The Rocks that came from Geodes have crystals in them, but the Rocks that came from Boulders do not. To keep track of which Rock Entities have crystals in them, you define the Attribute aCrystals. If for a Rock Entity is 0, then the Rock Entity came from a Boulder Entity and does not have crystals in it. If aCrystals' value for a Rock Entity is 1, then the Rock Entity came from a Geode Entity and has crystals in it. Once Rock Entities of either type are created, they travel to a polishing machine and then to a storage container.
You also have a shop in your model where you sell the Rock Entities. Customers place orders online for either Rocks with crystals in them or Rocks without crystals, and then come to pick up their order later. Each item they request is processed as an Order Entity. The same Attribute, aCrystals, is used to identify which Rock type the customer is ordering. If aCrystals' value for an Order Entity is 0, then the order is for a Rock without crystals. If aCrystals' value for an Order Entity is 1, then the order is for a Rock with crystals.
Let's also say that you don't want to bring any Rock Entities of either type into your Store Location until an order has been placed for them. To ensure that the Rock Entities wait at the Storage Location until an Order Entity for their particular type comes into the Store Location, define the statement...
Match aCrystals
...at both the Storage Location (in the Flow that the Rock Entities follow) and the Store Location (in the Flow that the Order Entities follow). Many Rocks of each type gather at the Storage Location waiting for a matching Order. Once an Order Entity comes in with an order for a Rock with no crystals, which means it has an aCrystals value of 0, a Rock Entity with an aCrystals value of 0, meaning that it has no crystals, is able to move from the Storage Location to the Store Location. The Order Entity is also able to move on to its next Location, allowing another Order Entity to enter the Store Location.
Remarks
Locations using the Match statement usually should be multi-capacity because otherwise they are not able to process any other Entities until the Match is made. Additionally, Locations using Match usually should be non-queuing to allow the Entities to move out of sequence when the Match is fulfilled. Use the Match statement to pair two specific parts before assembling them, or to match a work order to a completed job.