AnyLogic
Expand
Font size

TransporterFleet

AnyLogic: The TransporterFleet block

Defines a fleet of transporters that can be seized and released by agents (material items) using the SeizeTransporter and ReleaseTransporter flowchart blocks of the Material Handling library.

An example of a transporter is an AGV automated guided vehicle (AGV).

Transporters have their home locations to which they can optionally return. The transporters in one fleet can have individual properties, can be animated, collect unit-based statistics, and so on.

Depending on the selected navigation type, transporters can move either along network paths and nodes or in free space. By default, transporters take the most efficient route to their destination.

If necessary, you can manage the routing of transporters moving along the network paths using the TransporterControl block and set the route selection algorithm as a dynamic value in the Find path parameter. The setting specified in this block will affect all transporter fleets with path-guided type of navigation. To set individual routing rules for a single transporter fleet, select the Custom routing option in the properties of the corresponding TransporterFleet block.

You can change the capacity of the fleet at runtime using the set_capacity() function. When decreasing the capacity, the behavior of the transporters will differ depending on their current state:

  • If the transporter has already been seized and is currently moving to the agent or transporting the agent to the destination point, it will be removed only after the task has been completed, that is, when the agent has been successfully transported.
  • If the function is called after the transporter has been released, it will be removed either immediately or upon reaching the home location. This behavior depends on the setting of the Returns parameter of the MoveByTransporter block.
  • If the function is called while the transporter is in the moving lift, it will be removed and the lift will proceed with its own tasks.

Parameters

Navigation type
Here you can select how the transporters of the fleet will conduct their movement to the target point. Path-guided navigation is selected to model transporters that move along predetermined paths. Free space navigation is selected to model transporters that can detect their surroundings and move towards the target arbitrarily.
Syntax: TransporterNavigationType navigationType Valid values:
TransporterFleet.PATH_GUIDED_NAVIGATION — Path-guided.
TransporterFleet.FREE_SPACE_NAVIGATION — Free-space.
Recognize all transporters
If selected, the transporters of this fleet will recognize both path-guided and free-space transporters in your model as obstacles and behave accordingly. Otherwise, only the transporters with the same navigation type will be recognized as obstacles.
Syntax: boolean recognizeAllTransporters
Set new value at runtime: set_recognizeAllTransporters(new value)
Capacity defined
Here you can select the method of defining how many transporters there are in the fleet: either Directly or by Schedule.
Syntax: TransporterFleet.CapacityDefinitionType capacityDefinitionType
Valid values:
TransporterFleet.CAPACITY_DIRECT
TransporterFleet.CAPACITY_SCHEDULE
Capacity
[Visible and applies only if Directly option is set]
Here you can directly define the number of transporters in this fleet. This number must not exceed the number of attractors (if any) placed at the home location.
Syntax: int capacity
Set new value at runtime: set_capacity(new value)
Schedule
Here you can specify the schedule that defines the number of transporters in the fleet.
Make sure to use the schedule of the integer type.
Syntax: Schedule capacitySchedule
Home locations
The location transporters are based at and may return to when released. Home location can be defined by a Rectangular Node, a Polygonal Node or a Point Node. The rectangular and polygonal nodes can contain Attractors, serving as specific spots for transporters. The number of attractors you place within the nodes defines the maximum number of transporters they can accept. Empty rectangular and polygonal nodes may accept unlimited number of transporters. Point Node may contain one transporter only.
Syntax: AreaNode[] homeNodes
Turn radius
[Visible and applies only if Navigation type: Free space]
The radius of the smallest circular turn that the transporter can execute.
Syntax: double turnRadius
Min distance to obstacle
Here you can define how close a transporter of this fleet can get to an obstacle. The distance is calculated from the edge of the transporter. For transporters with path-guided navigation the obstacle is another transporter (of this and other fleets with path-guided navigation). The restriction is only applied when the transporter is minding the distance to the transporter situated in front of it. For transporters with free-space navigation the obstacle is a static element, e.g., a wall, a conveyor, etc. Transporters can bypass the restriction to avoid collisions with other transporters or when there is not enough space for movement, e.g. the distance between two walls where the transporter must pass is less than the value specified in this property.
Syntax: double minDistanceToObstacle
Set new value at runtime: set_minDistanceToObstacle(new value)
This function can be used only for transporters with path-guided navigation.
Default value: 1 m/s
Limit speed near obstacle
[Visible and applies only if Free space option is selected]
Select this check box if you want to limit the transporter's speed when the distance from the transporter to the obstacle becomes less than the value specified in the Min distance to obstacle parameter.
Syntax: boolean isSpeedLimitedNearObstacle
Max speed near obstacle
[Visible and applies only if Limit speed near obstacle option is selected]
Maximum permitted speed of the transporter when the distance to the obstacle is less than specified in the Min distance to obstacle parameter.
Syntax: double maxSpeedNearObstacle
Set new value at runtime: set_maxSpeedNearObstacle(new value)
Default value: 1 m/s

