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!