AnyLogic
Expand
Font size
All Implemented Interfaces:
AggregatableAnimationElement, HasLevel, IMarkupLibraryDescriptor, LevelElement, LevelMarkup, com.anylogic.engine.markup.material_handling.ILiftDescriptor<A>, com.anylogic.engine.markup.material_handling.IMaterialFallible, com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor, SVGElement, Serializable

public class Lift<A extends Agent>
extends AbstractLevelMarkup
implements com.anylogic.engine.markup.material_handling.ILiftDescriptor<A>
See Also:
Serialized Form

Field Summary

Modifier and TypeFieldDescription
final MarkupPorteastPort
Lift's NetworkPort located to east
final MarkupPortnorthPort
Lift's NetworkPort located to north
final MarkupPortsouthPort
Lift's NetworkPort located to south
final MarkupPortwestPort
Lift's NetworkPort located to west

Constructor Summary

ConstructorDescription
Lift() 
Lift(Agent owner, ShapeDrawMode drawMode, boolean isPublic, boolean isObstacle, double x, double y, double z, double widthInMeters, double depthInMeters, double rotation, Paint fillColor, Paint lineColor, LiftPlatformDrawingType platformType, com.anylogic.engine.markup.material_handling.ILiftDescriptor<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 Summary

Modifier and TypeMethodDescription
List<MarkupPort>collectAllPairedPorts(Predicate<MarkupPort> filter) 
booleancomparison(A agent1, A agent2)
Returns the result of evaluating the expression specified by the user in "agent1 is preferred to agent2" parameter.
booleancontains(double px, double py)
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e.
doubledroppingOffTime(A agent, TimeUnits units)
Returns the time specified for agent movement between the center of the lift and the starting point of network path/conveyor.
voidfail()
Initiates the lift's failure.
AgentgetAgentFromQueue(int index)
Returns the agent from the queue with the specified index.
BoundingRectanglegetBoundingRectangle() 
doublegetDepth(LengthUnits units)
Returns the depth of the markup shape.
ColorgetFillColor()
Returns the fill color of the shape, or null if shape has no fill color or has textured fill (in this case getFillTexture() should be used instead)
TexturegetFillTexture()
Returns the fill texture of the shape, if the shape has fill texture
doublegetFloorElevation(LengthUnits units)
Returns the distance between the lift and the surface you are using as level in the specified length units.
com.anylogic.engine.markup.material_handling.ILiftDescriptor<A>getLibraryDescriptor() 
doublegetLiftingSpeed(SpeedUnits units)
Returns the speed of the lift movement in the specified speed units.
List<Lift<?>>getLiftLandings()
Returns all landings this lift has, including itself.
ColorgetLineColor()
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)
TexturegetLineTexture()
Returns the line texture of the markup element, if the markup element has line texture
Lift<?>getMainLanding()
Returns the main landing out of the collection of lift elements connected to each other.
Lift<?>getPlatformFloor() 
LiftPlatformDrawingTypegetPlatformType()
Returns platform type.
doublegetPlatformZ() 
doublegetRotation()
Returns the rotation of the shape.
LiftSelectionModegetSelectionMode()
Returns the type of agent selection pattern for this lift, i.e.
doublegetWidth(LengthUnits units)
Returns the width of the markup shape.
doublegetX()
Returns the x coordinate of the markup element.
PointgetXYZ()
Returns coordinates of the markup element.
doublegetY()
Returns the y coordinate of the markup element.
doublegetZ()
Returns the z coordinate of the markup element.
doublegetZHeight(LengthUnits units) 
voidinitializeLiftLandings() 
booleanisFailed()
Returns true if the lift failed (broke down) and is not operating, otherwise returns false.
booleanisMainLanding()
Returns true if this lift is set as the main landing.
booleanisObstacle()
Returns true if the lift is obstacle for transporters and else otherwise.
voidonDropoffFinished(A agent)
Calls onDropoffFinished() code of the lift
voidonPickupStarted(A agent)
Calls onPickupStarted() code of the lift
doublepickingUpTime(A agent, TimeUnits units)
Returns the time specified for agent movement between the ending point of network path/conveyor and the center.
List<MarkupPort>ports()
Returns all ports of this element
voidpostInitialize()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
doublepriority(A agent)
Returns the priority of the agent.
intqueueSize()
Returns the number of agents (material items) in the lift's queue.
voidrepair()
Repairs the lift.
voidsetDepth(double depth, LengthUnits units)
Sets the depth of the markup shape.
voidsetFillColor(Color fillColor)
Sets the fill color of the shape.
voidsetFillColor(Paint fillColor)
Sets the fill color (or Texture) of the shape.
voidsetFloorElevation(double floorLevel, LengthUnits units)
Sets the distance between the lift and the surface you are using as level in the specified length units.
voidsetLiftingSpeed(double speed, SpeedUnits units)
Set the speed of the lift movement in the specified speed units.
voidsetLineColor(Color lineColor)
Sets the line color of the markup element.
voidsetLineColor(Paint lineColor)
Sets the line color (or Texture) of the markup element.
voidsetMainLanding(boolean isMain)
Sets the lift as the main landing.
voidsetMainLanding(Lift<?> mainLift)
Assigns the main landing status to a lift from a collection of lift elements connected to each other.
voidsetObstacle(boolean isObstacle)
Sets wether this lift is an obstacle for transporters.
voidsetPlatformType(LiftPlatformDrawingType platformType)
Sets platform type
voidsetRotation(double rotation)
Sets the rotation of the shape.
voidsetSelectionMode(LiftSelectionMode mode)
Sets the new type of agent selection pattern for this lift, i.e.
voidsetWidth(double width, LengthUnits units)
Sets the width of the markup shape.
voidsetX(double x)
Sets the x coordinate of the markup element.
voidsetXYZ(double x, double y, double z)
Sets coordinates of the markup element.
voidsetY(double y)
Sets the y coordinate of the markup element.
voidsetZ(double z)
Sets the z coordinate of the markup element.

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 java.lang.Object

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

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