Transporter

New transporter
Specify here the type of the transporters in this fleet.
Value type: Agent
Set dimensions
If selected, you can alter the dimensions (length, width, height) of the transporters in this fleet.
Value type: boolean
Local variable: T unit — the transporter
Length
[Visible and applies only if Set dimensions option is selected]
The length of the transporter.
Value type: double
Local variable: T unit — the recently created transporter
Width
[Visible and applies only if Set dimensions option is selected]
The width of the transporter.
Value type: double
Local variable: T unit — the recently created transporter
Height
[Visible and applies only if Set dimensions option is selected]
The height of the transporter.
Value type: double
Local variable: T unit — the recently created transporter
Maximum speed
The maximum speed of the transporter.
Value type: double
Local variable: T unit — the recently created transporter
Limit speed on curves
Select this check box if you want to limit the transporter's speed on the curved segments of the network. If transporter decelerate sufficiently in time before entering the curved segment, then once it enters the curved segment, its speed will immediately drop down to the value specified in the Maximum speed on curves parameter.
Syntax: boolean limitSpeedOnCurvedSegment
Set new value at runtime: set_limitSpeedOnCurvedSegment(new value)
Maximum speed on curves
[Visible and applies only if Limit speed on curves option is selected]
Maximum permitted speed of the transporter when it enters the curved segment of the network.
The speed value specified here has a lower priority compared to the speed value specified in Maximum speed parameter, and transporter will only be able to accelerate to the specified maximum speed once it enters the curved segment, no matter the speed value specified here.
Syntax: double maximumSpeedOnCurvedSegment
Set new value at runtime: set_maximumSpeedOnCurvedSegment(new value)
Default value: 1 m/s
Acceleration
The acceleration of the transporter.
Value type: double
Local variable: T unit — the recently created transporter
Deceleration
The deceleration of the transporter.
Value type: double
Local variable: T unit — the recently created transporter
Delay for route calculation
If the transporters of this particular type require some time to calculate the route before moving to the next target and you need to take this into account, here you can specify the required time.
Value type: double
Local variable: T unit — the transporter
Delay to resume movement
Here you can specify the time required for the transporter to start moving again after an obstacle forced it to stop.
Value type: double delayToResumeMovement

Advanced

Custom routing
[Visible and applies only if Navigation type is Path-guided]
If selected, you can override automatic routing algorithm which calculates the shortest path from the source to the target and specify your own route for the transporters. The route specified in this parameter will override any routing settings specified in TransporterControl block.
Syntax: boolean customRouting
Find path
Here you can define a custom routing algorithm as a function returning the route (RouteData object).
Value type: RouteData
Local variables:
T unit — the transporter
Agent agent — the agent
ILocation source — the source
ILocation target — the target
Avoid paths
A path (or several paths) that you want to exclude from the automatically calculated transporter route.
Value type: Path[]
Local variables:
T unit — the transporter
Agent agent — the agent
Avoid nodes
A node (or several nodes) that you want to exclude from the automatically calculated transporter route.
Value type: Node[]
Local variables:
T unit — the transporter
Agent agent — the agent
Include paths
A path (or several paths) that you want to include in the automatically calculated transporter route.
Value type: Path[]
Local variables:
T unit — the transporter
Agent agent — the agent
Add transporters to
Here you specify whether the transporters created by this block will be stored in the default population of top-level agent, or in some custom population (specified below in the Population property).
Syntax: boolean addToCustomPopulation
Default value: Default population (false)
Population
[Visible if Add transporters to: Custom population]
The name of the agent population where the transporters created by this block will be stored.
Value type: AgentList
Local variable: T unit — the transporter

