AnyLogic
Expand
Font size

SeizeTransporter

Seizes one transporter from the specified fleet defined by the TransporterFleet block. Sends the seized transporter to the specified location.

Use the ReleaseTransporter block to release the seized transporter. All seized transporters must be released before the agent (material item) is disposed.

Demo model: SeizeTransporter and ReleaseTransporter Open the model page in AnyLogic Cloud. There you can run the model or download it (by clicking Model source files).

Parameters

Fleet
TransporterFleet block defining the fleet of transporters. This block will seize one transporter from this fleet.
Value type: TransporterFleet
Local variable: T agent — the agent
Destination is
Defines where the transporter will be sent. The transporter can be sent to:
Agent — transporter is sent to the current agent location
Node — transporter is sent to the specified network node
Attractor — transporter is sent to the specified attractor
Path — transporter is sent to the specified path
Conveyor — transporter is sent to the specified conveyor
Position on conveyor — transporter is sent to the specified position on conveyor
Conveyor station — transporter is sent to the specified station
(x, y, z) — transporter is sent to the point with the specified coordinates
Syntax: SeizeTransporter.DestinationType destinationType
Valid values:
SeizeTransporter.DEST_AGENT
SeizeTransporter.DEST_NODE
SeizeTransporter.DEST_ATTRACTOR
SeizeTransporter.DEST_PATH
SeizeTransporter.DEST_CONVEYOR
SeizeTransporter.DEST_POSITION_ON_CONVEYOR
SeizeTransporter.DEST_CONVEYOR_STATION
SeizeTransporter.DEST_XYZ
Node
[Visible and applies only if Destination is: Node]
The network node the transporter will move to.
Value type: Node
Local variables:
T agent — the agent
Agent unit — the transporter
Attractor
[Visible and applies only if Destination is: Attractor]
The attractor the transporter will move to.
Value type: Attractor
Local variables:
T agent — the agent
Agent unit — the transporter
Path
[Visible and applies only if Destination is: Path]
The path the transporter will move to.
Value type: Path
Local variables:
T agent — the agent
Agent transporter — the transporter
Conveyor
[Visible and applies only if Destination is: Conveyor]
The conveyor the transporter will move to.
Value type: ConveyorPath
Local variables:
T agent — the agent
Agent unit — the transporter
Offset from
[Visible and applies only if Destination is: Path or Conveyor]
Defines how to calculate the offset of the exact point on a path or a conveyor the transporter will move to: from The beginning of the conveyor/path or from The end of the conveyor/path.
Value type: boolean
Local variables:
T agent — the agent
Agent unit — the transporter
Offset
[Visible and applies only if Destination is: Path or Conveyor]
The distance from the start or end point of the path/conveyor (depends on the Offset from parameter) defining the exact destination point for the transporter.
Value type: double
Local variables:
T agent — the agent
Agent unit — the transporter
Position on conveyor
[Visible and applies only if Destination is: Position on conveyor]
The position on conveyor the transporter will move to.
Value type: PositionOnConveyor
Local variables:
T agent — the agent
Agent unit — the transporter
Conveyor station
[Visible and applies only if Destination is: Conveyor station]
The station the transporter will move to.
Value type: ConveyorStation
Local variables:
T agent — the agent
Agent unit — the transporter
X, Y, Z
[Visible and applies only if Destination is: (x, y, z)]
X, Y, Z coordinates of the point the seized transporter will move to.
Value type: double
Local variables:
T agent — the agent
Agent unit — the transporter
... located in
[Visible and applies only if Destination is: (x, y, z)]
Specifies where the agent (material item) will be added to upon releasing the transporter: either Level or Network.
Value type: boolean destinationInNetwork
Default value: false
Level
[Visible and applies only if ...located in Level option is selected]
The level the agent will be added to once the transporter is released.
Value type: Level
Local variables:
T agent — the agent
Agent unit — the transporter
Network
[Visible and applies only if ...located in Network option is selected]
The network the agent will be added to once the transporter is released.
Value type: INetwork
Local variables:
T agent — the agent
Agent unit — the transporter

Priorities

Task priority
The priority of the task for the incoming agent (the larger the higher).
Value type: double
Local variable: T agent — the agent
Task may preempt
If the option is selected, this task may preempt other tasks of the requested transporter.
Value type: boolean
Local variable: T agent — the agent
Task preemption policy
Here you can choose what is done when some other task incomes for the transporter.
No preemption — the current task continues executing
Seize any resource — the task is interrupted and tries to seize any transporter of the specified type
Value type: SeizeTransporter.TransporterTaskPreemptionPolicy
Local variable: T agent — the agent
Valid values:
TransporterTaskPreemptionPolicy.PP_NO_PREEMPTION
TransporterTaskPreemptionPolicy.PP_SEIZE_ANY_RESOURCE

