ConveyorQ

class ConveyorQ(parent: ModelElement, name: String? = null, discipline: Queue.Discipline = Discipline.FIFO) : Queue<Conveyor.ConveyorRequest>

Constructors

Link copied to clipboard
constructor(parent: ModelElement, name: String? = null, discipline: Queue.Discipline = Discipline.FIFO)

Properties

Link copied to clipboard

A flag to control whether the model element reacts to after experiment actions.

Link copied to clipboard

A flag to control whether the model element reacts to after replication actions.

Link copied to clipboard

A flag to control whether the model element reacts to before experiment actions.

Link copied to clipboard

A flag to control whether the model element reacts to before replication actions.

Link copied to clipboard

The current discipline for the queue

Link copied to clipboard

Indicates the current status of the model element for observers of ModelElement.Status

Link copied to clipboard
open override var defaultReportingOption: Boolean

Returns the default reporting option. True means that the response should appear on the default reports

Link copied to clipboard
open override val id: Int
Link copied to clipboard
Link copied to clipboard

The initial queue discipline. The initial discipline indicates the queue distribution that will be used at the beginning of each replication. Changing the initial discipline during a replication will have no effect until the next replication. WARNING: This will cause replications to have different disciplines and thus invalidate the concept of replications if used during a replication. Use this method only when the simulation is not running.

Link copied to clipboard

A flag to control whether the model element reacts to initialization actions

Link copied to clipboard
open override val isEmpty: Boolean

Returns whether the queue is empty.

Link copied to clipboard
open override val isNotEmpty: Boolean

Returns true if the queue is not empty

Link copied to clipboard
open override var label: String?
Link copied to clipboard

the left traversal count for pre-order traversal of the model element tree

Link copied to clipboard

the model that contains this element

Link copied to clipboard

Returns a string representation of the model element and its child model elements. Useful for realizing the model element hierarchy.

Link copied to clipboard

A flag to control whether the model element participates in monte carlo actions.

Link copied to clipboard
override val name: String
Link copied to clipboard

Gets the number of model elements contained by this model elements.

Link copied to clipboard
open override val numInQ: TWResponseCIfc

Allows access to number in queue response information

Link copied to clipboard

Indicates the previous status of the model element for observers of ModelElement.Status This allows the transition to be noted by observers

Link copied to clipboard

If the Queue uses randomness, this controls it. By default, it uses the model's global source of uniform random variates. //TODO this does not consider initial random source protocol if the user decides to change it, replications may not be replications

Link copied to clipboard

A flag to control whether the model element reacts to end replication actions.

Link copied to clipboard

the right traversal count for pre-order traversal of the model element tree

Link copied to clipboard
open override val size: Int

Gets the size (number of elements) of the queue.

Link copied to clipboard

The spatial model associated with this model element. By default, each model element uses its parent model element's spatial model unless changed via this property. This changes the spatial model for this model element and no others.

Link copied to clipboard
open override var status: Queue.Status

Indicates whether something was just enqueued or dequeued

Link copied to clipboard

The current simulation time

Link copied to clipboard

The time interval between TimedUpdate events. The default is zero, indicating no timed update

Link copied to clipboard

Specifies whether this model element participates in time update event specified by its parent

Link copied to clipboard

Specifies the havingPriority of this model element's timed update event.

Link copied to clipboard
open override val timeInQ: ResponseCIfc

Allows access to time in queue response information

Link copied to clipboard
open override var waitTimeStatOption: Boolean

Default option for whether waiting time statistics are collected upon removal of items from the queue

Link copied to clipboard

Indicates whether the warm-up action occurred sometime during the simulation for this model element. False indicates that the warm-up action has not occurred

Link copied to clipboard

Specifies if this model element will be warmed up when the warmup action occurs for its parent. The warm-up flag indicates whether this model element will be warmed up when its parent warm up event/action occurs. The default value for all model elements is true. A value of true implies that the model element allows its parent's warm up event to call the warm-up action. A value of false implies that the model element does not allow its parent's warm up event to call the warm-up action. False does not necessarily mean that the model element will not be warmed up. It may, through the use of the lengthOfWarmUp property, have its own warm up event and action.

