I would like to store the attributes of entities that are currently being processes by a server block. In other words, when an entity enters a server block, its attribute is read and stored in a vector. When an entity exits a server block, it's attribute is read and removed from the aforementioned vector. It must be possible to read the vector from other blocks in the model.
I get the following error when I run my model: "Error in 'untitled/Entity Server' block. See Entry action line 5, column 12. Caused by: Undefined function or variable 'ServerStore'. The first assignment to a local variable determines its class. Component:Simulink | Category:Block error"
I have made a basic model and attached it to this post. I have also added the relevant code below. Any help would be greatly appreciated.
Link to the model: https://drive.google.com/drive/folders/14KkH0H5JcUSwr-qqCHbPg7RUXHimafRw?usp=sharing
Entity Generator -> Event Actions -> Generate:
Server Block -> Event Actions -> Entry
Server Block -> Event Actions -> Exit
ServerStore = ServerStore(find(ServerStore~=ENTITYNROfEntityThatExist))