Advanced

Customize transporter choice
If the option is selected, you can choose the specific transporter for the operation (using Transporter choice condition below).
Syntax: boolean customizeTransporterChoice
Transporter choice condition
[Visible if Customize transporter choice option is selected] Here you can specify a boolean expression that will be checked to find the specific transporter that may perform the operation. If none of the currently available transporters satisfy the specified condition (the condition returns false), the block will wait for the first transporter that matches the condition to become available. Usually you define some field inside the agent type (say, transport), store there the reference to the transporter when it starts working with this agent (agent.transport=transporter), and then specify here the condition agent.transport==transporter enabling only this particular transporter to continue working with this particular agent — material item.
Value type: boolean
Local variables:
T agent — the agent
Agent unit — the transporter TransporterFleet fleet — the fleet
Dispatching policy
Here you specify how the block chooses a transporter to perform the agent operation. If Customize transporter choice option is set, the transporter will be chosen from the subset returned by the algorithm in Transporter choice condition parameter. The possible options are:
Nearest to agent — A transporter that is the nearest to the current agent. The distance to the agent is calculated in a straight line, not taking into account any possible obstacles (for transporters with free space navigation) or the length of the actual route in the network (for transporters with path-guided navigation).
Shortest path to destination — A transporter whose route to the destination is the shortest.
The most preferred — AnyLogic will choose a transporter by comparing transporters to each other. You should place the comparison algorithm in the "unit1 is preferred to unit2" parameter below.
Transporter with top rating — A transporter with the top rating. You can define the rating (or rating calculation algorithm) in the Transporter rating parameter below.
Off (chooses some matching transporter) — The dispatching policy is not applied.
Syntax: SeizeTransporter.DispatchingPolicy dispatchingPolicy
Valid values:
SeizeTransporter.DISPATCHING_POLICY_NEAREST - Nearest to the agent
SeizeTransporter.DISPATCHING_POLICY_SHORTEST_PATH - Shortest path
SeizeTransporter.DISPATCHING_POLICY_SHORTEST_PATH - Shortest path to destination
SeizeTransporter.DISPATCHING_POLICY_BASED_ON_COMPARISON - The most preferred
SeizeTransporter.DISPATCHING_POLICY_BASED_ON_RATING_VALUE - Transporter with top rating
SeizeTransporter.DISPATCHING_POLICY_SOME_TRANSPORTER - Off (chooses some matching transporter)
"unit1 is preferred to unit2"
[Visible and applies only if Dispatching policy: The most preferred]
The comparison algorithm (or its call) that is used for choosing a transporter for the given agent. The algorithm compares transporters to each other. It should return true if the transporter unit1 has higher preference than the transporter unit2 (and false otherwise, including the case of choice equality). The algorithm should provide transitiveness.
Value type: boolean
Local variables:
Agent unit1 — the first transporter to be compared
Agent unit2 — the second transporter to be compared
T agent — the current agent
Transporter rating
[Visible and applies only if Dispatching policy: Transporter with top rating] The rating value of this transporter. The rating is used to choose a transporter for the given agent (the larger the higher, transporter with the top rating value will be chosen).
Value type: double
Default value: 0
Local variables:
Agent unit — the transporter
T agent — the current agent
Canceled transporter
Defines the behavior of the transporter that has been seized by the time the agent was already removed from this block either due to timeout/preemption or by the call of the remove() function. Depending on your choice, the transporter:
Returns to current home location
Returns to the nearest home location (selected from the list of the locations specified in the properties of the TransporterFleet block). Once the transporter returns to the node that satisfies this condition, this node will become the current home location for this transporter.
Goes to... — the location specified in the Destination is parameter
Remains where it is
Value type: ReleaseTransporter.TransporterReleaseMovingPolicy
Local variable: Agent unit — the canceled transporter Valid values:
SeizeTransporter.MP_RETURNS_TO_HOME — Returns to current home location
SeizeTransporter.MP_RETURNS_TO_NEAREST_HOME — Returns to the nearest location
SeizeTransporter.MP_GO_TO — Goes to...
SeizeTransporter.MP_STAYS_WHERE_IT_IS — Stays where it is
Destination is
Defines where the transporter will move after being canceled. The possible destinations are:
Node — transporter moves to the specified network node
Attractor — transporter moves to the specified attractor
Path — transporter moves to the specified path
Conveyor — transporter moves to the specified conveyor
Position on conveyor — transporter moves to the specified position on conveyor
Conveyor station — transporter moves to the specified station
(x, y, z) — transporter moves to the point with the specified coordinates
Syntax: DestinationType canceledDestinationType
Valid values:
SeizeTransporter.CANCELED_NODE
SeizeTransporter.CANCELED_ATTRACTOR
SeizeTransporter.CANCELED_PATH
SeizeTransporter.CANCELED_CONVEYOR
SeizeTransporter.CANCELED_POSITION_ON_CONVEYOR
SeizeTransporter.CANCELED_CONVEYOR_STATION
SeizeTransporter.CANCELED_XYZ
Node
[Visible and applies only if Destination is: Node]
The network node the transporter will move to.
Value type: Node
Local variable: Agent unit — the transporter
Attractor
[Visible and applies only if Destination is: Attractor]
The attractor the transporter will move to.
Value type: Attractor
Local variable: Agent unit — the transporter
Path
[Visible and applies only if Destination is: Path]
The path the transporter will move to.
Value type: Path
Local variable: Agent unit — the transporter
Conveyor
[Visible and applies only if Destination is: Conveyor]
The conveyor the transporter will move to.
Value type: ConveyorPath
Local variable: Agent unit — the transporter
Offset from
[Visible and applies only if Destination is: Path or Conveyor]
Defines how to calculate the offset of the exact point on a path or a conveyor the transporter will move to: from The beginning of the conveyor/path or from The end of the conveyor/path.
Value type: boolean
Local variable: Agent unit — the transporter
Offset
[Visible and applies only if Destination is: Path or Conveyor]
The distance from the start or end point of the path/conveyor (depends on the Offset from parameter) defining the exact destination point for the transporter.
Value type: double
Local variable: Agent unit — the transporter
Position on conveyor
[Visible and applies only if Destination is: Position on conveyor]
The position on conveyor the transporter will move to.
Value type: PositionOnConveyor
Local variable: Agent unit — the transporter
Conveyor station
[Visible and applies only if Destination is: Conveyor station]
The station the transporter will move to.
Value type: ConveyorStation
Local variable: Agent unit — the transporter
X, Y, Z
[Visible and applies only if Destination is: (x, y, z)]
X, Y, Z coordinates of the point the transporter will move to.
Value type: double
Local variable: Agent unit — the transporter
... located in
[Visible and applies only if Destination is: (x, y, z)]
Specifies where the transporter will be added to after cancellation: either Level or Network.
Value type: boolean destinationInNetwork
Default value: false
Level
[Visible and applies only if ...located in Level option is selected]
The level the transporter will be added to once it is canceled.
Value type: Level
Local variable: Agent unit — the transporter
Network
[Visible and applies only if ...located in Network option is selected]
The network the transporter will be added to once it is canceled.
Value type: INetwork
Local variable: Agent unit — the transporter

