AnyLogic
Expand
Font size
All Implemented Interfaces:
AggregatableAnimationElement, HasLevel, INetworkMarkupElement, SVGElement, Serializable
Direct Known Subclasses:
ConveyorSimpleStation

public abstract class ConveyorStation<T extends Agent>
extends ConveyorPathPart<T>
See Also:
Serialized Form

Constructor Summary

ConstructorDescription
ConveyorStation(ConveyorPath<? extends T> conveyor) 
ConveyorStation(ConveyorPath<? extends T> conveyor, double offset, double lengthInMeters)
Constructor
ConveyorStation(ConveyorPath<? extends T> conveyor, ShapeDrawMode drawMode, boolean isPublic, double offset, double lengthInMeters)
Constructor

Method Summary

Modifier and TypeMethodDescription
booleancontains(double px, double py)
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e.
doublegetLength(LengthUnits units)
Returns the length of this element
doublegetNearestPoint(Point givenPoint, Point out)
Calculates (using the output object) the point in this space markup element nearest to the given point.
PointrandomPointInside(Random rng, Point out)
Returns the randomly chosen point inside/along the given space markup element.
voidsetLength(double length, LengthUnits units)
Sets length of this conveyor part in XY-projection, measured in the given units.
voidsetNetwork(ConveyorNetwork network)
Sets the network for this element.

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

getConveyor, getOffset, getOffset, setConveyor, setOffset, setOffset

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

getLevel, getNetwork

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.AggregatableAnimationElement

postInitialize

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

getSpace, randomPointInside, randomPointInside, randomPointInside

Constructor Details

ConveyorStation

public ConveyorStation(ConveyorPath<? extends T> conveyor)

ConveyorStation

public ConveyorStation(ConveyorPath<? extends T> conveyor,
 double offset,
 double lengthInMeters)
Constructor
Parameters:
conveyor - the conveyor
offset - offset measured from the beginning of conveyor to the end of this station, in pixels.
lengthInMeters - the length of this station in meters.

ConveyorStation

public ConveyorStation(ConveyorPath<? extends T> conveyor,
 ShapeDrawMode drawMode,
 boolean isPublic,
 double offset,
 double lengthInMeters)
Constructor
Parameters:
conveyor - the conveyor
drawMode -
isPublic -
offset - offset measured from the beginning of conveyor to the end of this station, in pixels.
lengthInMeters - the length of this station in meters.

Method Details

setNetwork

public void setNetwork(ConveyorNetwork network)
Description copied from class: ConveyorMarkupElement
Sets the network for this element. The element should be uninitialized
Overrides:
setNetwork in class ConveyorMarkupElement<T extends Agent>
Parameters:
network - new network

getLength

public double getLength(LengthUnits units)
Returns the length of this element
Parameters:
units - length units
Returns:
the length of this element

setLength

public void setLength(double length,
 LengthUnits units)
Sets length of this conveyor part in XY-projection, measured in the given units.
Parameters:
length - , measured in the given units

getNearestPoint

public double getNearestPoint(Point givenPoint,
 Point out)
Description copied from interface: INetworkMarkupElement
Calculates (using the output object) the point in this space markup element nearest to the given point. Returns the square of distance to the point.
Parameters:
givenPoint - given point
out - the output point to write result to.
Returns:
the square of distance to the nearest point

randomPointInside

public Point randomPointInside(Random rng,
 Point out)
Description copied from interface: INetworkMarkupElement
Returns the randomly chosen point inside/along the given space markup element. This method utilises the given Random Number Generator.
Parameters:
rng - the random number generator.
out - output object to write to, may be null
Returns:
the randomly chosen point

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 interface INetworkMarkupElement
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