How can I use the Entity Replicator to replicate or split an entity into a variable number of entities based on some attribute values using SimEvents 1.2 (R2006b)?

2 views (last 30 days)
I am looking for the ability to split a single entity into multiple entities based upon one of its attribute values. Currently the Entity Replicator block in SimEvents forces me to hard-code the number of output paths for entities, thus dictating how many entities are produced.
However, I want SimEvents to read the value of a particular attribute, and use that value to decide how many entities to replicate into.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This functionality can be implemented in SimEvents by designing a zero-time feedback loop entity path. The attached example demonstrates how this can be done.
The loop would execute a variable number of times decided by the attribute value. On each iteration of the loop the entity would be split into two. The last entity generated would be discarded.

More Answers (0)

Categories

Find more on Discrete-Event Simulation in Help Center and File Exchange

Products


Release

R2006b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!