| SimEvents® | ![]() |
Gates
This block represents a gate that is open whenever the control signal at the en input port is positive, and closed whenever the signal is zero or negative. By definition, an open gate permits entity arrivals as long as the entities would be able to advance immediately to the next block, while a closed gate forbids entity arrivals. The en signal is a numerical signal of type double. Because the signal can remain positive for a time interval of arbitrary length, an enabled gate can remain open for a time interval of arbitrary length. The length can be zero or a positive number.
Entity Input Ports
| Label | Description |
|---|---|
| IN | Port for arriving entities. |
Signal Input Ports
| Label | Description |
|---|---|
| en | The gate is open whenever this signal is positive. |
Entity Output Ports
| Label | Description |
|---|---|
| OUT | Port for departing entities. |
Signal Output Ports
| Label | Description | Time of Update When Statistic Is On |
|---|---|---|
| #d | Number of entities that have departed from this block since the start of the simulation. | After entity departure |
The initial output value, which is in effect from the start of the simulation until the first update by the block, is 0.

Select this option to explicitly prioritize the gate-opening or gate-closing event, relative to other simultaneous events in the simulation. If you do not select this option, the event has priority SYS1 on the event calendar. For details, see Choosing How to Resolve Simultaneous Signal Updates.
The priority of the gate-opening and gate-closing events, relative to other simultaneous events in the simulation. Gate opening and closing are distinct events that share the same event priority. For details, see Specifying Event Priorities to Resolve Simultaneous Signal Updates. This field appears only if you select Resolve simultaneous signal updates according to event priority.
These parameters determine whether certain ports produce data throughout the simulation, produce data only when you stop or pause the simulation, or are omitted from the block. For descriptions of the affected ports, see the "Signal Output Ports" table above.

Controls the presence and behavior of the signal output port labeled #d.
Regulating Arrivals Using Gates
![]() | Discrete Event Subsystem | Entity Combiner | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |