SimEvents Control Entity Gate
6 ビュー (過去 30 日間)
古いコメントを表示
Hi all,
Within SimEvents I'm trying to model a system forwarding entities at a specified time by controlling an entity gate.
Up untill now, I haven't been succesfull trying several different approaches.
Basically, I'm sending an entity from the generator towards the enable gate, once the enable gate is not enabled (controlled by a step or signal editor) the entity may not be forwarded. Currently, the entity is being generated correctly but the control mechanism of the gate does not seem to work, in my idea the gate is always open.
Please see attached file.
Looking forward receiving your reply!
Kind regards,
Colin
2 件のコメント
Renato SL
2019 年 8 月 27 日
I'd like to help but my MATLAB version is R2017b. Can you provide the .slx file for version R2017b or below?
採用された回答
Renato SL
2019 年 8 月 27 日
You implemented the Entity Gate like this,
Because you show the enable port, I found that the gate will be open once the enable port receives a positive signal (and will never close even though it receives 0 or negative value) and therefore as you put in the question, you think that "the gate is always open".
So I removed the enable port.
The description in the Entity Gate: "(1) Enable Gate opens when the control port receives a message with a positive value," so I believe that there is no need for an enable port to get the behaviour that you want.
I tested it and voila.
So that's it.
Removing the enable port solved the problem.
PS.
I believe that is an appropriate result even though it seems not as the occurrence of entities are not in line with the time (first entity is not at t=1, second entity is not at t=2, third entity is not at t=4).
The reason for that is that Entity Generators in default are set to hold on to entities that cannot depart from the block. In this case the depart of entities is determined by the opening of the Entity Gate, so that in the plot:
- the first entity in the plot is actually the one generated at t=0 (the generate entity at simulation start tickbox in Entity Generator is ticked) and has just been released because the Entity Gate has just opened at that time
- the next entity is 1 time unit apart from the last departed entity (as period = 1 in the Entity Generator)
- the last entity was supposed to depart 1 time unit after the second one but it was blocked because the Entity Gate is closed. Therefore, it departs as soon as the Entity Gate opens (just before t=4)
0 件のコメント
その他の回答 (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!