Link copied to clipboard

Specifies the priority of this model element's warm up event.

Functions

Link copied to clipboard

Adds the supplied listener to this queue

Link copied to clipboard

Cancels the timed update event for this model element.

Link copied to clipboard

Cancels the warm-up event for this model element.

Link copied to clipboard

Checks if this model element or any model element directly above this model element in the hierarchy of model elements all the way until the top Model participates in the warm-up action.

Link copied to clipboard
fun clear()

Removes all the elements from this collection

Link copied to clipboard

Returns true if this queue contains all the elements in the specified collection WARNING: The collection should contain references to QObject's otherwise it will certainly return false.

Returns true if this queue contains the specified element. More formally, returns true if and only if this list contains at least one element e such that (o==null ? e==null : o.equals(e)).

Link copied to clipboard
Link copied to clipboard
fun day(): Double

Returns the value of a 1-day time interval in terms of the base time unit

Link copied to clipboard
fun enqueue(qObject: Conveyor.ConveyorRequest, priority: Int = qObject.priority, obj: Any? = qObject.attachedObject)

Places the QObject in the queue, with the specified priority Automatically, updates the number in queue response variable.

Link copied to clipboard

Finds all the QObjects in the Queue that satisfy the condition and returns a list containing them. The items are not removed from the queue.

Link copied to clipboard

Find the first parent that has its own warm up event this guarantees that all elements below the found model element do not have their own warm-up event. A model element that has its own warm up event also opts out of the warm-up action. If the returned parent is the Model, then all are controlled by the model (unless they opt out). Elements can opt out and not have their own warm-up event. Thus, they have no warm up at all.

Link copied to clipboard
Link copied to clipboard
operator fun get(index: Int): Conveyor.ConveyorRequest

Returns the QObject at the supplied index in the queue.

Link copied to clipboard

Fills up the supplied StringBuilder carrying a string representation of the model element and its child model elements Useful for realizing the model element hierarchy.

Link copied to clipboard

This method returns the planned time for the warm-up for this model element.

Link copied to clipboard
fun hour(): Double

Returns the value of a 1-hour time interval in terms of the base time unit

Link copied to clipboard

Returns the index in this queue of the first occurrence of the specified element, or -1 if the queue does not contain this element. More formally, returns the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.

Link copied to clipboard

Fills a StringBuilder carrying the model element names in the order that they will be initialized

Link copied to clipboard

Checks if a warm-up event is scheduled for any model element directly above this model element in the hierarchy of model elements all the way until the top Model.

Link copied to clipboard

Checks if current status is the supplied status

Link copied to clipboard

Checks if a timed update event has been scheduled for this model element

Link copied to clipboard

Checks if a warm-up event has been scheduled for this model element

Link copied to clipboard
open operator override fun iterator(): Iterator<Conveyor.ConveyorRequest>

Returns an iterator (as specified by Collection ) over the elements in the queue in proper sequence. The elements will be ordered according to the state of the queue given the specified queue discipline.

Link copied to clipboard

Returns the index in this queue of the last occurrence of the specified element, or -1 if the queue does not contain this element. More formally, returns the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.

Link copied to clipboard

Returns an iterator (as specified by Collection ) over the elements in the queue in proper sequence. The elements will be ordered according to the state of the queue given the specified queue discipline.

Link copied to clipboard

Returns the value of a 1 millisecond time interval in terms of the base time unit

Link copied to clipboard
fun minute(): Double

Returns the value of a 1-minute time interval in terms of the base time unit. For example, if the time unit is set to hours, then minute() should return 0.0166 (TIME_UNIT_MINUTE/TIME_UNIT_HOUR)

Link copied to clipboard

Returns the QObject at the supplied index in the queue.

Link copied to clipboard

Returns the QObject at the front of the queue Depending on the queue discipline this may not be the next QObject

