AnyLogic
Expand
Font size

Tugger trains

A tugger train is a vehicle that pulls multiple material handling trailers. You can set up a transporter to be a tugger train in the properties of the TransporterFleet block to give it additional properties and behavior specifics.

Tugger trains support multiple trailers, and the number of trailers can be changed during simulation. Trailers follow the tugger’s movement both on the network and in free space, in realistic motion. Trailers are implemented as separate agents, which means you can customize their animation and logic.

A tugger train can operate with multiple agents at the same time. Built-in policies allow efficient task distribution between tuggers and define the delivery order.

Demo model: Tugger Train Open the model page in AnyLogic Cloud. There you can run the model or download it (by clicking Model source files). Demo model: Tugger TrainOpen the model in your AnyLogic desktop installation.

This article focuses on the behavior specifics of tugger trains: task distribution, handling multiple agents, and post-delivery behavior.

Seizing a transporter

To seize a transporter, use the SeizeTransporter block or configure the MoveByTransporter block to seize one as part of its process.

When an agent enters the block, it looks for a tugger with available trailers or the ability to create them. It also checks if the condition specified in the Transporter choice condition is met, provided the Customize transporter choice option is selected. Among the eligible tuggers, the one that best matches the Dispatching policy is selected.

The following settings in the TransporterFleet block also affect the transporter choice:

  • If the Prefer partially filled transporters option is selected, priority is given to a tugger that has already picked up some agents.
  • If Number of trailers: equals the number of agents in the TransporterFleet properties, the trailer for an agent is generated automatically, even if the tugger initially has no trailers.

If the selected tugger is currently in the IDLE or WAITING state, the agent seizes it immediately, and the tugger starts moving toward the agent. If the tugger is already moving to another agent and its task cannot be preempted, the agent reserves a place in one of the tugger’s trailers and waits until the tugger can pick it up. For more details on dispatching and task distribution, see the section on tugger dispatching.

After the tugger picks up the agent, the agent exits the SeizeTransporter block. If the next block in the flowchart is not MoveByTransporter or ReleaseTransporter, the tugger remains at the pickup location. The agent may continue its animation according to the subsequent blocks, but the tugger will only start moving after the agent enters MoveByTransporter or ReleaseTransporter, or receives a move() command.

At any point during the pickup process, the tugger has a controlling agent, that is, the agent it is currently moving toward or loading. This agent can be obtained using the getControllingAgent() function of the transporter; see Transporter API.

Starting and finishing the movement

When a tugger picks up an agent (that is, after the loading is completed or the agent enters the MoveByTransporter block with the Seize transporter option disabled), the tugger decides whether to collect more agents or begin delivery based on the Delivery starts when policy. If no other agents are reserved, the tugger may enter a WAITING state for a configured duration; otherwise, it may continue collecting agents or start delivery according to the policy.

When a tugger starts delivery, it selects the agent whose destination is closest and moves toward it. This agent becomes the controlling agent.

  • If the MoveByTransporter block has the Release transporter option enabled, all agents with the same destination exit the block one by one upon arrival.
  • If the MoveByTransporter block has the Release transporter option disabled, agents with the same destination exit the block simultaneously but do not release the transporter. They are still considered transported until they pass through a ReleaseTransporter block. During this time, the tugger waits and does not move until all transported agents either release it or enter any MoveByTransporter again.
Once all agents are collected again, the tugger selects the closest destination, which may result in a change of the controlling agent.
Demo model: Tugger Train Delivery Policies Open the model page in AnyLogic Cloud. There you can run the model or download it (by clicking Model source files). Demo model: Tugger Train Delivery PoliciesOpen the model in your AnyLogic desktop installation.

When an agent passes through the ReleaseTransporter block, it releases the tugger and is no longer associated with it. If this agent was the controlling one, the tugger selects a new controlling agent from the transported agents based on the closest destination.

Dispatching tuggers

Agents entering the SeizeTransporter or MoveByTransporter blocks are placed into the TransporterFleet queue if no suitable transporter is immediately available. The queue is ordered by priority.

An agent can either seize a tugger immediately (if a trailer is free and priority is sufficient) or reserve a spot. Reservations are strictly capacity-based and do not interfere with already loaded agents. A reservation is canceled if:

  • The agent is picked up.
  • A higher-priority agent preempts it.
  • The tugger’s capacity is reduced.
  • The tugger becomes unavailable (for example, due to downtime).

If a reservation is lost and the agent still requires transportation, it returns to the general TransporterFleet queue and waits again for a transporter.

While pickup generally follows priority and preemption rules, a tugger might pick up multiple agents at the same location in separate passes if their priorities or queue positions differ.

Behavior during downtime

For tugger trains and multi-load transporters, the After cycle downtime option is based on completed transportation cycles rather than on the number of transported agents. Regardless of how many agents are loaded, transported, or unloaded during a trip, the entire trip counts as a single cycle. Thus, downtime begins only after the delivery has been fully completed. A transporter does not start downtime while in the WAITING state unless downtime preemption is enabled.

If downtime interrupts movement, all agents being transported by tugger train are placed at the position of the tugger, they are not placed at the positions of the individual trailers.

If downtime interrupts the unloading, the transporter completes unloading of the current agent after downtime ends. The transporter may then proceed with its next task even if other agents from the same load remain on board.

Interaction with other model elements

To learn about specifics of the tugger trains’ behavior in free space and path guided navigation, see the corresponding articles.

Storage

  • When loading from or unloading to a rack, a tugger train remains in the aisle and does not align itself with the rack cell. The train stops at the target location, while the loading or unloading animation is performed independently of the train.
  • For drive-in storage, a tugger train does not enter the rack structure. The transported agent moves between the train and the rack cell while the train remains in the aisle.

Lifts

  • A tugger train can use lifts in the same way as other transporters.
  • If the length of a tugger train exceeds the dimensions of the lift platform, AnyLogic displays a warning but still allows the train to enter the lift.
  • To minimize the portion of the train extending beyond the platform, the train is positioned along the longer dimension of the lift. The center of the train is aligned with the center of the lift platform.
  • A tugger train is considered to have entered the lift when the center of the train reaches the center of the lift platform.
  • A tugger train is considered to have left the lift when the tugger crosses the boundary of the lift platform.
How can we improve this article?