Conveyor
A conveyor consists of a series of segments. A segment has a starting location (origin) and an ending location (destination) and is associated with a conveyor. The start and end of each segment represent locations along the conveyor where entities can enter and exit. A conveyor does not utilize a spatial model. The locations associated with its segments are instances of the interface IdentityIfc. Thus, movement on the conveyor is disassociated with any spatial model associated with the entity using the conveyor. Since a spatial model using instances of the LocationIfc interface and LocationIfc extends the IdentityIfc, the locations associated with segments can be the same as those associated with spatial models. If the destination of a ride request is an instance of LocationIfc then the entity's curren location property will be updated after the movement. However, if the segments are not defined by locations within a spatial model, no updating of the entity's location will take place. The modeler is responsible for making the update to the entity location, if applicable.
A conveyor has a cell size, which represents the length of each cell on all segments of the conveyor. A conveyor also has a maximum permitted number of cells that can be occupied by an item riding on the conveyor. A conveyor has an initialVelocity. Each segment moves at the same velocity.
Each segment has a specified length that is divided into a number of equally sized contiguous cells. The length of any segment must be an integer multiple of the conveyor's cell size so that each segment will have an integer number of cells to represent its length. If a segment consists of 12 cells and the length of the conveyor is 12 feet then each cell represents 1 foot. If a segment consists of 4 cells and the length of the segment is 12 feet, then each cell of the segment represents 3 feet. Thus, a cell represents a generalized unit of distance along the segment. Segments may have a different number of cells because they may have different lengths.
The cells on a conveyor are numbered from 1 to n, with 1 at the entry of the first segment, and n at the exit of the last segment, where n is the number of cells for the conveyor.
Items that ride on the conveyor must be allocated cells and then occupy the cells while moving on the conveyor. Items can occupy more than one cell while riding on the conveyor. For example, if the conveyor has 5 cells (1, 2, 3, 4, 5) and the item needs 2 cells and is occupying cells 2 and 3, then the front cell associated with the item is cell 3 and the rear cell associated with the item is cell 2.
An entity trying to access the conveyor at an entry cell of the conveyor, waits until it can block the cell. A request for entry on the conveyor will wait for the entry cell if the entry cell is unavailable (blocked or occupied) or if another item is positioned to use the entry cell. Once the entity has control of the entry cell, this creates a blockage on the conveyor, which may restrict conveyor movement. For a non-accumulating conveyor the blockage stops all movement on the conveyor. For accumulating conveyors, the blockage restricts movement behind the blocked cell. Gaining control of the entry cell does not position the entity to ride on the conveyor. The entity simply controls the entry cell and causes a blockage. The entity is not on the conveyor during the blockage.
If the entity decides to ride on the conveyor, the entity will be allocated cells based on its request and occupy those cells while moving on the conveyor. First, the entity's request is removed from the request queue and positioned to enter the conveyor at the entry cell. To occupy a cell, the entity must move the distance represented by the cell (essentially covering the cell). Thus, an entering entity takes the time needed to move through its required cells before being fully on the conveyor. An entity occupies a cell during the time it traverses the cell's length. Thus, assuming a single item, the time to move from the start of a segment to the end of the segment is the time that it takes to travel through all the cells of the segment, including the entry cell and the exit cell.
When an entity riding on the conveyor reaches its destination (an exit cell), the entity causes a blockage on the conveyor. For a non-accumulating conveyor, the entire conveyor stops. For an accumulating conveyor, the blockage restricts movement behind the blockage causing items behind the blockage to continue to move until they cannot move forward. When an entity exits the conveyor, there will be a delay for the entity to move through the cells that it occupies before the entity can be considered completely off of the conveyor. Thus, exiting the conveyor is not assumed to be instantaneous. This implementation assumes that the entity must move through the occupied cells to get off the conveyor. Any delay to unload the item from the conveyor will be in addition to the exiting delay. Thus, a modeling situation in which the entity is picked up off the conveyor may need to account for the "extra" exiting delay. This implementation basically assumes that the item is pushed through the occupying cells at the end of the conveyor in order to exit. Scenarios where the item is picked up would not necessarily require the time to move through the cells.
A conveyor is considered circular if the entry location of the first segment is the same as the exit location of the last segment.
To construct a conveyor, use the supplied builder or specify the segment data.
Parameters
the containing model element
the initial velocity of the conveyor
the specification of the segments
the maximum number of cells that an entity can occupy while riding on the conveyor
the name of the conveyor
Constructors
Types
A cell represents a length of space along the conveyor that can be allocated to and occupied by conveyable items. A conveyor is divided into a set of cells to represent its length. A cell acts like a general unit of distance along the conveyor.
A conveyor request represents the holding of cells on a conveyor and acts as a "ticket" to use the conveyor. Once an entity has a conveyor request, the entity has control over the cells at the start of the segment associated with the entry location along the conveyor. After receiving a request to access the conveyor the entity can either ride on the conveyor or exit. The conveyor request blocks at the point of access until riding or exiting. The request is placed in the blocking entry state. When the entity asks to ride the conveyor then the request will be placed in the riding state. If the entity never rides the conveyor, then the request stays in the blocking entry state. The property isWaitingForEntry indicates that the conveyor request is waiting to be allowed to block the entry cell of the conveyor at its current location. Once the conveyor request is used to ride the conveyor, the isWaitingToConvey property will report false. The isBlockingEntry property will report true until the request begins riding. Once the request reaches its destination, the isBlockingExit property will be true and the request is in the blocking exit state. When the request exits the conveyor the isCompleted property is true and the request is in the completed state. Once in the completed state, the request can no longer be used for any interaction with the conveyor.
Properties
Holds entities that are suspended because they are in the process of accessing the conveyor.
The time that it takes an item on the conveyor to travel through a cell in order to fully occupy the cell. This is based on the cell size and the velocity of the conveyor.
The locations that can be used to enter (get on) the conveyor.
Holds entities that are suspended because they are in the process of exiting the conveyor.
The locations that can be used as points of exit on the conveyor.
The initial velocity is the default movement velocity through cells on the conveyor. Changing the initial velocity will change the velocity that is set at the beginning of each replication.
Indicates if the conveyor's segments form a loop such that the location associated with the first segment is the same as the ending location of the last segment
Holds entities that are suspended because they are in the process of riding the conveyor.
Functions
Returns the queue that holds requests that are waiting to access the conveyor at the supplied location
Returns a list of the cells that are blocked in the order of cell number.
The entry locations that are blocked and the corresponding blocked cell
The exit locations that are blocked and the corresponding blocked cell
A list of all conveyor requests that are currently associated with (occupying) cells on the conveyor in the order from the furthest along (closest to the exit location of the last segment) to the nearest request (closest to the entry location of the first segment).
By default, items riding on the conveyor have priority to enter entry cells over items waiting to enter. This default setting is false. By setting the priority to true, the items waiting to begin riding the conveyor have priority to access over items already riding on the conveyor.
Checks if the conveyor has any blocked cells. A cell can be blocked for entry or for exit.
True if there is at least one cell that is occupied that can move on the conveyor
Checks if the conveyor does not have any blocked cells
Returns true if the entry location on the conveyor is blocked. Blocked means that an entity has control of the cell. A blockage causes non-accumulating conveyors to stop. For accumulating conveyors, items can continue moving until they reach the blockage and cannot move forward through the blockage. The entry cell remains blocked until released. The entity does not have to be on the conveyor to block the entry. The entity can release the blockage by exiting the conveyor (before getting on) or after riding on the conveyor. A blockage at an entry location is automatically released the instant that an item riding on a conveyor is completely on the conveyor. That is, when the item's rear most cell first occupies the entry cell.
Returns true if the exit location on the conveyor is blocked. Blocked means that an entity has control of the cell. A blockage causes non-accumulating conveyors to stop. For accumulating conveyors, items can continue moving until they reach the blockage and cannot move forward through the blockage. An exit location is blocked when the item occupying the exit cell has reached its destination while still on the conveyor. The exit cell becomes unblocked the instant that the item is fully off of the conveyor
If any of the cells of the conveyor are occupied by an entity, then return true; otherwise, if there are no entities occupying cells, return false.
If the conveyor has been stopped using the stopConveyor() function, this will start it moving. If the conveyor has not been stopped using the stopConveyor() function, this method does nothing.
Controls whether queues at conveyor entry cells (access points) have their statistics appear on summary output. The default is to have the results appear. This function turns reporting on or off for all access queues. Individual control is available via the accessQueues property.
Controls whether hold queue using within suspending functions accessConveyor(), rideConveyor(), exitConveyor() report statistics on the summary reports.
Turns on or off the default reporting for the utilization and time average number of busy cells for each segment of the conveyor. By default, the reporting for segments is off.
If a cell traversal is scheduled, it will be cancelled and movement on the conveyor will not occur.