- The number of entities departed signal from the "Entity Server" increases over time (e.g., 0 → 1 → 2 → 3).
- You can use an "Edge Detection Block" to detect these changes.This will generate a trigger signal whenever an entity departs.
- Add an "Entity Generator" and set it to event-based mode (instead of time-based).
- Connect the trigger signal (from the "Edge Detection Block") to the "Entity Generator's" event input. Now, a new entity will be created automatically every time an entity departs.
- You can also use a "Queue" or another "Entity Server" to control entity timing.
- To apply custom logic (e.g., setting entity attributes), you can use a "MATLAB Function Block".
- The "Entity Server" outputs the Number of Entities Departed as a signal, which is processed by the "Edge Detection Block" to detect changes and generate an event trigger. This trigger is converted into a discrete event by the "Triggered Subsystem", which then activates the "Entity Generator" in event-based mode to create a new entity.
- The newly generated entity can be managed using a "Queue" for timing control, modified using a "MATLAB Function Block" for custom attributes, and finally routed into the system via the "Entity Sink".




