SingleQStation

open class SingleQStation(parent: ModelElement, activityTime: RandomIfc, resource: SResource? = null, nextReceiver: QObjectReceiverIfc = NotImplementedReceiver, name: String? = null) : Station, SingleQStationCIfc

Models a simple work station that has a single queue for holding received qObjects for processing and a simple resource that is used during the processing.

A QObject may have an object that implements the GetValueIfc attached. If so, the current value from this object is used as the processing time at the station. If not attached, then the specified processing time for the station will be used. Thus, a processed QObject instance can bring its own processing time. In addition, a QObject may have an instance of a QObjectSenderIfc interface attached. If one is attached, the sender will be used to determine where to send the qObject. If a sender is not attached, then the specified next receiver will be used. Thus, a processed QObject instance can determine where it goes to next after processing.

Parameters

parent

the model element serving as this element's parent

activityTime

the processing time at the station

resource

the resource to use at the station. The default of null will cause a resource of capacity 1 to be created and used at the station

nextReceiver

the receiving location that will receive the processed qObjects once the processing has been completed. A default of NotImplementedReceiver, indicates that there is no receiver implemented. If no receiver is present, there will be a run-time error.

name

the name of the station

Constructors

Link copied to clipboard
constructor(parent: ModelElement, activityTime: RandomIfc, resource: SResource? = null, nextReceiver: QObjectReceiverIfc = NotImplementedReceiver, name: String? = null)

Properties

Link copied to clipboard
open override val activityTimeRV: RandomSourceCIfc
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

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

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

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

Link copied to clipboard
open override val isQueueEmpty: Boolean

Indicates if the queue is empty.

Link copied to clipboard
open override val isQueueNotEmpty: Boolean

Indicates if the queue is not empty

Link copied to clipboard
open override val isResourceAvailable: Boolean

Indicates if the resource has units available.

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
open override val numAtStation: TWResponseCIfc
Link copied to clipboard

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

Link copied to clipboard
open override val numProcessed: CounterCIfc
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

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

Link copied to clipboard
open override val resource: SResourceCIfc
Link copied to clipboard

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

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 val stationTime: ResponseCIfc
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
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

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 day(): Double

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

Link copied to clipboard

Specifies an action to occur when a QObject instance enters the station. The action occurs immediately after entering the station. That is, the QObject is considered within the station.

Link copied to clipboard

Specifies an action to occur when a QObject instance exits the station. The action occurs immediately before being sent to the next receiver. That is, the QObject is considered to have exited the station.

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

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

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

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

Sets the receiver of qObject instances from this station

Link copied to clipboard
open fun onEntry(arrivingQObject: ModelElement.QObject)

This function can be overridden to provide logic upon entry to the station. The action occurs immediately after entering the station. That is, the QObject is considered within the station. If an entry action is provided, this function occurs immediately after the entry action but before any other logic. To be used by subclasses.

Link copied to clipboard
open fun onExit(completedQObject: ModelElement.QObject)

This function can be overridden to provide logic upon exit from the station before being sent to the next receiver. If an exit action is provided, this function executes immediately after the exit action.

Link copied to clipboard
override fun receive(arrivingQObject: ModelElement.QObject)
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
fun sender(sender: QObjectSenderIfc?)

Can be used to supply a sender that will be used instead of the default behavior. The default behavior uses a sender attached to the QObject instance and if not attached will send the QObject to the next receiver.

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
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