Documentation Center

  • Trial Software
  • Product Updates

Role of Gates in SimEvents Models

Overview of Gate Behavior

By design, certain blocks change their availability to arriving entities depending on the circumstances. For example,

  • A queue or server accepts arriving entities as long as it is not already full to capacity.

  • An input switch accepts an arriving entity through a single selected entity input port but forbids arrivals through other entity input ports.

Some applications require more control over whether and when entities advance from one block to the next. A gate provides flexible control via its changing status as either open or closed: 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. You configure the gate so that it opens and closes under circumstances that are meaningful in your model.

For example, you might use a gate

  • To create periods of unavailability of a server. For example, you might be simulating a manufacturing scenario over a monthlong period, where a server represents a machine that runs only 10 hours per day. An enabled gate can precede the server, to make the server's availability contingent upon the time.

    To learn about enabled gates, which can remain open for a time interval of nonzero length, see Enable a Gate for a Time Interval.

  • To make departures from one queue contingent upon departures from a second queue. A release gate can follow the first queue. The gate's control signal determines when the gate opens, based on decreases in the number of entities in the second queue.

    To learn about release gates, which open and then close in the same time instant, see Open a Gate Instantaneously.

  • With the First port that is not blocked mode of the Output Switch block. Suppose each entity output port of the switch block is followed by a gate block. An entity attempts to advance via the first gate; if it is closed, then the entity attempts to advance via the second gate, and so on.

    This arrangement is explored in Add Gating Logic Using Combinations of Gates.

Types of Gate Blocks

The Gates library offers these fundamentally different kinds of gate blocks:

  • The Enabled Gate block, which uses a control signal to determine time intervals over which the gate is open or closed. For more information, see Enable a Gate for a Time Interval.

  • The Release Gate block, which uses a control signal to determine a discrete set of times at which the gate is instantaneously open. The gate is closed at all other times during the simulation. For more information, see Open a Gate Instantaneously.

    Tip   Many models follow a gate with a storage block, such as a queue or server.

Was this topic helpful?