Jump to content
Simio Forum

Combining different entities

Recommended Posts


I am trying to combine different types of entities (coming from different sources) using a combiner.


1. One source connected to the parent node of a standard library combiner.

2. Two sources (each with a different entity) connected to the MemberInput of the combiner.

I saw the Simbit but I am struggling with the matching logic for this configuration. I tried:

- Matching Rule: 'Match Members'

- Member Match Expression: ModelEntity.BatchMembers.IndexOfItem( Entity2) && ModelEntity.BatchMembers.IndexOfItem( Entity3)

This is a rather simple problem but I would appreciate a quick hint. Larger picture: Assembly of many parts into a product with each part represented as an entity.



Share this post

Link to post
Share on other sites

The Member Match Expression is an expression that gets evaluated for each entity in the member input buffer. The combiner will batch all members that evaluate that expression to the same value into a batch size set in the “Batch Quantity” property. So in your case, you would like to construct an expression that will match one each of two types of member entities.

We also need to clarify what you mean by entity types. In Simio, you create object definitions that you can then place, or instantiate, in the model’s facility view. A default entity definition called “ModelEntity” is already created for you. If you would like entities with completely different definitions, you must create new object definitions with all the corresponding properties, logic, and states. However, in your case (and many cases) I think you are interested in different instances of the same entity type. So, we can place three entity instances of the object “ModelEntity” in the facility view and name them Entity1, Entity2, and Entity3. Importantly, these entity instances are all the same type of entity… namely, ModelEntities. However, each instance can (and usually will) have different property settings (the most obvious one being the name).

Now, we need to find a way to match the member entities. Again, that is done by way of an expression that will evaluate to the same value for the members we want to batch together. I’ll make the assumption that we want to batch one of each member entity in a first in first out (by entity instance) fashion. One way to do so is to create a state variable on the ModelEntity object definition that we can use to count the number of entities created at each source. Then, we can just match member entities that have the same count value.

1. Create the integer state variable in the ModelEntity definition tab.

2. Set the state value to the number of entities produced at each source upon entity creation. In each source that makes member entities, under State Assignments, set ModelEntity.IntegerState1 to Source2.OutputBuffer.NumberExited and Source3.OutputBuffer.NumberExited

3. Batch the entities:

Batch Quantity = 2

Matching Rule = Match Members

Member Match Expression = ModelEntity.IntegerState1

Share this post

Link to post
Share on other sites