When you want to have the cost of a parent entity include the cost of an attaching child entity.
Where to Find the Model Object
The following model object can be found in the model objects directory:
- Cost \ Transfer Cost of Attaching Entity.
How to Use the Model Object
- Open Your Model: Open your model or create a new blank model.
- Insert the Model Object into Your Model
- Locate the model object Transfer Cost of Attaching Entity and select the insert button.
- Move the cursor to the point of insertion and left mouse-click. The upper left corner of the model object will be inserted at the location of the mouse-click.
- Connect to Your Model
- Route your primary entities into the Assembly activity.
- Connect the Assembly activity to your downstream processes.
- Connect the non-arrow end of attach route to the source of your sub-assembly entities.
- Set the attach quantity on the attach route to the number of sub-assembly entities to attach to the primary entities.
- Completion: The model object is now integrated into your model, you should now be able to save and then simulate the model.
Controls Usage
Attributes:
- Cost: A system defined attribute containing the accumulating cost of each entity.
Scenario Parameters:
- v_SubCost1: Total cost of the sub-assembly entities being attached to a single primary entity.
Advance Topics
How Does the Model Object Work?
In the action logic of the attach route connecting to Assembly, we will increment the variable v_SubCost1 to the cost of the attaching (child) entity.
In the action logic of the activity Assembly we will increment the cost of the (parent) entity by the variable value and the set the variable back to 0. This will transfer the cost of the child entity to parent entity.
The cost of attaching entities is not automatically inherited by the parent entity, this is the reason why we must use a global variable to transfer the cost.