Actions

On new transporter
Here you can type Java code to be executed when new transporter is generated (it can be used for additional setup).
Local variable: T unit — the just created transporter
On seize
Here you can type Java code to be executed when a transporter is seized.
Local variables:
T unit — the transporter that is seized
Agent agent — the agent seizing the transporter
On release
Here you can type Java code to be executed when a transporter is released.
Local variables:
T unit — the transporter that is released
Agent agent — the agent releasing the transporter
On transporter state changed
Here you can type Java code to be executed when a transporter state changes.
Local variables:
T unit — the transporter that changed its state
TransporterState state — the state of the transporter, which can be:

TransporterState.DELIVERING
TransporterState.GOING_TO_AGENT
TransporterState.GOING_HOME
TransporterState.IDLE
TransporterState.PROCESSING
On enter path
Here you can type Java code to be executed when a transporter enters a path.
Local variables:
T unit — the transporter that enters the path
Path path — the path the transporter enters
On exit path
Here you can type Java code to be executed when a transporter exits a path.
Local variables:
T unit — the transporter that exits the path
Path path — the path the transporter exits
On enter node
Here you can type Java code to be executed when a transporter enters a node while moving in the network. There is an exception: the code specified in this field will not be executed when the transporter has just been created in the node. If you want the same code to be executed both when the transporter is created and when the transporter enters the node, duplicate the code from this field in the On new transporter field.
Local variables:
T unit — the transporter that enters the node
Node node — the node the transporter enters
On exit node
Here you can type Java code to be executed when a transporter exits a node.
Local variables:
T unit — the transporter that exits the node
Node node — the node the transporter exits

Functions

Function Description
double utilization() Returns the utilization of this fleet. The value returned is the mean of all individual unit utilization, calculated from the last resetStats() call to the current time.
int numberOfIdle() Returns the number of currently idle transporters.
int numberOfBusy() Returns the number of busy transporters.
int size() Returns the total number of transporters in this transporter fleet.
void resetStats() Resets the statistics collected for this block. Also resets the distance traveled by each transporter (see Transporter API).
boolean containsTransporter(Agent unit) Checks if the transporter fleet contains the specified transporter. Returns true if it does, false otherwise.

unit — The transporter to check the fleet for.
Collection<ResourceRequest> getRequests() Returns the current queue of requests for transporters of this transporter fleet, ordered by their priority. This list is unmodifiable.
RouteData findShortestPath(ILocation source, ILocation target, Node[] nodesToAvoid, Path[] pathsToAvoid) Calculates the shortest path from the source to the target considering the paths and nodes to avoid.

source — The starting location.
Target — The destination location.
nodesToAvoid — The array of nodes to avoid.
pathsToAvoid — The array of paths to avoid.
RouteData findShortestPath(ILocation source, ILocation target, Node[] nodesToAvoid, Path[] pathsToAvoid, Path[] pathsToInclude) Calculates the shortest path from the source to the target considering the paths and nodes to avoid and paths to include.

source — The starting location.
Target — The destination location.
nodesToAvoid — The array of nodes to avoid.
pathsToAvoid — The array of paths to avoid.
pathsToInclude — The array of paths to include in the transporter’s route.
RouteData findShortestPath(T unit, ILocation source, ILocation target, Node[] nodesToAvoid, Path[] pathsToAvoid, Path[] pathsToInclude) Calculates the shortest path from the source to the target for the specified transporter considering the paths and nodes to avoid and paths to include.

unit — The transporter for which to calculate the route.
source — The starting location.
Target — The destination location.
nodesToAvoid — The array of nodes to avoid.
pathsToAvoid — The array of paths to avoid.
pathsToInclude — The array of paths to include in the transporter’s route.
How can we improve this article?