How to generate entity using the data from another entity in discrete system event?
Show older comments
Hi everyone,
I was hoping to do something which I thought would be relatively simple but had been struggling, also we are new to discrete events in simulink/matlab so might have missed where the answer lies :)
Using matlab.DiscreteEventSystem we would like to generate an entity Type A, whenever another entity Type B enters the storage, but using some (and modified) attributes of the entity Type B. Generating an entity Type A with default values based on the entry event of entity Type B has been simple using eventGenerate for Entity A within an Entry event function for Entity B. Can also modify and set the values of the fields of the new generated Type A within its Generate to specific values. However, can't figure out how to pass the values of the attributes of the entity Type B that triggered the Entry to the Generate of Type A.
Accepted Answer
More Answers (0)
Categories
Find more on Discrete-Event Simulation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!