initializeInternal, onAggregatorVisibilityChanged

Methods inherited from interface com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor

getMarkup, setMarkup

Field Details

northPort

public final MarkupPort northPort
Lift's NetworkPort located to north

southPort

public final MarkupPort southPort
Lift's NetworkPort located to south

westPort

public final MarkupPort westPort
Lift's NetworkPort located to west

eastPort

public final MarkupPort eastPort
Lift's NetworkPort located to east

Constructor Details

Lift

public Lift()

Lift

@AnyLogicInternalCodegenAPI
public Lift(Agent owner,
 ShapeDrawMode drawMode,
 boolean isPublic,
 boolean isObstacle,
 double x,
 double y,
 double z,
 double widthInMeters,
 double depthInMeters,
 double rotation,
 Paint fillColor,
 Paint lineColor,
 LiftPlatformDrawingType platformType,
 com.anylogic.engine.markup.material_handling.ILiftDescriptor<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 Details

isObstacle

public boolean isObstacle()
Returns true if the lift is obstacle for transporters and else otherwise.
Returns:
true if the lift is obstacle for transporters and else otherwise

setObstacle

public void setObstacle(boolean isObstacle)
Sets wether this lift is an obstacle for transporters.
Parameters:
isObstacle - - true if you want this lift was an obstacle for transporters and false otherwise.

ports

public List<MarkupPort> ports()
Returns all ports of this element
Returns:
all ports of this element

getLibraryDescriptor

@AnyLogicInternalAPI
public com.anylogic.engine.markup.material_handling.ILiftDescriptor<A> getLibraryDescriptor()

getLiftLandings

public List<Lift<?>> getLiftLandings()
Returns all landings this lift has, including itself.
Returns:
List<Lift> - list of all landings this lift has, including itself

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(Color lineColor)
Sets the line color of the markup element.
Parameters:
lineColor - the new line color, null = do not draw the markup element line

setLineColor

public void setLineColor(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 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

getLineTexture

public Texture getLineTexture()
Returns the line texture of the markup element, if the markup element has line texture
Returns:
the line texture of the markup element

setFillColor

public void setFillColor(Color fillColor)
Sets the fill color of the shape.
Parameters:
fillColor - the new fill color, null = do not fill the shape

setFillColor

public void setFillColor(Paint fillColor)
Sets the fill color (or Texture) of the shape.
Parameters:
fillColor - the new fill color, null = do not fill the shape

getFillColor

public Color getFillColor()
Returns the fill color of the shape, or null if shape has no fill color or has textured fill (in this case getFillTexture() should be used instead)
Returns:
the fill color of the shape

getFillTexture

public Texture getFillTexture()
Returns the fill texture of the shape, if the shape has fill texture
Returns:
the fill texture of the shape

getPlatformType

public LiftPlatformDrawingType getPlatformType()
Returns platform type.
Returns:
platform type. Valid values are:
  • LIFT_PLATFORM_FLAT
  • LIFT_PLATFORM_ROLLER

setPlatformType

public void setPlatformType(LiftPlatformDrawingType platformType)
Sets platform type
Parameters:
platformType - - desired platform type. Valid values are:
  • LIFT_PLATFORM_FLAT
  • LIFT_PLATFORM_ROLLER

initializeLiftLandings

@AnyLogicInternalAPI
public void initializeLiftLandings()

postInitialize

public void postInitialize()
Description copied from interface: AggregatableAnimationElement
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Specified by:
postInitialize in interface AggregatableAnimationElement

getPlatformZ

@AnyLogicInternalAPI
public double getPlatformZ()
Specified by:
getPlatformZ in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>

getPlatformFloor

@AnyLogicInternalAPI
public Lift<?> getPlatformFloor()
Specified by:
getPlatformFloor in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>

getZHeight

@AnyLogicInternalAPI
public double getZHeight(LengthUnits units)

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

isMainLanding

public boolean isMainLanding()
Returns true if this lift is set as the main landing. Otherwise, returns false.
Specified by:
isMainLanding in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>

setMainLanding

public void setMainLanding(boolean isMain)
Sets the lift as the main landing.
Specified by:
setMainLanding in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>
Parameters:
isMain - - valid values are true and false.

getMainLanding

public Lift<?> getMainLanding()
Returns the main landing out of the collection of lift elements connected to each other.
Specified by:
getMainLanding in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>
Returns:
the main landing out of the collection of lift elements connected to each other

setMainLanding

public void setMainLanding(Lift<?> mainLift)
Assigns the main landing status to a lift from a collection of lift elements connected to each other.
Specified by:
setMainLanding in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>
Parameters:
mainLift - - an element from a collection of lift elements connected to each other.

isFailed

public boolean isFailed()
Returns true if the lift failed (broke down) and is not operating, otherwise returns false.
Specified by:
isFailed in interface com.anylogic.engine.markup.material_handling.IMaterialFallible
Returns:
true if the lift failed and false otherwise

fail

public void fail()
Initiates the lift's failure. The lift stops working.
Specified by:
fail in interface com.anylogic.engine.markup.material_handling.IMaterialFallible

repair

public void repair()
Repairs the lift. The lift becomes available again.
Specified by:
repair in interface com.anylogic.engine.markup.material_handling.IMaterialFallible

getFloorElevation

public double getFloorElevation(LengthUnits units)
Returns the distance between the lift and the surface you are using as level in the specified length units.
Specified by:
getFloorElevation in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>
Parameters:
units - - a constant defining the length units
Returns:
the distance between the lift and the surface you are using as level in the specified length units

setFloorElevation

public void setFloorElevation(double floorLevel,
 LengthUnits units)
Sets the distance between the lift and the surface you are using as level in the specified length units.
Specified by:
setFloorElevation in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>
Parameters:
floorLevel - - a new distance value
units - - a constant defining the length units

getLiftingSpeed

public double getLiftingSpeed(SpeedUnits units)
Returns the speed of the lift movement in the specified speed units.
Specified by:
getLiftingSpeed in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>
Parameters:
units - - a constant defining the speed units
Returns:
the speed of the lift movement in the specified speed units

setLiftingSpeed

public void setLiftingSpeed(double speed,
 SpeedUnits units)
Set the speed of the lift movement in the specified speed units.
Specified by:
setLiftingSpeed in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>
Parameters:
speed - - a new speed value
units - - a constant defining the speed units

pickingUpTime

public double pickingUpTime(A agent,
 TimeUnits units)
Returns the time specified for agent movement between the ending point of network path/conveyor and the center. of the lift in the specified time units.
Specified by:
pickingUpTime in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>
Parameters:
agent - - agent that is currently moving into the lift
units - - a constant defining the time units
Returns:
the time specified for agent movement between the ending point of network path/conveyor and the center

droppingOffTime

public double droppingOffTime(A agent,
 TimeUnits units)
Returns the time specified for agent movement between the center of the lift and the starting point of network path/conveyor.
Specified by:
droppingOffTime in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>
Parameters:
agent - - agent that is currently moving into the lift
units - - a constant defining the time units
Returns:
the time specified for agent movement between the center of the lift and the starting point of network path/conveyor

getSelectionMode

public LiftSelectionMode getSelectionMode()
Returns the type of agent selection pattern for this lift, i.e. how the lift selects agents from the queue.
Specified by:
getSelectionMode in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>
Returns:
the type of agent selection pattern for this lift, i.e. how the lift selects agents from the queue

Valid values are:

  • LIFT_SELECTION_MODE_FIFO - according to FIFO policy
  • LIFT_SELECTION_MODE_PRIORITY - according to the priority of the incoming agent
  • LIFT_SELECTION_MODE_COMPARISON - according to the specified boolean expression that is evaluated for every agent "requesting" a lift

setSelectionMode

public void setSelectionMode(LiftSelectionMode mode)
Sets the new type of agent selection pattern for this lift, i.e. how the lift selects agents from the queue.
Specified by:
setSelectionMode in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>
Parameters:
mode - - new type of selection pattern.

Valid values are:

  • LIFT_SELECTION_MODE_FIFO - according to FIFO policy
  • LIFT_SELECTION_MODE_PRIORITY - according to the priority of the incoming agent
  • LIFT_SELECTION_MODE_COMPARISON - according to the specified boolean expression that is evaluated for every agent "requesting" a lift

priority

public double priority(A agent)
Returns the priority of the agent.
Specified by:
priority in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>
Parameters:
agent - - agent - agent in the queue
Returns:
the priority of the agent

comparison

public boolean comparison(A agent1,
 A agent2)
Returns the result of evaluating the expression specified by the user in "agent1 is preferred to agent2" parameter.
Specified by:
comparison in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>
Parameters:
agent1 - - the incoming agent
agent2 - - the agent being compared with the incoming agent
Returns:
true if agent1 is preffered to agent2 and false otherwise

queueSize

public int queueSize()
Returns the number of agents (material items) in the lift's queue.
Specified by:
queueSize in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>
Returns:
number of agents (material items) in the lift's queue

getAgentFromQueue

public Agent getAgentFromQueue(int index)
Returns the agent from the queue with the specified index.
Specified by:
getAgentFromQueue in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>
Parameters:
index - - the index of the agent in the queue
Returns:
the agent from the queue with the specified index

onPickupStarted

public void onPickupStarted(A agent)
Calls onPickupStarted() code of the lift
Specified by:
onPickupStarted in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>
Parameters:
agent - - argument for user-defined function

onDropoffFinished

public void onDropoffFinished(A agent)
Calls onDropoffFinished() code of the lift
Specified by:
onDropoffFinished in interface com.anylogic.engine.markup.material_handling.ILiftDescriptor<A extends Agent>
Parameters:
agent - - argument for user-defined function

collectAllPairedPorts

@AnyLogicInternalAPI
public List<MarkupPort> collectAllPairedPorts(Predicate<MarkupPort> filter)

getBoundingRectangle

@AnyLogicInternalAPI
public BoundingRectangle getBoundingRectangle()