AnyLogic
Expand
Font size
All Implemented Interfaces:
AggregatableAnimationElement, AnimationStaticLocationProvider, HasLevel, IMarkupLibraryDescriptor, INetworkMarkupElement, INode<ConveyorNode<?>,ConveyorPath<?>>, com.anylogic.engine.markup.material_handling.IConveyorTurntableDescriptor<T>, com.anylogic.engine.markup.material_handling.IMaterialAreaLocation<T>, com.anylogic.engine.markup.material_handling.IMaterialFallible, com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor, com.anylogic.engine.markup.material_handling.IMaterialPointLocation<T>, SVGElement, Serializable

public class ConveyorTurntable<T extends Agent>
extends ConveyorTransitionalNode<T>
implements com.anylogic.engine.markup.material_handling.IConveyorTurntableDescriptor<T>
Turntable is the graphical space markup element that is used to define turntables. Agents (material items) passing through it keep their current orientation on the conveyor.

Once placed on a conveyor, the turntable divides it into two independent conveyors, working in the same Conveyor Network. Turntable may connect unlimited number of conveyors at any angle.

See Also:
Serialized Form

Constructor Summary

ConstructorDescription
ConveyorTurntable() 
ConveyorTurntable(Agent owner, ShapeDrawMode drawMode, boolean isPublic)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
ConveyorTurntable(Agent owner, ShapeDrawMode drawMode, boolean isPublic, boolean isObstacle, double x, double y, double z, Paint fillColor, Paint lineColor, com.anylogic.engine.markup.material_handling.IConveyorTurntableDescriptor<T> descriptor, PathEnd<ConveyorPath<?>>... pathEnds)
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
booleancontains(Agent agent)
Returns true is the given agent (material item) is on the turntable, returns false otherwise
voidfail()
Initiates turntable failure.
TgetAgent(int index)
Returns the agent (material item) that is currently located on the turntable
List<T>getAgents()
Returns the list of agents (material items) that are currently located on the turntable
LevelgetLevel()
Returns the level that this turntable is contained in
com.anylogic.engine.markup.material_handling.IConveyorTurntableDescriptor<T>getLibraryDescriptor() 
doublegetRotationSpeed(RotationSpeedUnits units)
Returns the turntable's rotation speed (in the specified rotation units).
doublegetSpeed(SpeedUnits units)
Returns the speed of the turntable in the specified speed units.
booleanisFailed()
Returns true if the turntable failed (broke down) and is not operating, returns false otherwise.
booleanisObstacle()
Returns true if this turntable is considered an obstacle by transporters moving in free space mode.
booleanisTakeSpeedOfConnectedConveyors() 
voidonLeadingEdgeEnter(T agent)
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.

Callback action.
voidonLeadingEdgeExit(T agent)
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.

Callback action.
voidonTrailingEdgeEnter(T agent)
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.

Callback action.
voidonTrailingEdgeExit(T agent)
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.

Callback action.
voidpostInitialize()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
voidrecalculatePriorities() 
booleanremoveAgent(Agent agent)
Removes the given agent from the turntable.
voidrepair()
Repairs the turntable, makes it available again.
voidsetObstacle(boolean isObstacle)
Sets this turntable as an obstacle for transporters moving in free space mode.
voidsetRotationSpeed(double rotationSpeed, RotationSpeedUnits units)
Sets the turntable's rotation speed (in the specified speed units) when switcing from one conveyor to another.
voidsetSpeed(double speed, SpeedUnits units)
Sets the new speed of the turntable in the specified speed units.
intsize()
Returns the current number of agents (material items) on the turntable

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

getTransferDistance, getTransition, getTransitions

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

setNetwork

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

error, getDrawMode, 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.AnimationStaticLocationProvider

getSpace

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

getMarkup, setMarkup

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

getSpace, randomPointInside, randomPointInside, randomPointInside

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

getName

Constructor Details

ConveyorTurntable

public ConveyorTurntable()

ConveyorTurntable

@Deprecated
public ConveyorTurntable(Agent owner,
 ShapeDrawMode drawMode,
 boolean isPublic)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
Parameters:
owner -
drawMode -
isPublic -

ConveyorTurntable

@AnyLogicInternalCodegenAPI
@SafeVarargs
public ConveyorTurntable(Agent owner,
 ShapeDrawMode drawMode,
 boolean isPublic,
 boolean isObstacle,
 double x,
 double y,
 double z,
 Paint fillColor,
 Paint lineColor,
 com.anylogic.engine.markup.material_handling.IConveyorTurntableDescriptor<T> descriptor,
 PathEnd<ConveyorPath<?>>... pathEnds)
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

getLibraryDescriptor

@AnyLogicInternalAPI
public com.anylogic.engine.markup.material_handling.IConveyorTurntableDescriptor<T> getLibraryDescriptor()

postInitialize

@AnyLogicInternalAPI
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
Overrides:
postInitialize in class ConveyorNode<T extends Agent>

isTakeSpeedOfConnectedConveyors

@AnyLogicInternalAPI
public boolean isTakeSpeedOfConnectedConveyors()
Specified by:
isTakeSpeedOfConnectedConveyors in class ConveyorTransitionalNode<T extends Agent>

getSpeed

public double getSpeed(SpeedUnits units)
Returns the speed of the turntable in the specified speed units.
Specified by:
getSpeed in interface com.anylogic.engine.markup.material_handling.IConveyorTurntableDescriptor<T extends Agent>
Specified by:
getSpeed in class ConveyorTransitionalNode<T extends Agent>
Parameters:
units - - a constant defining the speed units
Returns:
the speed of the turntable

