public abstract class XRaySystem extends PhysicalObject implements DirectlyUpdatable, Openable
XRaySensor and some physical objects (i.e. conveyer belts)
around it.| Modifier and Type | Field and Description |
|---|---|
private Passenger[] |
collectPassengers
The collect passenger.
|
private Passenger[] |
dropOffPassengers
The drop off passenger.
|
private Position |
enterPosition
The enter position.
|
private boolean |
isOpen
The system is open or closed.
|
private Position |
leavePosition
The leave position.
|
private Position[] |
luggageCollectPositions
The collect position for bags.
|
private Position[] |
luggageDropOffPositions
The drop off position for bags.
|
private Position |
luggageEndPosition
The ending position of the luggage.
|
private java.util.Collection<Luggage> |
luggageInSystem
The luggage that is in the system.
|
private Position |
luggageStartPosition
The starting position of the luggage.
|
private Vector |
moveLuggageVector
The vector point in the direction of the luggage end position, from the
luggage start position.
|
private boolean |
paused
The system is paused.
|
private XRaySensor |
xray
The
XRaySensor. |
shapepositionmap| Constructor and Description |
|---|
XRaySystem(java.util.List<Position> systemCornerPoints,
XRaySensor sensor,
Position luggageStart,
Position luggageEnd)
Creates an x-ray system from a set of corner points.
|
XRaySystem(java.util.List<Position> systemCornerPoints,
XRaySensor sensor,
Position luggageStart,
Position luggageEnd,
boolean otherWayAround)
Creates an x-ray system from a set of corner points.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBaggage(Luggage luggage)
Adds luggage to the system at the
luggageStartPosition. |
boolean |
collectBaggage(Luggage bag)
Collect
Luggage from the system. |
java.util.Collection<Luggage> |
getBaggageInSystem()
Gets the luggage in the system.
|
Passenger |
getCollectPassenger(int position)
Gets the collect passenger.
|
Position |
getCollectPosition(int position)
Gets the luggage collect position.
|
Passenger |
getDropOffPassenger(int index)
Gets the drop off passenger.
|
Position |
getDropOffPosition(int index)
Gets the luggage drop off position.
|
Position |
getEnterPosition()
Gets the enter position for passengers of the system.
|
Position |
getLeavePosition()
Gets the leave position for passengers of the system.
|
int |
getNextCollectIndex()
Gets the next collect index.
|
int |
getNextDropOffIndex()
Gets the next drop off index.
|
int |
getNumberOfCollectIndices()
Gets the number of collect places for passengers.
|
int |
getNumberOfDropoffIndices()
Gets the number of drop off places for passengers.
|
XRaySensor |
getXRaySensor()
Gets the
XRaySensor. |
boolean |
isOpen()
Is open or not.
|
void |
pauseSystem(boolean paused)
Pauses or unpaused the system.
|
void |
removeBaggage(Luggage luggage)
Removes
Luggage from the system and returns it to the
HumanAgent that owns the luggage. |
void |
setCollectPassenger(Passenger collectPassenger,
int index)
Sets the collect passenger.
|
void |
setDropOffPassenger(Passenger dropOffPassenger,
int index)
Sets the drop off passenger.
|
void |
setOpen(boolean isOpen)
Sets open.
|
void |
update(int timeStep)
Updates the updatable element.
|
contains, contains, generatePosition, generatePosition, generatePositions, generatePositions, getCorners, getVectorToPosition, isCollision, isLineCollision, toStringgetDistance, getPositionisDestroyedprivate Position[] luggageCollectPositions
private Position[] luggageDropOffPositions
private Position luggageEndPosition
private java.util.Collection<Luggage> luggageInSystem
private Position luggageStartPosition
private Vector moveLuggageVector
private XRaySensor xray
XRaySensor.private Passenger[] dropOffPassengers
private Passenger[] collectPassengers
private boolean paused
private boolean isOpen
private Position leavePosition
private Position enterPosition
public XRaySystem(java.util.List<Position> systemCornerPoints, XRaySensor sensor, Position luggageStart, Position luggageEnd)
systemCornerPoints - The corner points of the system.sensor - The sensor.luggageStart - The starting position of the luggage.luggageEnd - The ending position of the luggage.public XRaySystem(java.util.List<Position> systemCornerPoints, XRaySensor sensor, Position luggageStart, Position luggageEnd, boolean otherWayAround)
systemCornerPoints - The corner points of the system.sensor - The sensor.luggageStart - The starting position of the luggage.luggageEnd - The ending position of the luggage.otherWayAround - An mirrored x-ray or not.public void addBaggage(Luggage luggage)
luggageStartPosition.luggage - The luggage.public boolean collectBaggage(Luggage bag)
Luggage from the system.bag - The bag.public java.util.Collection<Luggage> getBaggageInSystem()
public Passenger getCollectPassenger(int position)
position - The position.public Position getCollectPosition(int position)
position - The index.public Passenger getDropOffPassenger(int index)
index - The index.public Position getDropOffPosition(int index)
index - The index.public Position getEnterPosition()
public Position getLeavePosition()
public int getNextCollectIndex()
public int getNextDropOffIndex()
public int getNumberOfCollectIndices()
public int getNumberOfDropoffIndices()
public XRaySensor getXRaySensor()
XRaySensor.public boolean isOpen()
Openablepublic void pauseSystem(boolean paused)
paused - True if it is paused, false otherwise.public void removeBaggage(Luggage luggage)
Luggage from the system and returns it to the
HumanAgent that owns the luggage.luggage - The luggage.public void setCollectPassenger(Passenger collectPassenger, int index)
collectPassenger - The passenger.index - The index.public void setDropOffPassenger(Passenger dropOffPassenger, int index)
dropOffPassenger - The passenger.index - The index.public void setOpen(boolean isOpen)
Openable