AnyLogic
Expand
Font size
All Implemented Interfaces:
AggregatableAnimationElement, HasLevel, IMarkupLibraryDescriptor, LevelElement, LevelMarkup, IElevatorDescriptor<A>, SVGElement, java.io.Serializable

public class Elevator<A extends Agent>
extends AbstractLevelMarkup
implements IElevatorDescriptor<A>
See Also:
Serialized Form

Nested Class Summary

Nested Classes 
static interface  Elevator.Call<T extends Agent>  
Modifier and Type Class Description

Constructor Summary

Constructors 
Elevator()  
Elevator​(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, double widthInMeters, double depthInMeters, double rotation, java.awt.Paint lineColor, java.awt.Paint fillColor, ElevatorDoorsCofiguration doorsCofiguration, IElevatorDescriptor<A> descriptor)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. It is public due to technical reasons.
Constructor Description

Method Summary

All Methods Instance Methods Concrete Methods 
void addObstaclesToLevels()  
boolean contains​(double px, double py)
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e.
void fail()  
Level[] getAccessibleLevels()  
BoundingRectangle getBoundingRectangle()  
double getCabinHeight()  
java.util.List<? extends Elevator.Call<A>> getCalls()  
int getCapacity()  
ElevatorDirection getCurrentDirection()  
double getDepth()  
double getDepth​(LengthUnits units)
Returns the depth of the markup shape.
ElevatorDoorsCofiguration getDoorsCofiguration()  
java.awt.Color getFillColor()  
IElevatorDescriptor<A> getLibraryDescriptor()  
java.awt.Color getLineColor()
Returns the line color of the markup element, or null if markup element has no line color or has textured line (in this case #getLineTexture() should be used instead)
Elevator<A> getMarkup()  
ElevatorMovementMode getMovementMode()  
java.util.Set<A> getPeds()  
double getRotation()
Returns the rotation of the shape.
double getSpeed()  
ElevatorState getState()  
double getTimePerFloor()  
java.awt.Color getWallColor()  
double getWallWidth()  
double getWidth()  
double getWidth​(LengthUnits units)
Returns the width of the markup shape.
double getX()
Returns the x coordinate of the markup element.
Point getXYZ()
Returns coordinates of the markup element.
double getY()
Returns the y coordinate of the markup element.
double getZ()
Returns the z coordinate of the markup element.
boolean isAllLevels()  
boolean isFailed()  
double meanWaitingTime​(Level level, TimeUnits units)  
double meanWaitingTime​(TimeUnits units)  
double minStayTime()  
int nDroppedOffPeds​(Level level)  
int nPickedUpPeds​(Level level)  
int nTransportedPeds()  
void onFailed()  
void onLevelArrival​(Level level, java.util.List<A> waitingAgents)  
void onLevelDeparture​(Level level)  
void onRepaired()  
java.awt.Color platformColor​(ElevatorState state)  
void repair()  
void resetStats()  
void setAccessibleLevels​(Level[] levels)  
void setAllLevels​(boolean allLevels)  
void setCabinHeight​(double height)  
void setCapacity​(int capacity)  
void setDepth​(double depth)  
void setDepth​(double depth, LengthUnits units)
Sets the depth of the markup shape.
void setDoorsCofiguration​(ElevatorDoorsCofiguration doorsCofiguration)  
void setFillColor​(java.awt.Paint fillColor)  
void setLineColor​(java.awt.Paint lineColor)
Sets the line color (or Texture) of the markup element.
void setMarkup​(Elevator<A> markup)  
void setMovementMode​(ElevatorMovementMode movementMode)  
void setRotation​(double rotation)
Sets the rotation of the shape.
void setSpeed​(double speed)  
void setTimePerFloor​(double timePerFloor)  
void setWallColor​(java.awt.Color color)  
void setWallWidth​(double width)  
void setWidth​(double width)  
void setWidth​(double width, LengthUnits units)
Sets the width of the markup shape.
void setX​(double x)
Sets the x coordinate of the markup element.
void setXYZ​(double x, double y, double z)
Sets coordinates of the markup element.
void setY​(double y)
Sets the y coordinate of the markup element.
void setZ​(double z)
Sets the z coordinate of the markup element.
double timeInState​(ElevatorState state, TimeUnits units)  
double totalTravelTime​(TimeUnits units)  
double utilization()  
Modifier and Type Method Description

Methods inherited from class com.anylogic.engine.markup.AbstractLevelMarkup

getDrawMode, getLevel, setLevel

Methods inherited from class com.anylogic.engine.markup.MarkupShape

error, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, isPublic, onClick, remove, setDrawMode, setOwner

Methods inherited from class com.anylogic.engine.markup.AbstractMarkup

discardOwner, executeUserAction, findSVGElement, getName, getSVGId, initializeInternal, isVisible, onAggregatorInitialized, onAggregatorVisibilityChanged, removeSVGFromOwner, resetSVGState, setVisible, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement

initializeInternal, onAggregatorVisibilityChanged, postInitialize

Methods inherited from interface com.anylogic.engine.markup.pedestrian.IElevatorDescriptor

setOwner

Constructor Detail

Elevator

public Elevator()

Elevator

@AnyLogicInternalCodegenAPI
public Elevator​(Agent owner,
                ShapeDrawMode drawMode,
                boolean isPublic,
                double x,
                double y,
                double z,
                double widthInMeters,
                double depthInMeters,
                double rotation,
                java.awt.Paint lineColor,
                java.awt.Paint fillColor,
                ElevatorDoorsCofiguration doorsCofiguration,
                IElevatorDescriptor<A> descriptor)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. It is public due to technical reasons.

Method Detail

getX

public double getX()
Returns the x coordinate of the markup element.
Returns:
the x coordinate of the markup element

setX

public void setX​(double x)
Sets the x coordinate of the markup element.
Parameters:
x - the new value of x coordinate

getY

public double getY()
Returns the y coordinate of the markup element.
Returns:
the y coordinate of the markup element

setY

public void setY​(double y)
Sets the y coordinate of the markup element.
Parameters:
y - the new value of y coordinate

getZ

public double getZ()
Returns the z coordinate of the markup element.
Returns:
the z coordinate of the markup element

setZ

public void setZ​(double z)
Sets the z coordinate of the markup element.
Parameters:
z - the new value of z coordinate

getXYZ

public Point getXYZ()
Returns coordinates of the markup element.
Returns:
coordinates of the markup element

setXYZ

public void setXYZ​(double x,
                   double y,
                   double z)
Sets coordinates of the markup element.
Parameters:
x - the new value of x coordinate
y - the new value of y coordinate
z - the new value of z coordinate

getWidth

public double getWidth​(LengthUnits units)
Returns the width of the markup shape.
Returns:
the width of the markup shape

setWidth

public void setWidth​(double width,
                     LengthUnits units)
Sets the width of the markup shape.
Parameters:
width - the new width of the markup shape
units - the units of length

getDepth

public double getDepth​(LengthUnits units)
Returns the depth of the markup shape.
Returns:
the depth of the markup shape

setDepth

public void setDepth​(double depth,
                     LengthUnits units)
Sets the depth of the markup shape.
Parameters:
depth - the new depth of the markup shape
units - the units of length

getRotation

public double getRotation()
Returns the rotation of the shape.
Returns:
the rotation of the shape in radians, clockwise

setRotation

public void setRotation​(double rotation)
Sets the rotation of the shape.
Parameters:
r - the new value of rotation in radians

setLineColor

public void setLineColor​(java.awt.Paint lineColor)
Sets the line color (or Texture) of the markup element.
Parameters:
lineColor - the new line color, null = do not draw the markup element line

getLineColor

public java.awt.Color getLineColor()
Returns the line color of the markup element, or null if markup element has no line color or has textured line (in this case #getLineTexture() should be used instead)
Returns:
the line color of the markup element

setFillColor

public void setFillColor​(java.awt.Paint fillColor)

getFillColor

public java.awt.Color getFillColor()

getCapacity

public int getCapacity()
Specified by:
getCapacity in interface IElevatorDescriptor<A extends Agent>
Returns:
the capacity

getAccessibleLevels

public Level[] getAccessibleLevels()
Specified by:
getAccessibleLevels in interface IElevatorDescriptor<A extends Agent>

getDoorsCofiguration

public ElevatorDoorsCofiguration getDoorsCofiguration()
Returns:
the doorsCofiguration

setAccessibleLevels

public void setAccessibleLevels​(Level[] levels)
Specified by:
setAccessibleLevels in interface IElevatorDescriptor<A extends Agent>

getLibraryDescriptor

@AnyLogicInternalAPI
public IElevatorDescriptor<A> getLibraryDescriptor()

addObstaclesToLevels

@AnyLogicInternalAPI
public void addObstaclesToLevels()

setMarkup

@AnyLogicInternalAPI
public void setMarkup​(Elevator<A> markup)
Specified by:
setMarkup in interface IElevatorDescriptor<A extends Agent>

getMarkup

@AnyLogicInternalAPI
public Elevator<A> getMarkup()

contains

public boolean contains​(double px,
                        double py)
Description copied from class: MarkupShape
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e. in the same system with the coordinates of this shape, x and y)
Specified by:
contains in class MarkupShape
Parameters:
px - the x coordinate relative to this shape's container
py - the y coordinate relative to this shape's container
Returns:
true if the shape contains the point with the given coordinates

getBoundingRectangle

@AnyLogicInternalAPI
public BoundingRectangle getBoundingRectangle()

getMovementMode

public ElevatorMovementMode getMovementMode()
Specified by:
getMovementMode in interface IElevatorDescriptor<A extends Agent>

getSpeed

public double getSpeed()
Specified by:
getSpeed in interface IElevatorDescriptor<A extends Agent>

getTimePerFloor

public double getTimePerFloor()
Specified by:
getTimePerFloor in interface IElevatorDescriptor<A extends Agent>

getWidth

public double getWidth()

setWidth

public void setWidth​(double width)

getDepth

public double getDepth()

setDepth

public void setDepth​(double depth)

setDoorsCofiguration

public void setDoorsCofiguration​(ElevatorDoorsCofiguration doorsCofiguration)

minStayTime

public double minStayTime()
Specified by:
minStayTime in interface IElevatorDescriptor<A extends Agent>

isAllLevels

public boolean isAllLevels()
Specified by:
isAllLevels in interface IElevatorDescriptor<A extends Agent>

platformColor

public java.awt.Color platformColor​(ElevatorState state)
Specified by:
platformColor in interface IElevatorDescriptor<A extends Agent>

getCabinHeight

public double getCabinHeight()
Specified by:
getCabinHeight in interface IElevatorDescriptor<A extends Agent>

getWallWidth

public double getWallWidth()
Specified by:
getWallWidth in interface IElevatorDescriptor<A extends Agent>

getWallColor

public java.awt.Color getWallColor()
Specified by:
getWallColor in interface IElevatorDescriptor<A extends Agent>

setCapacity

public void setCapacity​(int capacity)
Specified by:
setCapacity in interface IElevatorDescriptor<A extends Agent>

setMovementMode

public void setMovementMode​(ElevatorMovementMode movementMode)
Specified by:
setMovementMode in interface IElevatorDescriptor<A extends Agent>

setSpeed

public void setSpeed​(double speed)
Specified by:
setSpeed in interface IElevatorDescriptor<A extends Agent>

setTimePerFloor

public void setTimePerFloor​(double timePerFloor)
Specified by:
setTimePerFloor in interface IElevatorDescriptor<A extends Agent>

setAllLevels

public void setAllLevels​(boolean allLevels)
Specified by:
setAllLevels in interface IElevatorDescriptor<A extends Agent>

setCabinHeight

public void setCabinHeight​(double height)
Specified by:
setCabinHeight in interface IElevatorDescriptor<A extends Agent>

setWallWidth

public void setWallWidth​(double width)
Specified by:
setWallWidth in interface IElevatorDescriptor<A extends Agent>

setWallColor

public void setWallColor​(java.awt.Color color)
Specified by:
setWallColor in interface IElevatorDescriptor<A extends Agent>

getState

public ElevatorState getState()
Specified by:
getState in interface IElevatorDescriptor<A extends Agent>

getPeds

public java.util.Set<A> getPeds()
Specified by:
getPeds in interface IElevatorDescriptor<A extends Agent>

getCurrentDirection

public ElevatorDirection getCurrentDirection()
Specified by:
getCurrentDirection in interface IElevatorDescriptor<A extends Agent>

getCalls

public java.util.List<? extends Elevator.Call<A>> getCalls()
Specified by:
getCalls in interface IElevatorDescriptor<A extends Agent>

fail

public void fail()
Specified by:
fail in interface IElevatorDescriptor<A extends Agent>

repair

public void repair()
Specified by:
repair in interface IElevatorDescriptor<A extends Agent>

isFailed

public boolean isFailed()
Specified by:
isFailed in interface IElevatorDescriptor<A extends Agent>

onLevelArrival

public void onLevelArrival​(Level level,
                           java.util.List<A> waitingAgents)
Specified by:
onLevelArrival in interface IElevatorDescriptor<A extends Agent>

onLevelDeparture

public void onLevelDeparture​(Level level)
Specified by:
onLevelDeparture in interface IElevatorDescriptor<A extends Agent>

onFailed

public void onFailed()
Specified by:
onFailed in interface IElevatorDescriptor<A extends Agent>

onRepaired

public void onRepaired()
Specified by:
onRepaired in interface IElevatorDescriptor<A extends Agent>

resetStats

public void resetStats()
Specified by:
resetStats in interface IElevatorDescriptor<A extends Agent>

timeInState

public double timeInState​(ElevatorState state,
                          TimeUnits units)
Specified by:
timeInState in interface IElevatorDescriptor<A extends Agent>

utilization

public double utilization()
Specified by:
utilization in interface IElevatorDescriptor<A extends Agent>

totalTravelTime

public double totalTravelTime​(TimeUnits units)
Specified by:
totalTravelTime in interface IElevatorDescriptor<A extends Agent>

meanWaitingTime

public double meanWaitingTime​(TimeUnits units)
Specified by:
meanWaitingTime in interface IElevatorDescriptor<A extends Agent>

meanWaitingTime

public double meanWaitingTime​(Level level,
                              TimeUnits units)
Specified by:
meanWaitingTime in interface IElevatorDescriptor<A extends Agent>

nPickedUpPeds

public int nPickedUpPeds​(Level level)
Specified by:
nPickedUpPeds in interface IElevatorDescriptor<A extends Agent>

nDroppedOffPeds

public int nDroppedOffPeds​(Level level)
Specified by:
nDroppedOffPeds in interface IElevatorDescriptor<A extends Agent>

nTransportedPeds

public int nTransportedPeds()
Specified by:
nTransportedPeds in interface IElevatorDescriptor<A extends Agent>
How can we improve this article?