Link copied to clipboard

Returns the QObject at the last index in the queue.

Link copied to clipboard

Returns a reference to the QObject representing the item that is next to be removed from the queue according to the queue discipline that was specified.

Link copied to clipboard
fun remove(condition: Predicate<Conveyor.ConveyorRequest>, waitStats: Boolean = waitTimeStatOption): MutableList<Conveyor.ConveyorRequest>
fun remove(predicate: (Conveyor.ConveyorRequest) -> Boolean, waitStats: Boolean = waitTimeStatOption): MutableList<Conveyor.ConveyorRequest>

Finds and removes all the QObjects in the Queue that satisfy the condition and adds them to the deletedItems collection

fun remove(index: Int, waitStats: Boolean = waitTimeStatOption): Conveyor.ConveyorRequest

Removes the element at the specified position in this queue. Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.

fun remove(qObj: Conveyor.ConveyorRequest, waitStats: Boolean = waitTimeStatOption): Boolean

Removes the first occurrence in the queue of the specified element Automatically collects waiting time statistics and number in queue statistics. If the queue does not contain the element then it is unchanged and false is returned

Link copied to clipboard
fun removeAll(statFlag: Boolean = waitTimeStatOption): Boolean

Removes from this queue all the elements.

fun removeAll(c: Collection<Conveyor.ConveyorRequest>, statFlag: Boolean = waitTimeStatOption): Boolean

Removes from this queue all the elements that are contained in the specified collection The collection should contain references to objects of type QObject that had been enqueued in this queue; otherwise, nothing will be removed.

fun removeAll(c: Iterator<Conveyor.ConveyorRequest>, statFlag: Boolean = waitTimeStatOption): Boolean

Removes from this queue all the elements that are presented by iterating through this iterator The iterator should be based on a collection that contains references to objects of type QObject that had been enqueued in this queue; otherwise, nothing will be removed.

Link copied to clipboard
fun removeAllAndTerminate(waitStats: Boolean = false, afterTermination: (entity: ProcessModel.Entity) -> Unit? = null)

Removes and terminates all the requests waiting in the queue

Link copied to clipboard
fun removeAndTerminate(request: Conveyor.ConveyorRequest, waitStats: Boolean = false, afterTermination: (entity: ProcessModel.Entity) -> Unit? = null)

Removes the request from the queue and tells the associated entity to terminate its process. The process that was suspended because the entity's request was placed in the queue is immediately terminated.

Link copied to clipboard

Removes the QObject at the front of the queue Uses remove(int index) where index = 0

Link copied to clipboard

Removes the QObject at the last index in the queue. Uses remove(int index) where index is the size of the list - 1

Link copied to clipboard

Removes the next item from the queue according to the queue discipline that was specified. Returns a reference to the QObject representing the item that was removed

Link copied to clipboard

Removes the supplied listener from this queue

Link copied to clipboard
fun second(): Double

Returns the value of a 1-second time interval in terms of the base time unit

Link copied to clipboard

Sets the after experiment option of all model elements (children) contained by this model element.

Sets the after replication flag of all model elements (children) contained by this model element.

Sets the before experiment option of all model elements (children) contained by this model element.

Sets the before replication flag of all model elements (children) contained by this model element.

Link copied to clipboard

Sets the initialization option of all model elements (children) contained by this model element.

Link copied to clipboard

Sets the monte carlo option flag of all model elements (children) contained by this model element.

Sets the end replication option flag of all model elements (children) contained by this model element. Determines whether the replicationEnded() method will be called

Link copied to clipboard

Sets the timed update option flag of all model elements (children) contained by this model element.

Link copied to clipboard

Sets the warm-up option flag of all model elements (children) contained by this model element.

Link copied to clipboard
Link copied to clipboard
open override fun toString(): String

Includes the model name, the id, the model element name, the parent name, and parent id

Link copied to clipboard
fun week(): Double

Returns the value of a 1-week time interval in terms of the base time unit