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, java.io.Serializable

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

Field Summary

Fields 
MarkupPort eastPort
Lift's NetworkPort located to east
MarkupPort northPort
Lift's NetworkPort located to north
MarkupPort southPort
Lift's NetworkPort located to south
MarkupPort westPort
Lift's NetworkPort located to west
Modifier and Type Field Description

Constructor Summary

Constructors 
Lift()  
Lift​(Agent owner, ShapeDrawMode drawMode, boolean isPublic, boolean isObstacle, double x, double y, double z, double widthInMeters, double depthInMeters, double rotation, java.awt.Paint fillColor, java.awt.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.
Constructor Description

Method Summary

All Methods Instance Methods Concrete Methods 
java.util.List<MarkupPort> collectAllPairedPorts​(java.util.function.Predicate<MarkupPort> filter)  
boolean comparison​(A agent1, A agent2)
Returns the result of evaluating the expression specified by the user in "agent1 is preferred to agent2" parameter.
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.
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.
void fail()
Initiates the lift's failure.
Agent getAgentFromQueue​(int index)
Returns the agent from the queue with the specified index.
BoundingRectangle getBoundingRectangle()  
double getDepth​(LengthUnits units)
Returns the depth of the markup shape.
java.awt.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)
Texture getFillTexture()
Returns the fill texture of the shape, if the shape has fill texture
double getFloorElevation​(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()  
double getLiftingSpeed​(SpeedUnits units)
Returns the speed of the lift movement in the specified speed units.
java.util.List<Lift<?>> getLiftLandings()
Returns all landings this lift has, including itself.
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)
Texture getLineTexture()
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()  
LiftPlatformDrawingType getPlatformType()
Returns platform type.
double getPlatformZ()  
double getRotation()
Returns the rotation of the shape.
LiftSelectionMode getSelectionMode()
Returns the type of agent selection pattern for this lift, i.e.
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.
double getZHeight​(LengthUnits units)  
void initializeLiftLandings()  
boolean isFailed()
Returns true if the lift failed (broke down) and is not operating, otherwise returns false.
boolean isMainLanding()
Returns true if this lift is set as the main landing.
boolean isObstacle()
Returns true if the lift is obstacle for transporters and else otherwise.
void onDropoffFinished​(A agent)
Calls onDropoffFinished() code of the lift
void onFailed()
Calls onFailed() code of the lift
void onPickupStarted​(A agent)
Calls onPickupStarted() code of the lift
void onRepaired()
Calls onRepaired() code of the lift
double pickingUpTime​(A agent, TimeUnits units)
Returns the time specified for agent movement between the ending point of network path/conveyor and the center.
java.util.List<MarkupPort> ports()
Returns all ports of this element
void postInitialize()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
double priority​(A agent)
Returns the priority of the agent.
int queueSize()
Returns the number of agents (material items) in the lift's queue.
void repair()
Repairs the lift.
void setDepth​(double depth, LengthUnits units)
Sets the depth of the markup shape.
void setFillColor​(java.awt.Color fillColor)
Sets the fill color of the shape.
void setFillColor​(java.awt.Paint fillColor)
Sets the fill color (or Texture) of the shape.
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.
void setLiftingSpeed​(double speed, SpeedUnits units)
Set the speed of the lift movement in the specified speed units.
void setLineColor​(java.awt.Color lineColor)
Sets the line color of the markup element.
void setLineColor​(java.awt.Paint lineColor)
Sets the line color (or Texture) of the markup element.
void setMainLanding​(boolean isMain)
Sets the lift as the main landing.
void setMainLanding​(Lift<?> mainLift)
Assigns the main landing status to a lift from a collection of lift elements connected to each other.
void setObstacle​(boolean isObstacle)
Sets wether this lift is an obstacle for transporters.
void setPlatformType​(LiftPlatformDrawingType platformType)
Sets platform type
void setRotation​(double rotation)
Sets the rotation of the shape.
void setSelectionMode​(LiftSelectionMode mode)
Sets the new type of agent selection pattern for this lift, i.e.
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.
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

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

getMarkup, setMarkup

Field Detail

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 Detail

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,
            java.awt.Paint fillColor,
            java.awt.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 Detail

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 java.util.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 java.util.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​(java.awt.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​(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

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​(java.awt.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​(java.awt.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 java.awt.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

onFailed

public void onFailed()
Calls onFailed() code of the lift
Specified by:
onFailed in interface com.anylogic.engine.markup.material_handling.IMaterialFallible

onRepaired

public void onRepaired()
Calls onRepaired() code of the lift
Specified by:
onRepaired in interface com.anylogic.engine.markup.material_handling.IMaterialFallible

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 java.util.List<MarkupPort> collectAllPairedPorts​(java.util.function.Predicate<MarkupPort> filter)

getBoundingRectangle

@AnyLogicInternalAPI
public BoundingRectangle getBoundingRectangle()
How can we improve this article?