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)
Best Answer