TransporterFleet

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

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

Transporters have their home locations where they can optionally return. The transporters in one fleet can have individual properties, can be animated, collect unit-based statistics, etc.

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

If needed, you can manage the routing of transporters moving along network paths with the help of TransporterControl block and provide 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 specify individual routing rules for a single transporter fleet, select the Custom routing option in the properties of the corresponding TransporterFleet block.

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
Set new value at runtime: set_navigationType(new value)
Valid values: TransporterFleet.LINE_BASED_NAVIGATIONTransporterFleet.FREE_SPACE_NAVIGATION
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
Set new value at runtime: set_capacityDefinition Type(new value)
Valid values: TransporterFleet.CAPACITY_DIRECT
                     
TransporterFleet.CAPACITY_SCHEDULE
Capacity
[Visible and applies only if the 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: r 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.
Syntax: Schedule capacitySchedule
Set new value at runtime: set_capacitySchedule(new value)
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
Set new value at runtime: set_homeNodes(new value)
Turn radius
[Visible and applies only if the Free space option is selected in Navigation type parameter] The radius of the smallest circular turn that the transporter can execute.
Syntax: double turnRadius
Set new value at runtime: set_turnRadius(new value)
Min distance to obstacle [dynamic]
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 object, 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)
Default value: 1 m/s
Limit speed near obstacle [dynamic]
[Visible and applies only if the 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
Set new value at runtime: set_isSpeedLimitedNearObstacle(new value)
Max speed near obstacle [dynamic]
[Visible and applies only if the 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 meter per second
Transporter
New transporter [dynamic]
Specify here the type of the transporters in this fleet.
Type of value: Agent
Set dimensions [dynamic]
If selected, you can alter the dimensions (length, width, height) of the transporters in this fleet.
Type of value: boolean
Local variable:  unit - the transporter
Length [dynamic]
[Visible and applies only if the Set dimensions option is selected] The length of the transporter.
Type of value: double
Local variable:  unit - the just created transporter
Width [dynamic]
[Visible and applies only if the Set dimensions option is selected] The width of the transporter.
Type of value: double
Local variable:  unit - the just created transporter
Height [dynamic]
[Visible and applies only if the Set dimensions option is selected] The height of the transporter.
Type of value: double
Local variable:  unit - the just created transporter
Maximum speed [dynamic]
The maximum speed of the transporter.
Type of value: double
Local variable:  unit - the just created transporter
Limit speed on curves [dynamic]
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 segmet, 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)
Maximim speed on curves [dynamic]
[Visible and applies only if the Limit speed on curves option is selected] Maximum permitted speed of the transporter when it enters the curved segment of the network. Note, that 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 maximimSpeedOnCurvedSegment
Set new value at runtime: set_maximumSpeedOnCurvedSegment(new value)
Default value: 1 meter per second
Acceleration [dynamic]
The acceleration of the transporter.
Type of value: double
Local variable:  unit - the just created transporter
Deceleration [dynamic]
The deceleration of the transporter.
Type of value: double
Local variable:  unit - the just created transporter
Delay for route calculation [dynamic]
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.
Type of value: double
Local variable: T unit - the transporter     
Advanced
Custom routing
If selected, you can override automatic routing algorithm which calculates the shortest path from source to target and specify your own route for the transporters. The route specified in this parameter will override any routing settings specified in TransporterControl block.
Find path [dynamic]
Here you can define a custom routing algorithm as a function returning the route (RouteData object).
Type of value: 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.
Type of value: 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.
Type of value: 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.
Type of value: 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 [dynamic]
[Visible if Add transporters to is set 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 [code]
Here you can type Java code to be executed when new transporter is generated (it can be used for additional setup).
Local variable:  unit - the just created transporter
On seize [code]
Here you can type Java code to be executed when a transporter is seized.
Local variables:  unit - the transporter that is seized
                             Agent agent - the agent seizing the transporter
On release [code]
Here you can type Java code to be executed when a transporter is released.
Local variables:  unit - the transporter that is released
                             Agent agent - the agent releasing the transporter
On transporter state changed [code]
Here you can type Java code to be executed when a transporter state changes.
Local variablesunit - 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 [code]
Here you can type Java code to be executed when a transporter enters a path.
Local variables:  unit - the transporter that enters the path
                             Path path - the path the transporter enters
On exit path [code]
Here you can type Java code to be executed when a transporter exits a path.
Local variables:  unit - the transporter that exits the path
                             Path path - the path the transporter exits
On enter node [code]
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:  unit - the transporter that enters the node
                             Node node - the node the transporter enters
On exit node [code]
Here you can type Java code to be executed when a transporter exits a node.
Local variables:  unit - the transporter that exits the node
                             Node node - the node the transporter exits

Functions

double utilization() - Returns utilization of this transportation fleet. The returned value is the mean over all individual unit utilization, calculated from the most recent resetStats() call up to current time. 

int numberOfIdle()- Returns the number of currently idle transporters.

int numberOfBusy() - Returns the number of busy transporters.

boolean containsTransporter(Agent unit) - Checks whether the transportation fleet contains the specified transporter (Returns true, if yes; false otherwise).

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 travelled by individual transporters (see Transporter API).

Collection<ResourceRequest> getRequests() - Returns the current queue of requests for transporters of this transporter fleet, ordered by their priority. This list is unmodifiable.

Iterator iterator() - Returns the iterator over transporters in this fleet.

RouteData findShortestPath (ILocation source, ILocation target, Node[], nodesToAvoid, Path[], pathsToAvoid) - define a custom routing algorithm.