Entity
An entity is something that can experience processes and as such may wait in queue. It is a subclass of QObject. The general approach is to use the process() function to define a process that a subclass of Entity can follow. Entity instances may use resources, signals, hold queues, etc. as shared mutable state. Entities may follow a process sequence if defined.
Parameters
an optional name for the entity
Properties
A reference to an object that can be attached to the QObject when queued
Controls whether the entity goes through the function dispose() of its containing ProcessModel. The default is true.
The time that the QObject was created
The receiver that last received the qObject
The current simulation time. Attached to the queue object for convenience of checking time outside of model element instances.
True if a process has been scheduled to activate
If not null, the name of the process scheduled to activate
Sets the priority to the supplied value If the QObject is queued, the queue's changePriority() method is called (possibly causing a reordering of the queue) which may cause significant reordering overhead otherwise the priority is directly changed Changing this value only changes how the QObjects are compared and may or may not change how they are ordered in the queue, depending on the queue discipline used
Provides a list of processes for the entity to follow before being disposed
An iterator over the entity's current process sequence. If a process sequence is supplied and the property useProcessSequence is true then the iterator is used to determine the next process for the entity to execute.
A generic attribute to indicate a type for the QObject
This method can be used to get direct access to the State that represents when the object was queued. This allows access to the total time in the queued state as well as other statistical accumulation of state statistics
Something that knows how to send qObjects to receivers
The time that the QObject was LAST enqueued
The time that the QObject LAST exited a queue
The time that the QObject spent in the Queue based on the LAST time dequeued
Controls whether the entity uses an assigned process sequence via the processSequence property at the end of successfully completing a process to determine the next process to experience. The default is true.
Allows for a generic value to be held by the QObject
The default velocity for the entity's movement within the spatial model of its ProcessModel
Functions
A string representation of the allocations held by the entity. Useful for printing and diagnostics.
Allows the adding (attaching) of an observer to the observable
Returns a negative integer, zero, or a positive integer if this object is less than, equal to, or greater than the specified object.
Returns how many observers are currently attached to the observable
Facilitates the creation of requests for the entity by clients that have access to a reference to the entity or via the entity itself.
Detaches all the observers from the observable
Allows the deletion (removing) of an observer from the observable
Returns true if the observer is already attached
Computes the number of different allocations of the resource held by the entity.
If the entity is executing a process and the process is suspended, then the process is scheduled to resume at the current simulation time.
Facilitates SAM setting with a lambda
If the entity is executing a process and the process is suspended, then the process routine is terminated. This causes the currently suspended process to exit, essentially with an error condition. No further processing within the process will execute. The process ends (is terminated). All resources that the entity has allocated will be deallocated. If the entity was waiting in a queue, the entity is removed from the queue and no statistics are collected on its queueing. If the entity is experiencing a delay, then the event associated with the delay is cancelled.
Computes the total number of units of the specified resource that are allocated to the entity.
Facilitates SAM setting with a lambda