This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Entity Gate

Gate entities

  • Library:
  • SimEvents

Description

The Entity Gate block controls when pending entities can advance in the model.

The Operating mode parameter specifies how the pending entities advance through the gate.

The Open gate at simulation start parameter opens the gate at the start of simulation.

Ports

Input

expand all

Input entity port for entries entering the gate.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean | enumerated | bus

Input control port for receiving messages to the gate.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean

Output

expand all

Output entity port for entities leaving the gate.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean | enumerated | bus

Parameters

expand all

Select the mode of operation of this gate. With the Operating mode parameter set to:

  • Enable gate, this block represents a gate that opens whenever the control port receives a message with a positive value, and closes whenever the message has zero or a negative value. By definition, an open gate permits entity arrivals as long as the entities are able to immediately advance to the next block, while a closed gate forbids entity arrivals. The message that is received at the control port has a numerical value of type double. Since the gate receives a message with a positive value and opens, an enabled gate remains open until it receives a message with zero or a negative value and closes.

  • Release gate, this block permits the arrival of one pending entity when a message arrives on the control port. At all other times, the entity input port of the block is unavailable. By definition, the opening of the gate permits one pending entity to arrive if the entity is able to immediately advance to the next block.

  • Selection gate, this block permits the arrival of pending entities whenever the message value from the control port matches the attributes of the pending entities. Otherwise it prevents the arrival of pending entities.

Programmatic Use

Block Parameter: OperatingMode
Type: character vector
Values: 'Enable gate' | 'Release gate' 'Selection gate'
Default: 'Enable gate'

Name of the attribute to match the control port message value.

Dependencies

This parameter is visible when you set Operating mode to Selection Gate.

Programmatic Use

Block Parameter: MatchingAttributeName
Type: character vector
Values: 'Attribute1' | character vector
Default: 'Attribute1'

Specify the initial value to match the matching attribute which opens the gate.

Dependencies

This parameter is visible when you set Operating mode to Selection Gate.

Programmatic Use

Block Parameter: InitialValueOfMatchingAttribute
Type: character vector
Values: 'NaN' | scalar
Default: 'NaN'

Select this option to open the gate at the start of the simulation.

off

Gate is closed at the start of the simulation.

on

Gate is open at the start of the simulation.

Programmatic Use

Block Parameter: OpenGateAtSimulationStar
Type: character vector
Values: 'on' | 'off'
Default: 'off'

Introduced in R2016a