How to control a Release Gate with data computed in another Subsystem?
古いコメントを表示
Hello everyone,
I am trying to do a traffic simulation with SimEvents (Matlab R2013b). Since I have cars, that change their data continuously and entities, which are in a discrete event system I have to synchronize both parts. For a straight street my approach was to store the entities in a N-Server until the car has passed the straight and then let it out. The data of the car is stored in a matrix and each car has its own ID. Now the SimEvents system needs to check in the Matrix if the car already passed and then needs to open the release gate. If I try implementing this the function, which reads the memory matrix, is just executed once and the I also tried using "Event To Timed Signale" Blocks before and after the function, which reads the memory. But then I get an algebraic loop error. If I break this loop with an delay, my data gets too old, which falsifies my simulation. Do you have any ideas how to solve this? Is there a possibility to tell Simulink, to execute this function continuously?
Thanks for your help. I attached an example code.
Lucas
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Discrete-Event Simulation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!