Actions

On enter
Here you can type Java code that will be executed when the agent (material item) enters the block.
Local variable: T agent — the agent
On seize transporter
Here you can type Java code that will be executed when the agent (material item) seizes the transporter.
Local variable:
T agent — the agent
Agent unit — the transporter
On remove
Here you can type Java code that will be executed when the agent (material item) is removed from the block.
Local variable: T agent — the agent
On exit
Here you can type Java code that will be executed when the agent (material item) exits the block.
Local variable: T agent — the agent
On task suspended
[Visible and applies only if Task preemption policy: Seize any resource]
Callback for action executed when agent task is suspended because of Seize any resource preemption policy, when its transporter gets grabbed by another task with a higher priority.
Local variables:
T agent — the agent
Agent unit — the transporter
On task resumed
[Visible and applies only if Task preemption policy: Seize any resource]
Callback for action executed when agent resumes processing after it has been suspended because of Seize any resource preemption policy.
Local variables:
T agent — the agent
Agent unit — the transporter

Functions

SeizeTransporter functions
Function Description
T get(int index) Returns the agent at a given position specified by index (counted from 0). Throws error in case of invalid (or out-of-bounds) index.
int size() Returns the number of agents in the embedded queue.
void recalculateResourceChoiceConditions() Recalculates the resource choice conditions for all agents currently in the block.
void recalculateResourceChoiceConditions(Agent agent) Recalculates the resource choice conditions for the given agent.
T suspend(Agent agent) Suspends the operation with the given agent until the resume() function is called.
T resume(Agent agent) Resumes the previously suspended operation with the given agent.

Ports

in
The input port.
out
The output port.
How can we improve this article?