Access current simulation time in SimEvents blocks
4 ビュー (過去 30 日間)
古いコメントを表示
Alexander Poets
2016 年 6 月 29 日
コメント済み: Abdolkarim Mohammadi
2021 年 3 月 22 日
I'd like to access the current simulation time in a SimEvents block like the Entity Server to set attributes accordingly. The use case is to obtain the elapsed time an entity stayed in the Entity Queue in order to set an entity's waiting time attribute. Do SimEvents blocks provide a way to get the current simtime as a parameter without having to specify a Discrete-Event System? Thanks in advance, I appreciate any help you can provide!!
0 件のコメント
採用された回答
Devdatt Lad
2016 年 7 月 13 日
You can create a Simulink Function t = getTime() which contains a Digital Clock block and then call this function from any event action from a SimEvents block to get the current time.
2 件のコメント
Abdolkarim Mohammadi
2021 年 3 月 22 日
Please notice that the sample time of the Digital Clock must be set to inherited (-1).
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Discrete-Event Simulation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!