setSpeed

public void setSpeed(double speed,
 SpeedUnits units)
Sets the new speed of the turntable in the specified speed units.
Specified by:
setSpeed in interface com.anylogic.engine.markup.material_handling.IConveyorTurntableDescriptor<T extends Agent>
Parameters:
speed - - a new speed value
units - - a constant defining the speed units

setRotationSpeed

public void setRotationSpeed(double rotationSpeed,
 RotationSpeedUnits units)
Sets the turntable's rotation speed (in the specified speed units) when switcing from one conveyor to another.
Specified by:
setRotationSpeed in interface com.anylogic.engine.markup.material_handling.IConveyorTurntableDescriptor<T extends Agent>
Parameters:
rotationSpeed - - a new time value
units - - a constant defining the time units

getRotationSpeed

public double getRotationSpeed(RotationSpeedUnits units)
Returns the turntable's rotation speed (in the specified rotation units).
Specified by:
getRotationSpeed in interface com.anylogic.engine.markup.material_handling.IConveyorTurntableDescriptor<T extends Agent>
Parameters:
units - - a constant defining the time units
Returns:
the turntable's rotation speed

size

public int size()
Returns the current number of agents (material items) on the turntable
Specified by:
size in interface com.anylogic.engine.markup.material_handling.IMaterialAreaLocation<T extends Agent>
Returns:
the current number of agents on the turntable

getAgent

public T getAgent(int index)
Returns the agent (material item) that is currently located on the turntable
Specified by:
getAgent in interface com.anylogic.engine.markup.material_handling.IMaterialAreaLocation<T extends Agent>
Parameters:
index - - the index
Returns:
the agent

getAgents

public List<T> getAgents()
Returns the list of agents (material items) that are currently located on the turntable
Specified by:
getAgents in interface com.anylogic.engine.markup.material_handling.IMaterialAreaLocation<T extends Agent>
Returns:
the list of agents

contains

public boolean contains(Agent agent)
Returns true is the given agent (material item) is on the turntable, returns false otherwise
Specified by:
contains in interface com.anylogic.engine.markup.material_handling.IMaterialPointLocation<T extends Agent>
Parameters:
agent - - the agent
Returns:
true is the given agent is on the turntable, returns false otherwise

removeAgent

public boolean removeAgent(Agent agent)
Removes the given agent from the turntable. The agent will be removed only if it is currently located on the turntable.
Specified by:
removeAgent in interface com.anylogic.engine.markup.material_handling.IMaterialAreaLocation<T extends Agent>
Parameters:
agent - - the agent (material item) to be removed from the turntable.
Returns:
if the agent was removed successfully, returns true, otherwise returns false.

onLeadingEdgeEnter

public void onLeadingEdgeEnter(T agent)
Description copied from interface: com.anylogic.engine.markup.material_handling.IMaterialPointLocation
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.

Callback action.
Specified by:
onLeadingEdgeEnter in interface com.anylogic.engine.markup.material_handling.IMaterialPointLocation<T extends Agent>
Parameters:
agent - the agent.

onTrailingEdgeEnter

public void onTrailingEdgeEnter(T agent)
Description copied from interface: com.anylogic.engine.markup.material_handling.IMaterialAreaLocation
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.

Callback action.
Specified by:
onTrailingEdgeEnter in interface com.anylogic.engine.markup.material_handling.IMaterialAreaLocation<T extends Agent>
Parameters:
agent - the agent.

onLeadingEdgeExit

public void onLeadingEdgeExit(T agent)
Description copied from interface: com.anylogic.engine.markup.material_handling.IMaterialAreaLocation
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.

Callback action.
Specified by:
onLeadingEdgeExit in interface com.anylogic.engine.markup.material_handling.IMaterialAreaLocation<T extends Agent>
Parameters:
agent - the agent.

onTrailingEdgeExit

public void onTrailingEdgeExit(T agent)
Description copied from interface: com.anylogic.engine.markup.material_handling.IMaterialPointLocation
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.

Callback action.
Specified by:
onTrailingEdgeExit in interface com.anylogic.engine.markup.material_handling.IMaterialPointLocation<T extends Agent>
Parameters:
agent - the agent.

isFailed

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

fail

public void fail()
Initiates turntable failure. The turntable stops.
Specified by:
fail in interface com.anylogic.engine.markup.material_handling.IMaterialFallible

repair

public void repair()
Repairs the turntable, makes it available again.
Specified by:
repair in interface com.anylogic.engine.markup.material_handling.IMaterialFallible

recalculatePriorities

public void recalculatePriorities()
Specified by:
recalculatePriorities in interface com.anylogic.engine.markup.material_handling.IConveyorTurntableDescriptor<T extends Agent>

getLevel

public Level getLevel()
Returns the level that this turntable is contained in
Specified by:
getLevel in interface HasLevel
Overrides:
getLevel in class ConveyorMarkupElement<T extends Agent>
Returns:
the level associated with this space markup element

isObstacle

public boolean isObstacle()
Returns true if this turntable is considered an obstacle by transporters moving in free space mode. Otherwise, returns false.
Returns:
a flag that tells whether this turntable is an obstacle or not

setObstacle

public void setObstacle(boolean isObstacle)
Sets this turntable as an obstacle for transporters moving in free space mode. The table should be uninitialized
Parameters:
isObstacle - if true, the turntable is set as an obstacle. Otherwise, not.