EntityGate

The EntityGate object allows incoming entities to be blocked temporarily.

When the EntityGate is open and the Queue is empty, incoming entities pass through without delay.  When it is closed, incoming entities are directed to a Queue where they are held until the EntityGate becomes Open.  When the EntityGate opens, the queued entities are released one at time, separated by a delay determined by the ReleaseDelay keyword.  This delay does not apply to entities that arrive when the EntityGate is open.  However, if queued entities are still being released, an incoming entity is placed at the end of the Queue even though the EntityGate is Open.

The EntityGate's state, either Open or Closed, is determined by the inputs to its various Threshold, Maintenance, and Breakdown keywords.

Normally, a EntityGate picks the first object from its queue for processing.  However, it is possible to select any of the other objects in the queue using the Match, SelectionCondition, and NextEntity keywords.  These inputs can be used separately or together to specify the objects that are eligible to be selected.

EntityGate Inputs

Keyword

Description

Key Inputs

 

Description

A free-form string describing the object.

NextComponent

The next object to which the processed entity is passed.

WaitQueue

Queue from which the next entity for processing will be selected.

If an expression is entered that can return various Queues, it is necessary for each Queue to be included in the entry to the WatchList keyword.  If a Queue is not included, then the arrival of an entity to that

Queue will not wake up this processor.

Match

An expression returning a string value that determines which of the queued entities are eligible to be selected.  If used, the only entities eligible for selection are the ones whose inputs for the Queue's Match keyword are equal to value returned by the expression entered for this Match keyword.

Expressions that return a dimensionless integer or an object are also valid.  The returned number or object is converted to a string automatically.  A floating point number is truncated to an integer.

Note that a change in the Match value does not trigger the processor automatically to re-check the Queue.  The processor can be triggered by adding one or more objects to the WatchList input.

SelectionCondition

An optional expression that tests whether an entity in the queue is eligible to be processed.  The expression should return 1 (true) if the entity is eligible.  The entity chosen for processing is the first one in the queue that satisfies both the SelectionCondition expression and the Match value (if specified).

Unlike the Match value, which must be specified when an entity first enters the queue, the SelectionCondition is evaluated when an entity is to be removed from the queue.  Consequently, a SelectionCondition is more flexible than a Match value, but is significantly less efficient.

NextEntity

An optional expression that returns the next entity to be removed from the queue.  No entity is removed if the expression returns null or the entity is not present in the queue.  To be removed, the entity must also satisfy the Match and SelectionCondition inputs if these are entered.

WatchList

An optional list of objects to monitor.

The queue will be inspected for an entity to process whenever one of the WatchList objects changes state.

ReleaseDelay

The time delay before each queued entity is released.  Entities arriving at an open gate are not delayed.

NumberToRelease

Maximum number of entities to release each time the gate is opened.

Options

 

AttributeDefinitionList, CustomOutputList

See Section 6.2.

StateAssignment

The state to be assigned to each entity on arrival at this object.  No state is assigned if the entry is blank.

Thresholds

 

ImmediateThresholdList, ImmediateReleaseThresholdList, OperatingThresholdList

See Section 10.1.

Maintenance

 

WorkingStateList, ImmediateMaintenanceList, ForcedMaintenanceList, OpportunisticMaintenanceList, ImmediateBreakdownList, ForcedBreakdownList, OpportunisticBreakdownList

See Section 10.2.

Format

 

StateGraphics

A list of state/DisplayEntity pairs.  For each state, the graphics will be changed to those for the corresponding DisplayEntity, e.g.

{ Idle DisplayEntity1 } { Working DisplayEntity2 }

ProcessPosition

The position of the entity being processed relative to the processor.

Graphics

 

Position, Alignment, Size, Orientation, Region, RelativeEntity, DisplayModel, Show, Movable, VisibleViews, DrawRange

See Section 11.1.

EntityGate Outputs

Output Name

Description

Entity and DisplayEntity

 

Name, ObjectType, SimTime, Parent, Position, Size, Orientation, Alignment, GraphicalLength, ObserverList, NextList, PreviousList, EntityReferenceList

See Section 11.1.

StateEntity

 

State, WorkingState, WorkingTime, StateTimes, TotalTime

See Section 10.3.

StateUserEntity

 

Idle, Working, Setup, Maintenance, Breakdown, Stopped, Utilisation, Commitment, Availability, Reliability, Open, NextMaintenanceTime, NextBreakdownTime

See Section 10.2.

LinkedDevice

 

obj, NumberAdded, NumberProcessed, NumberInProgress, ProcessingRate, ReleaseTime

See Section 16.

LinkedService

 

MatchValue

The present value to be matched to an entity in the queue.

EntityGate

 

User-defined attributes and custom outputs

As defined by the AttributeDefinitionList and CustomOutputList inputs.