I am working on queueing using Simulink Sim Events, and I need help on adding an attribute to the events.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
BABA CHOUDHURY
am 19 Jun. 2019
Bearbeitet: BABA CHOUDHURY
am 27 Jun. 2019
I want my events to have the time they were generated at the entity generator and the time their servicing was completed at the server as timestamps, so that I can calculate the difference between the two values. I started with SIMULINK as I found examples provided, and am open to other ways on implementing it
0 Kommentare
Akzeptierte Antwort
Krishna Akella
am 24 Jun. 2019
Hi Biplav,
Have you tried using SimEvents blocks for this? With simEvents you can use an 'Entity Generator' block and a 'Entity Server' block to model your queueing system. You can add two attributes to the entity via the 'Entity Type' tab page in the 'Entity Generator' block and call them 'entryTime' and 'ExitTime' or something like that. You can add timeStamps by getting the current time and setting the appropriate attribute in the entity to the current time. For example, see inside the 'Design Patterns' in SimEvents for 'Time stamp entities upon generation'. You can use this pattern to time stamp entities in the geenrator. Similarly you can timestamp entities in the entity server's 'Service Complete' event action:
entity.ExitTime = stampEntity();
Then you can find the difference from these two values.
Hope that helps!
Regards,
Krishna
Weitere Antworten (2)
Krishna Akella
am 27 Jun. 2019
That sounds strange. The service completion action must be called when the server is finished serving an entity.
There should be no need to set any kind of synchronization with respect to time.
Is it possible for your to share your model? At least a scaled down model where the problem can be reproduced? That might help me in understanding the issue better.
Regards,
Krishna
0 Kommentare
Siehe auch
Kategorien
Mehr zu Discrete-Event Simulation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!