public class SpatialProcessQueue<P extends SimProcess> extends ProcessQueue<P> implements SpatialObject, VisibleObject
desmoj.core.simulator.ProcessQueue<P>
with spatial functionalities.
Every SpatialProcessQueue is associated with a spatial position and orientation.QueueBased.QueueAction
FIFO, LIFO, RANDOM, UNDEFINED
Constructor and Description |
---|
SpatialProcessQueue(Model owner,
java.lang.String name,
java.lang.String visualModel,
boolean showInReport,
boolean showInTrace,
Length startPositionX,
Length startPositionY,
Length startPositionZ)
Constructs a SpatialProcessQueue at the specific position.
|
SpatialProcessQueue(Model owner,
java.lang.String name,
java.lang.String visualModel,
int sortOrder,
int qCapacity,
boolean showInReport,
boolean showInTrace,
Length startPositionX,
Length startPositionY,
Length startPositionZ)
Constructs a SpatialProcessQueue at the specific position.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntryPoint(java.lang.String name,
Length xPos,
Length yPos,
Length zPos)
Adds an entry point to this SpatialObject.
|
void |
addExitPoint(java.lang.String name,
Length xPos,
Length yPos,
Length zPos)
Adds an exit point to this SpatialObject.
|
Length[] |
getEntryPoint(java.lang.String name)
Gets the position of the given entry point.
|
Length[] |
getEntryPointGlobal(java.lang.String name)
Gets the position of the entry point in global coordinates.
|
java.util.Set<java.lang.String> |
getEntryPointNames()
Gets a set of names of all the entry points this SpatialObject contains.
|
Length[] |
getExitPoint(java.lang.String name)
Gets the position of the given exit point.
|
Length[] |
getExitPointGlobal(java.lang.String name)
Gets the position of the exit point in global coordinates.
|
java.util.Set<java.lang.String> |
getExitPointNames()
Gets a set of names of all the exit points this SpatialObject contains.
|
Matrix4d |
getMatrix()
Gets a 4x4 double matrix object which contains the spatial data of the SpatialObejct.
|
Length |
getPosX() |
Length |
getPosY() |
Length |
getPosZ() |
java.lang.String |
getVisualModel()
Get the type of the SpatialObject.
|
boolean |
isMovable()
Check whether this Object is a MovableSpatialObject or not.
|
boolean |
isVisible()
Shows the visibility of the visual representation of this object.
|
void |
removeVisible()
Sends a RemoveEvent to signal the observers that this object isn't
needed anymore.
|
void |
resetRotation()
Resets the rotation of the object.
|
void |
rotX(double angle)
Adds a rotation about the x-axis to the current orientation.
|
void |
rotY(double angle)
Adds a rotation about the y-axis to the current orientation.
|
void |
rotZ(double angle)
Adds a rotation about the z-axis to the current orientation.
|
void |
setPosition(Length x,
Length y,
Length z)
It sets the new position for the object
|
void |
setVisible(boolean visible)
Sets the visibility of the visual representation of this object.
|
contains, createDefaultReporter, first, first, get, get, getQueueList, getQueueStrategy, getRefused, insert, insertAfter, insertBefore, isEmpty, iterator, last, last, pred, pred, remove, remove, removeAll, removeFirst, removeFirst, removeLast, removeLast, reset, setQueueCapacity, setQueueStrategy, setRefused, size, succ, succ
addObserver, averageLength, averageWaitTime, deleteObserver, getQueueLimit, length, maxLength, maxLengthAt, maxWaitTime, maxWaitTimeAt, minLength, minLengthAt, notifyObservers, setQueueImpWarning, stdDevLength, stdDevWaitTime, zeroWaits
getCorrespondingSchedulable, getDescription, getObservations, getReporter, incrementObservations, incrementObservations, reportIsOn, reportOff, reportOn, resetAt, setCorrespondingSchedulable, setDescription, setReporter
current, currentEntity, currentEntityAll, currentEvent, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn
getName, getQuotedName, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName
public SpatialProcessQueue(Model owner, java.lang.String name, java.lang.String visualModel, boolean showInReport, boolean showInTrace, Length startPositionX, Length startPositionY, Length startPositionZ)
desmoj.core.simulator.ProcessQueue<P>
owner
- The model this process-queue is associated to.name
- The process-queue's name.visualModel
- The visual model attribute belongs to the SpatialObject interface.showInReport
- Flag if process-queue should produce a report.showInTrace
- Flag for process-queue to produce trace messages.public SpatialProcessQueue(Model owner, java.lang.String name, java.lang.String visualModel, int sortOrder, int qCapacity, boolean showInReport, boolean showInTrace, Length startPositionX, Length startPositionY, Length startPositionZ)
desmoj.core.simulator.ProcessQueue<P>
owner
- The model this process-queue is associated to.name
- The process-queue's name.visualModel
- The visual model attribute belongs to the SpatialObject interface.sortOrder
- determines the sort order of the underlying queue implementation.
Choose a constant from QueueBased like QueueBased.FIFO or QueueBased.LIFO or ...qCapacity
- The capacity of the ProcessQueue, that is how many processes can
be enqueued. Zero (0) means unlimited capacity.showInReport
- Flag if process-queue should produce a report.showInTrace
- Flag for process-queue to produce trace messages.public void addEntryPoint(java.lang.String name, Length xPos, Length yPos, Length zPos)
SpatialObject
addEntryPoint
in interface SpatialObject
name
- The name of this entry point.xPos
- The x-position of this entry point in local coordinates.yPos
- The y-position of this entry point in local coordinates.zPos
- The z-position of this entry point in local coordinates.public void addExitPoint(java.lang.String name, Length xPos, Length yPos, Length zPos)
SpatialObject
addExitPoint
in interface SpatialObject
name
- The name of this exit point.xPos
- The x-position of this exit point in local coordinates.yPos
- The y-position of this exit point in local coordinates.zPos
- The z-position of this exit point in local coordinates.public java.util.Set<java.lang.String> getEntryPointNames()
SpatialObject
getEntryPointNames
in interface SpatialObject
public java.util.Set<java.lang.String> getExitPointNames()
SpatialObject
getExitPointNames
in interface SpatialObject
public Length[] getEntryPoint(java.lang.String name)
SpatialObject
getEntryPoint
in interface SpatialObject
name
- The name of the entry point.public Length[] getEntryPointGlobal(java.lang.String name)
SpatialObject
getEntryPointGlobal
in interface SpatialObject
name
- The name of the entry point.public Length[] getExitPoint(java.lang.String name)
SpatialObject
getExitPoint
in interface SpatialObject
name
- The name of the exit point.public Length[] getExitPointGlobal(java.lang.String name)
SpatialObject
getExitPointGlobal
in interface SpatialObject
name
- The name of the exit point.public Matrix4d getMatrix()
SpatialObject
getMatrix
in interface SpatialObject
public Length getPosX()
getPosX
in interface SpatialObject
public Length getPosY()
getPosY
in interface SpatialObject
public Length getPosZ()
getPosZ
in interface SpatialObject
public java.lang.String getVisualModel()
VisibleObject
getVisualModel
in interface VisibleObject
public boolean isMovable()
SpatialObject
isMovable
in interface SpatialObject
public boolean isVisible()
VisibleObject
isVisible
in interface VisibleObject
public void removeVisible()
VisibleObject
removeVisible
in interface VisibleObject
public void resetRotation()
SpatialObject
resetRotation
in interface SpatialObject
public void rotX(double angle)
SpatialObject
rotX
in interface SpatialObject
angle
- The rotation angle in radianspublic void rotY(double angle)
SpatialObject
rotY
in interface SpatialObject
angle
- The rotation angle in radianspublic void rotZ(double angle)
SpatialObject
rotZ
in interface SpatialObject
angle
- The rotation angle in radianspublic void setPosition(Length x, Length y, Length z)
SpatialObject
setPosition
in interface SpatialObject
x
- The ExtendedLength which contains the new x-position.y
- The ExtendedLength which contains the new y-position.z
- The ExtendedLength which contains the new z-position.public void setVisible(boolean visible)
VisibleObject
setVisible
in interface VisibleObject
visible
- True, if visible. Else, false.