Package com.anylogic.engine.markup
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.markup.AbstractLevelMarkup
- Methods inherited from class com.anylogic.engine.markup.MarkupShape
- Methods inherited from class com.anylogic.engine.markup.AbstractMarkup
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.AbstractPositionalMarkup
- Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement
- Methods inherited from interface com.anylogic.engine.markup.pedestrian.IElevatorDescriptor
- Methods inherited from interface com.anylogic.engine.presentation.SVGElement
- Methods inherited from interface com.anylogic.engine.presentation.UsdElement
- Constructor Details
- Method Details
- getX
- getZ
- setX
- getY
- setY
- getXYZ
- setXYZ
- getCabinZ
- getWidth
- getWidth
- setWidth
- setWidth
- getDepth
- getDepth
- setDepth
- setDepth
- getRotation
- setRotation
- setWallColor
- getWallColor
- getWallTexture
- setPlatformColor
- getPlatformColor
- getPlatformTexture
- getLinePaint
- getFillPaint
- getCapacity
- accessibleLevels
- getDoorsConfiguration
- addAccessibleLevels
- getLibraryDescriptor
- addToLevels
- getShafts
- setMarkup
- getMarkup
- contains
- getBoundingRectangle
- getMovementMode
- getSpeed
- getSpeed
- getTimePerLevel
- getTimePerLevel
- getCabinHeight
- setCabinHeight
- getLineWidth
- setLineWidth
- setDoorsConfiguration
- minStayTime
- minStayTime
- isAllLevels
- setCapacity
- setMovementMode
- setSpeed
- setSpeed
- setTimePerLevel
- setTimePerLevel
- setAllLevels
- isDrawShaft
- setDrawShaft
- getState
- getPeds
- getCurrentDirection
- getCurrentLevel
- getCalls
- getRoute
- getWaitingPeds
- getWaitingPeds
- disableDoor
- enableDoor
- isDoorEnabled
- fail
- repair
- isFailed
- onArrival
- onDeparture
- onFailed
- onRepaired
- resetStats
- timeInState
- timeInState
- utilization
- totalTravelTime
- totalTravelTime
- meanWaitingTime
- meanWaitingTime
- meanWaitingTime
- meanWaitingTime
- nPickedUpPeds
- nDroppedOffPeds
- nTransportedPeds
- setManualMode
- isManualMode
- moveTo
- moveTo
- pickUpPeds
- dropOffPeds
- getTargetLevel
- deleteCallsOnLevel
- onStateChanged
- getPedTargetLevel
- getNearestLevel
- setVisible
- isShaftsInitialized_xjal
- java.lang.Object
- com.anylogic.engine.markup.AbstractMarkup
- com.anylogic.engine.markup.MarkupShape
- com.anylogic.engine.markup.AbstractLevelMarkup
- com.anylogic.engine.markup.Elevator<A>
- All Implemented Interfaces:
AbstractPositionalMarkup,AggregatableAnimationElement,HasBoundingRectangle,HasLevel,IMarkupLibraryDescriptor,LevelElement,LevelMarkup,IElevatorDescriptor<A>,SVGElement,UsdElement,Serializable
public class Elevator<A extends Agent> extends AbstractLevelMarkup implements HasBoundingRectangle, IElevatorDescriptor<A>, AbstractPositionalMarkup
- See Also:
- Serialized Form
| Modifier and Type | Class | Description |
|---|---|---|
static interface | Elevator.Call<T extends Agent> |
Class describing elevator call at certain level
|
| Constructor | Description |
|---|---|
Elevator() | |
Elevator |
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. |
| Modifier and Type | Method | Description |
|---|---|---|
Level[] | accessibleLevels() |
Returns array of levels, which can be served by elevator
|
void | addAccessibleLevels |
Adds levels that can be served by elevator.
|
void | addToLevels() |
Used when elevator markup is created by code - adds elevator to all its
levels as an obstacle and adds shafts.
|
boolean | contains |
Test if the shape contains the point with the given coordinates (relative
to this shape's container, i.e.
|
void | deleteCallsOnLevel |
Removes all pickup tasks from the level.
|
void | disableDoor |
Disables elevator door on the level.
|
void | dropOffPeds |
Starts drop off for the pedestrians in the list.
|
void | enableDoor |
Enables elevator door on the level.
|
void | fail() |
Initiates the elevator's failure.
|
BoundingRectangle | getBoundingRectangle() | |
double | getCabinHeight |
Returns elevator cabin height
|
double | getCabinZ() | |
List<? extends Elevator.Call<A>> | getCalls() |
Returns list of elevator calls
|
int | getCapacity() |
Returns the number of pedestrian elevator can transfer at once
|
ElevatorDirection | getCurrentDirection() |
Returns current movement direction of the elevator.
|
Level | getCurrentLevel() |
Returns elevator current level.
|
double | getDepth() |
Returns the depth of the markup shape, in meters.
|
double | getDepth |
Returns the depth of the markup shape.
|
ElevatorDoorsConfiguration | getDoorsConfiguration() |
Returns elevator doors configuration.
|
Paint | getFillPaint() | |
IElevatorDescriptor<A> | getLibraryDescriptor() | |
Paint | getLinePaint() | |
double | getLineWidth() |
Returns elevator line width (in pixels)
|
Elevator<A> | getMarkup() | |
ElevatorMovementMode | getMovementMode() |
Returns elevator movement mode.
|
Level | getNearestLevel() |
Returns nearest level level - current level if elevator is not between
levels, next level along direction if elevator is moving and closest
otherwise.
|
Set<A> | getPeds() |
Returns the list of pedestrians that are currently inside elevator
|
Level | getPedTargetLevel |
Returns target level of a pedestrian, specified in PedElevator block.
|
Color | getPlatformColor() |
Returns the platform color of the elevator markup, or
null if
markup element has no platform color or has textured platform (in this case
getPlatformTexture() should be used instead) |
Texture | getPlatformTexture() |
Returns the platform texture of the elevator markup, or
null if
markup element has no platform texture (in this case
getPlatformColor() should be used instead) |
double | getRotation() |
Returns the rotation of the shape.
|
List<Level> | getRoute() |
Returns the list of levels which the elevator is going to visit according to current tasks.
|
List<ElevatorShaft> | getShafts() | |
double | getSpeed() |
Returns elevator speed.
|
double | getSpeed |
Returns elevator speed
|
ElevatorState | getState() |
Returns current elevator state
|
Level | getTargetLevel() |
Returns target level when the elevator is in manual mode and moving,
null otherwise. |
double | getTimePerLevel() |
Returns time to move between two neighboring levels
|
double | getTimePerLevel |
Returns time to move between two neighboring levels
|
Set<A> | getWaitingPeds() |
Returns set of pedestrians waiting for elevator on all levels
|
Set<A> | getWaitingPeds |
Returns set of pedestrians waiting for elevator on the level
|
Color | getWallColor() |
Returns the wall color of the elevator markup, or
null if markup
element has no wall color or has textured wall (in this case
getWallTexture() should be used instead) |
Texture | getWallTexture() |
Returns the wall texture of the elevator markup, or
null if
markup element has no wall texture (in this case getWallColor()
should be used instead) |
double | getWidth() |
Returns the width of the markup shape, in meters.
|
double | getWidth |
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() |
This method shouldn't be called by user
(is public due to technical reasons) |
boolean | isAllLevels() |
Returns
true if elevator supposed to serve all levels in owner
agent, false otherwise |
boolean | isDoorEnabled |
Returns
true if the door on the level is enabled, false
otherwise. |
boolean | isDrawShaft() |
Returns
true if the elevator's shaft is drawn, otherwise returns
false. |
boolean | isFailed() |
Returns
true if the elevator failed (broke down) and is not
operating, otherwise returns false. |
boolean | isManualMode() |
Returns
true if the elevator is in manual mode, false
otherwise. |
boolean | isShaftsInitialized_xjal() | |
double | meanWaitingTime() |
Returns mean time (in model time units) pedestrian spent waiting for elevator
on all levels
|
double | meanWaitingTime |
Returns mean time (in model time units) pedestrian spent waiting for elevator
on specified level
|
double | meanWaitingTime |
Returns mean time (in units) pedestrian spent waiting for elevator on
specified level
|
double | meanWaitingTime |
Returns mean time (in units) pedestrian spent waiting for elevator on all
levels
|
double | minStayTime() |
Returns minimum time elevator will spend on the level before moving further.
|
double | minStayTime |
Returns minimum time elevator will spend on the level before moving further.
|
void | moveTo |
Sends the elevator to specified level.
|
void | moveTo |
Sends the elevator to specified level.
|
int | nDroppedOffPeds |
Returns number of pedestrians elevator dropped off at specified level
|
int | nPickedUpPeds |
Returns number of pedestrians elevator picked up at specified level
|
int | nTransportedPeds() |
Returns number of pedestrians transported by the elevator
|
void | onArrival |
Calls
onArrival() code of the elevator |
void | onDeparture |
Calls
onDeparture() code of the elevator |
void | onFailed() |
Calls
onFailed() code of the elevator |
void | onRepaired() |
Calls
onRepaired() code of the elevator |
void | onStateChanged |
Calls
onStateChanged() code of the elevator. |
void | pickUpPeds |
Starts pickup for the pedestrians in the list.
|
void | repair() |
Repairs the elevator.
|
void | resetStats() |
Resets all elevator statistics.
|
void | setAllLevels |
Sets whether elevator should serve all levels in owner agent
|
void | setCabinHeight |
Sets elevator cabin height
|
void | setCapacity |
Sets elevator capacity
|
void | setDepth |
Sets the depth of the markup shape.
|
void | setDepth |
Sets the depth of the markup shape.
|
void | setDoorsConfiguration |
Sets elevator doors configuration.
|
void | setDrawShaft |
Sets whether elevator's shaft should be drawn.
|
void | setLineWidth |
Sets elevator line width (in pixels)
|
void | setManualMode |
Changes current mode of the elevator.
|
void | setMarkup | |
void | setMovementMode |
Sets elevator movement mode.
|
void | setPlatformColor |
Sets the platform color (or
Texture) of the elevator markup. |
void | setRotation |
Sets the rotation of the shape.
|
void | setSpeed |
Sets elevator speed.
|
void | setSpeed |
Sets elevator speed.
|
void | setTimePerLevel |
Sets elevator time per level.
|
void | setTimePerLevel |
Sets time per level.
|
void | setVisible |
Sets the visibility of the markup element.
|
void | setWallColor |
Sets the wall color (or
Texture) of the elevator markup. |
void | setWidth |
Sets the width of the markup shape.
|
void | setWidth |
Sets the width of the markup shape.
|
void | setX |
Sets the x coordinate of the markup element.
|
void | setXYZ |
Sets coordinates of the markup element.
|
void | setY |
Sets the y coordinate of the markup element.
|
double | timeInState |
Returns time (in model time units) elevator spent in specified state since
model start or since last
resetStats() call |
double | timeInState |
Returns time (in units) elevator spent in specified state since model start
or since last
resetStats() call |
double | totalTravelTime() |
Returns total time (in model time units) elevator was moving since model
start or since last
resetStats() call |
double | totalTravelTime |
Returns total time (in units) elevator was moving since model start or since
last
resetStats() call |
double | utilization() |
Returns the elevator utilization: the fraction of time the elevator was
operating.
|
error, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, isOnly3D, isPublic, onClick, remove, setDrawMode, setOwnerdiscardOwner, executeUserAction, findSVGElement, getGroupOrOwner, getInspect, getInspectionWindowString, getName, getOrGenerateUSDId, getSVGComponent, getSVGId, initializeInternal, isVisible, onAggregatorInitialized, onAggregatorVisibilityChanged, removeSVGFromOwner, resetSVGState, setInspect, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGPropertiesexecuteUserAction, findSVGElement, getGroupOrOwner, getPresentable, getSVGComponent, getSVGId, isOnly3D, removeSVGFromOwner, resetSVGState, updateSVGPropertiespublic Elevator()
@AnyLogicInternalCodegenAPI public Elevator(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double widthInMeters, double depthInMeters, double cabinHeightInMeters, double lineWidth, double rotation, Paint lineColor, Paint fillColor, boolean drawShaft, ElevatorDoorsConfiguration doorsConfiguration, 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.
it may be removed/renamed in future. It is public due to technical reasons.
public double getX()
Returns the x coordinate of the markup element.
- Specified by:
getXin interfaceAbstractPositionalMarkup- Returns:
- the x coordinate of the markup element
@AnyLogicInternalAPI public double getZ()
This method shouldn't be called by user
(is public due to technical reasons)
(is public due to technical reasons)
- Specified by:
getZin interfaceAbstractPositionalMarkup- Returns:
- Always 0
public void setX(double x)
Sets the x coordinate of the markup element.
- Parameters:
x- the new value of x coordinate
public double getY()
Returns the y coordinate of the markup element.
- Specified by:
getYin interfaceAbstractPositionalMarkup- Returns:
- the y coordinate of the markup element
public void setY(double y)
Sets the y coordinate of the markup element.
- Parameters:
y- the new value of y coordinate
public Point getXYZ()
Returns coordinates of the markup element.
- Returns:
- coordinates of the markup element
public void setXYZ(double x, double y, double z)
Sets coordinates of the markup element.
- Parameters:
x- the new value of x coordinatey- the new value of y coordinatez- the new value of z coordinate
public double getCabinZ()
- Specified by:
getCabinZin interfaceIElevatorDescriptor<A extends Agent>
public double getWidth(LengthUnits units)
Returns the width of the markup shape.
- Returns:
- the width of the markup shape
public double getWidth()
Returns the width of the markup shape, in meters.
- Returns:
- the width of the markup shape, in meters
public void setWidth(double width, LengthUnits units)
Sets the width of the markup shape.
- Parameters:
width- the new width of the markup shapeunits- the units of length
public void setWidth(double width)
Sets the width of the markup shape.
- Parameters:
width- the new width of the markup shape, in meters
public double getDepth(LengthUnits units)
Returns the depth of the markup shape.
- Returns:
- the depth of the markup shape
public double getDepth()
Returns the depth of the markup shape, in meters.
- Returns:
- the depth of the markup shape, in meters
public void setDepth(double depth, LengthUnits units)
Sets the depth of the markup shape.
- Parameters:
depth- the new depth of the markup shapeunits- the units of length
public void setDepth(double depth)
Sets the depth of the markup shape.
- Parameters:
depth- the new depth of the markup shape, in meters
public double getRotation()
Returns the rotation of the shape.
- Specified by:
getRotationin interfaceAbstractPositionalMarkup- Returns:
- the rotation of the shape in radians, clockwise
public void setRotation(double rotation)
Sets the rotation of the shape.
- Parameters:
r- the new value of rotation in radians
public void setWallColor(Paint wallColor)
Sets the wall color (or
Texture) of the elevator markup.- Parameters:
wallColor- the new wall color, null = do not draw the elevator walls
public Color getWallColor()
Returns the wall color of the elevator markup, or
null if markup
element has no wall color or has textured wall (in this case
getWallTexture() should be used instead)- Returns:
- the wall color of the elevator markup
public Texture getWallTexture()
Returns the wall texture of the elevator markup, or
null if
markup element has no wall texture (in this case getWallColor()
should be used instead)- Returns:
- the wall texture of the elevator markup
public void setPlatformColor(Paint platformColor)
Sets the platform color (or
Texture) of the elevator markup.- Parameters:
platformColor- the new platform color, null = do not draw the platform of the elevator markup.
public Color getPlatformColor()
Returns the platform color of the elevator markup, or
null if
markup element has no platform color or has textured platform (in this case
getPlatformTexture() should be used instead)- Returns:
- the platform color of the elevator markup
public Texture getPlatformTexture()
Returns the platform texture of the elevator markup, or
null if
markup element has no platform texture (in this case
getPlatformColor() should be used instead)- Returns:
- the platform texture of the elevator markup
@AnyLogicInternalAPI public Paint getLinePaint()
@AnyLogicInternalAPI public Paint getFillPaint()
public int getCapacity()
Returns the number of pedestrian elevator can transfer at once
- Specified by:
getCapacityin interfaceIElevatorDescriptor<A extends Agent>- Returns:
- the number of pedestrian elevator can transfer at once
public Level[] accessibleLevels()
Returns array of levels, which can be served by elevator
- Specified by:
accessibleLevelsin interfaceIElevatorDescriptor<A extends Agent>- Returns:
- array of levels, which can be served by elevator
public ElevatorDoorsConfiguration getDoorsConfiguration()
Returns elevator doors configuration.
- Returns:
- elevator doors configuration. Valid values are:
ELEVATOR_DOORS_FRONTELEVATOR_DOORS_FRONT_REAR
public void addAccessibleLevels(Level... levels)
Adds levels that can be served by elevator. Previously added levels will not
be removed. Automatically changes "Stops at" to "selected levels"
- Specified by:
addAccessibleLevelsin interfaceIElevatorDescriptor<A extends Agent>- Parameters:
levels- - array of levels to add
@AnyLogicInternalAPI public IElevatorDescriptor<A> getLibraryDescriptor()
public void addToLevels()
Used when elevator markup is created by code - adds elevator to all its
levels as an obstacle and adds shafts. Should be used after all elevator
parameters are set.
@AnyLogicInternalAPI public List<ElevatorShaft> getShafts()
@AnyLogicInternalAPI public void setMarkup(Elevator<A> markup)
- Specified by:
setMarkupin interfaceIElevatorDescriptor<A extends Agent>
@AnyLogicInternalAPI public Elevator<A> getMarkup()
public boolean contains(double px, double py)
Description copied from class:
MarkupShapeTest 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:
containsin classMarkupShape- Parameters:
px- the x coordinate relative to this shape's containerpy- the y coordinate relative to this shape's container- Returns:
trueif the shape contains the point with the given coordinates
@AnyLogicInternalAPI public BoundingRectangle getBoundingRectangle()
- Specified by:
getBoundingRectanglein interfaceHasBoundingRectangle
public ElevatorMovementMode getMovementMode()
Returns elevator movement mode.
- Specified by:
getMovementModein interfaceIElevatorDescriptor<A extends Agent>- Returns:
- movement mode. Valid values are:
ELEVATOR_MOVEMENT_BY_SPEEDELEVATOR_MOVEMENT_BY_TIME_PER_LEVEL
public double getSpeed()
Returns elevator speed.
- Returns:
- elevator speed, in meters per second
public double getSpeed(SpeedUnits units)
Returns elevator speed
- Specified by:
getSpeedin interfaceIElevatorDescriptor<A extends Agent>- Parameters:
units- - speed units for returned value- Returns:
- elevator speed, in provided units
public double getTimePerLevel()
Returns time to move between two neighboring levels
- Returns:
- time to move between two neighboring levels, in seconds
public double getTimePerLevel(TimeUnits units)
Returns time to move between two neighboring levels
- Specified by:
getTimePerLevelin interfaceIElevatorDescriptor<A extends Agent>- Parameters:
units- - time units for returned value- Returns:
- time to move between two neighboring levels, in units
public double getCabinHeight(LengthUnits units)
Returns elevator cabin height
- Parameters:
units- the units of cabin height- Returns:
- elevator cabin height
public void setCabinHeight(double cabinHeight, LengthUnits units)
Sets elevator cabin height
- Parameters:
cabinHeight- the new elevator cabin heightunits- the units of cabin height
public double getLineWidth()
Returns elevator line width (in pixels)
- Returns:
- elevator line width (in pixels)
public void setLineWidth(double lineWidth)
Sets elevator line width (in pixels)
- Parameters:
lineWidth- - new elevator line width (in pixels)
public void setDoorsConfiguration(ElevatorDoorsConfiguration doorsConfiguration)
Sets elevator doors configuration.
- Parameters:
doorsConfiguration- - doors configuration. Valid values are:ELEVATOR_DOORS_FRONTELEVATOR_DOORS_FRONT_REAR
public double minStayTime()
Returns minimum time elevator will spend on the level before moving further.
If loading is not finished after this time, elevator will depart immediately
after the loading finished.
- Returns:
- minimum stay time, in seconds
public double minStayTime(TimeUnits units)
Returns minimum time elevator will spend on the level before moving further.
If loading is not finished after this time, elevator will depart immediately
after the loading finished.
- Specified by:
minStayTimein interfaceIElevatorDescriptor<A extends Agent>- Parameters:
units- - time units for returned value- Returns:
- minimum stay time, in units
public boolean isAllLevels()
Returns
true if elevator supposed to serve all levels in owner
agent, false otherwise- Specified by:
isAllLevelsin interfaceIElevatorDescriptor<A extends Agent>- Returns:
trueif elevator supposed to serve all levels in owner agent,falseotherwise
public void setCapacity(int capacity)
Sets elevator capacity
- Specified by:
setCapacityin interfaceIElevatorDescriptor<A extends Agent>- Parameters:
capacity- - number of pedestrian elevator can transfer at once
public void setMovementMode(ElevatorMovementMode movementMode)
Sets elevator movement mode.
- Specified by:
setMovementModein interfaceIElevatorDescriptor<A extends Agent>- Parameters:
movementMode- . Valid values are:ELEVATOR_MOVEMENT_BY_SPEEDELEVATOR_MOVEMENT_BY_TIME_PER_LEVEL
public void setSpeed(double speed)
Sets elevator speed.
- Parameters:
speed- - new elevator speed, in meters per second
public void setSpeed(double speed, SpeedUnits units)
Sets elevator speed.
- Specified by:
setSpeedin interfaceIElevatorDescriptor<A extends Agent>- Parameters:
speed- - new elevator speed, in unitsunits- - the units of speed
public void setTimePerLevel(double timePerLevel)
Sets elevator time per level.
- Parameters:
timePerLevel- - new time per level, in seconds
public void setTimePerLevel(double timePerLevel, TimeUnits units)
Sets time per level.
- Specified by:
setTimePerLevelin interfaceIElevatorDescriptor<A extends Agent>- Parameters:
speed- - new time per level, in unitsunits- - time units
public void setAllLevels(boolean allLevels)
Sets whether elevator should serve all levels in owner agent
- Specified by:
setAllLevelsin interfaceIElevatorDescriptor<A extends Agent>- Parameters:
allLevels- -trueif elevator supposed to serve all levels in owner agent,falseif levels specified manually byaddAccessibleLevels()method
public boolean isDrawShaft()
Returns
true if the elevator's shaft is drawn, otherwise returns
false.- Returns:
trueif the elevator's shaft is drawn, otherwise returnsfalse.
public void setDrawShaft(boolean drawShaft)
Sets whether elevator's shaft should be drawn.
- Parameters:
drawShaft- -trueif elevator's shaft should be drawn,falseotherwise
public ElevatorState getState()
Returns current elevator state
- Specified by:
getStatein interfaceIElevatorDescriptor<A extends Agent>- Returns:
- current elevator state. Valid values are:
ELEVATOR_STATE_IDLEELEVATOR_STATE_LOADINGELEVATOR_STATE_MOVINGELEVATOR_STATE_FAILED
public Set<A> getPeds()
Returns the list of pedestrians that are currently inside elevator
- Specified by:
getPedsin interfaceIElevatorDescriptor<A extends Agent>- Returns:
- the list of pedestrians that are currently inside elevator
public ElevatorDirection getCurrentDirection()
Returns current movement direction of the elevator. If elevator is not
moving, but has movement tasks (to pickup or drop off passengers), return
direction of the next task. If there are no tasks for elevator, returns
ELEVATOR_DIRECTION_NONE- Specified by:
getCurrentDirectionin interfaceIElevatorDescriptor<A extends Agent>- Returns:
- current movement direction of the elevator. Valid values are:
ELEVATOR_DIRECTION_UPELEVATOR_DIRECTION_DOWNELEVATOR_DIRECTION_NONE
public Level getCurrentLevel()
Returns elevator current level. If elevator is between levels, returns lower
level.
- Specified by:
getCurrentLevelin interfaceIElevatorDescriptor<A extends Agent>- Returns:
- elevator current level. If elevator is between levels, returns lower level.
public List<? extends Elevator.Call<A>> getCalls()
Returns list of elevator calls
- Specified by:
getCallsin interfaceIElevatorDescriptor<A extends Agent>- Returns:
List<Call>- list of elevator calls
public List<Level> getRoute()
Returns the list of levels which the elevator is going to visit according to current tasks.
Levels are ordered according to elevator order of visits.
- Specified by:
getRoutein interfaceIElevatorDescriptor<A extends Agent>- Returns:
- the list of levels which the elevator is going to visit
public Set<A> getWaitingPeds(Level level)
Returns set of pedestrians waiting for elevator on the level
- Specified by:
getWaitingPedsin interfaceIElevatorDescriptor<A extends Agent>- Returns:
Set<Agent>waiting for elevator on the level
public Set<A> getWaitingPeds()
Returns set of pedestrians waiting for elevator on all levels
- Specified by:
getWaitingPedsin interfaceIElevatorDescriptor<A extends Agent>- Returns:
Set<Agent>waiting for elevator on all levels
public void disableDoor(Level level, ElevatorDoor door)
Disables elevator door on the level. Overrides initial doors configuration.
- Specified by:
disableDoorin interfaceIElevatorDescriptor<A extends Agent>- Parameters:
level- the level where door should be disableddoor- the door which should be disabled. valid values are:ELEVATOR_DOOR_FRONTELEVATOR_DOOR_REAR
public void enableDoor(Level level, ElevatorDoor door)
Enables elevator door on the level. Overrides initial doors configuration.
- Specified by:
enableDoorin interfaceIElevatorDescriptor<A extends Agent>- Parameters:
level- the level where door should be enableddoor- the door which should be enabled. Valid values are:ELEVATOR_DOOR_FRONTELEVATOR_DOOR_REAR
public boolean isDoorEnabled(Level level, ElevatorDoor door)
Returns
true if the door on the level is enabled, false
otherwise. Door state is defined by initial doors configuration and by
enableDoor(com.anylogic.engine.markup.Level,com.anylogic.engine.markup.ElevatorDoor), disableDoor(com.anylogic.engine.markup.Level,com.anylogic.engine.markup.ElevatorDoor) functions- Specified by:
isDoorEnabledin interfaceIElevatorDescriptor<A extends Agent>- Parameters:
level- the leveldoor- the door to check. Valid values are:ELEVATOR_DOOR_FRONTELEVATOR_DOOR_REAR
public void fail()
Initiates the elevator's failure. The elevator stops working.
- Specified by:
failin interfaceIElevatorDescriptor<A extends Agent>
public void repair()
Repairs the elevator. The elevator becomes available again.
- Specified by:
repairin interfaceIElevatorDescriptor<A extends Agent>
public boolean isFailed()
Returns
true if the elevator failed (broke down) and is not
operating, otherwise returns false.- Specified by:
isFailedin interfaceIElevatorDescriptor<A extends Agent>- Returns:
trueif the elevator failed andfalseotherwise
public void onArrival(Level level, List<A> waitingPeds)
Calls
onArrival() code of the elevator- Specified by:
onArrivalin interfaceIElevatorDescriptor<A extends Agent>- Parameters:
level- - arrival levelwaitingPeds- - pedestrians waiting for pickup on arrival level
public void onDeparture(Level level)
Calls
onDeparture() code of the elevator- Specified by:
onDeparturein interfaceIElevatorDescriptor<A extends Agent>- Parameters:
level- - current level of the elevator
public void onFailed()
Calls
onFailed() code of the elevator- Specified by:
onFailedin interfaceIElevatorDescriptor<A extends Agent>
public void onRepaired()
Calls
onRepaired() code of the elevator- Specified by:
onRepairedin interfaceIElevatorDescriptor<A extends Agent>
public void resetStats()
Resets all elevator statistics.
- Specified by:
resetStatsin interfaceIElevatorDescriptor<A extends Agent>
public double timeInState(ElevatorState state, TimeUnits units)
Returns time (in units) elevator spent in specified state since model start
or since last
resetStats() call- Specified by:
timeInStatein interfaceIElevatorDescriptor<A extends Agent>- Parameters:
state- - elevator state. Valid values are:ELEVATOR_STATE_IDLEELEVATOR_STATE_LOADINGELEVATOR_STATE_MOVINGELEVATOR_STATE_FAILED
units- - time units for returned value- Returns:
- time elevator spent in specified state
public double timeInState(ElevatorState state)
Returns time (in model time units) elevator spent in specified state since
model start or since last
resetStats() call- Specified by:
timeInStatein interfaceIElevatorDescriptor<A extends Agent>- Parameters:
state- - elevator state. Valid values are:ELEVATOR_STATE_IDLEELEVATOR_STATE_LOADINGELEVATOR_STATE_MOVINGELEVATOR_STATE_FAILED
- Returns:
- time elevator spent in specified state, in model time units
public double utilization()
Returns the elevator utilization: the fraction of time the elevator was
operating. The returned elevator utilization value lies in the range [0..1].
- Specified by:
utilizationin interfaceIElevatorDescriptor<A extends Agent>
public double totalTravelTime(TimeUnits units)
Returns total time (in units) elevator was moving since model start or since
last
resetStats() call- Specified by:
totalTravelTimein interfaceIElevatorDescriptor<A extends Agent>- Parameters:
units- - time units for returned value- Returns:
- total movement time
public double totalTravelTime()
Returns total time (in model time units) elevator was moving since model
start or since last
resetStats() call- Specified by:
totalTravelTimein interfaceIElevatorDescriptor<A extends Agent>- Returns:
- total movement time, in model time units
public double meanWaitingTime(TimeUnits units)
Returns mean time (in units) pedestrian spent waiting for elevator on all
levels
- Specified by:
meanWaitingTimein interfaceIElevatorDescriptor<A extends Agent>- Parameters:
units- - time units for returned value- Returns:
- mean time (in units) pedestrian spent waiting for elevator on all levels
public double meanWaitingTime()
Returns mean time (in model time units) pedestrian spent waiting for elevator
on all levels
- Specified by:
meanWaitingTimein interfaceIElevatorDescriptor<A extends Agent>- Returns:
- mean time pedestrian spent waiting for elevator on all levels, in model time units
public double meanWaitingTime(Level level, TimeUnits units)
Returns mean time (in units) pedestrian spent waiting for elevator on
specified level
- Specified by:
meanWaitingTimein interfaceIElevatorDescriptor<A extends Agent>- Parameters:
units- - time units for returned value- Returns:
- mean time (in units) pedestrian spent waiting for elevator on specified level
public double meanWaitingTime(Level level)
Returns mean time (in model time units) pedestrian spent waiting for elevator
on specified level
- Specified by:
meanWaitingTimein interfaceIElevatorDescriptor<A extends Agent>- Returns:
- mean time pedestrian spent waiting for elevator on specified level, in model time units
public int nPickedUpPeds(Level level)
Returns number of pedestrians elevator picked up at specified level
- Specified by:
nPickedUpPedsin interfaceIElevatorDescriptor<A extends Agent>- Parameters:
level- - level served by the elevator- Returns:
- number of pedestrians elevator picked up at specified level
public int nDroppedOffPeds(Level level)
Returns number of pedestrians elevator dropped off at specified level
- Specified by:
nDroppedOffPedsin interfaceIElevatorDescriptor<A extends Agent>- Parameters:
level- - level served by the elevator- Returns:
- number of pedestrians elevator dropped off at specified level
public int nTransportedPeds()
Returns number of pedestrians transported by the elevator
- Specified by:
nTransportedPedsin interfaceIElevatorDescriptor<A extends Agent>- Returns:
- number of pedestrians transported by the elevator
public void setManualMode(boolean on)
Changes current mode of the elevator. When manual mode is on, elevator will
move, pickup and dropoff pedestrians only according to
moveTo(),
dropOffPeds() calls.- Specified by:
setManualModein interfaceIElevatorDescriptor<A extends Agent>- Parameters:
on- -truefor turn manual mode on,falseotherwise
public boolean isManualMode()
Returns
true if the elevator is in manual mode, false
otherwise.- Specified by:
isManualModein interfaceIElevatorDescriptor<A extends Agent>- Returns:
trueif the elevator is in manual mode,falseotherwise.
public void moveTo(Level level, boolean stayInManualMode)
Sends the elevator to specified level. If elevator is in loading state, all
pedestrians planned for pick up or drop off will be processed first.
Automatically turns on manual mode.
- Specified by:
moveToin interfaceIElevatorDescriptor<A extends Agent>- Parameters:
level- - target levelstayInManualMode- - iftrue, elevator will stay in manual mode after reaching targte level. Iffalse, elevator will switch to auto mode on arrival, and will continue to operate.
public void moveTo(Level level)
Sends the elevator to specified level. If elevator is in loading state, all
pedestrians planned for pick up or drop off will be processed first.
Automatically turns on manual mode. On arrival to target level will stay in
manual mode.
- Parameters:
level- - target level
public void pickUpPeds(Collection<? extends Agent> peds)
Starts pickup for the pedestrians in the list. Works only in manual mode. All
pedestrians should be on the same level where elevator currently is. Throws
error if the elevator is between levels or a pedestrian is not on the same
level with the elevator.
- Specified by:
pickUpPedsin interfaceIElevatorDescriptor<A extends Agent>
public void dropOffPeds(Collection<? extends Agent> peds)
Starts drop off for the pedestrians in the list. Works only in manual mode.
All pedestrians should be inside the elevator. Pedestrians will appear on the
level where the elevator is located.
- Specified by:
dropOffPedsin interfaceIElevatorDescriptor<A extends Agent>
public Level getTargetLevel()
Returns target level when the elevator is in manual mode and moving,
null otherwise.- Specified by:
getTargetLevelin interfaceIElevatorDescriptor<A extends Agent>- Returns:
- target level when the elevator is in manual mode and moving,
nullotherwise.
public void deleteCallsOnLevel(Level level)
Removes all pickup tasks from the level. Pedestrian will be still waiting for
the elevator, use
cancel() or remove() to handle them.- Specified by:
deleteCallsOnLevelin interfaceIElevatorDescriptor<A extends Agent>- Parameters:
level- - level on which all pickup tasks will be removed.
public void onStateChanged(ElevatorState newState)
Calls
onStateChanged() code of the elevator.- Specified by:
onStateChangedin interfaceIElevatorDescriptor<A extends Agent>
public Level getPedTargetLevel(Agent ped)
Returns target level of a pedestrian, specified in PedElevator block. If not
defined, returns
null- Specified by:
getPedTargetLevelin interfaceIElevatorDescriptor<A extends Agent>- Parameters:
ped- - pedestrian for which target level will be returned.- Returns:
- target level of a pedestrian, specified in PedElevator block. If not
defined, returns
null
public Level getNearestLevel()
Returns nearest level level - current level if elevator is not between
levels, next level along direction if elevator is moving and closest
otherwise.
- Specified by:
getNearestLevelin interfaceIElevatorDescriptor<A extends Agent>
public void setVisible(boolean visible)
Description copied from class:
AbstractMarkupSets the visibility of the markup element.
- Overrides:
setVisiblein classAbstractMarkup- Parameters:
visible- visibility:true- visible,false- not
@AnyLogicInternalAPI public boolean isShaftsInitialized_xjal()