MoveByTransporter

It is the block that performs transportation of an agent by a transporter. You define a fleet of transporters of a certain type using the TransporterFleet block. An example of a transporter is an AGV (automated guided vehicle). Transporters move along network paths. By default transporters take the shortest route. If needed, you can manage the routing by yourself by providing the path selection algorithm in the corresponding TransporterFleet block.

The MoveByTransporter block provides a complete set of parameters for seizing a transporter, loading it with the required agent, sending it to the specified location, unloading the agent there, and finally releasing the transporter.

Seizing and releasing actions can be modeled by the corresponding SeizeTransporter and ReleaseTransporter blocks (use them to design a more detailed agent transportation flowchart). In this case, make sure to disable the Seize transporter and Release transporter parameters of this MoveByTransporter block.

Once the transporter is seized and sent to fetch the agent (material item) it will choose the shortest path to the specified destination. If the required destination is not in the network, the transporter will come as close as it can to it. 

Demo model: MoveByTransporter

Parameters

Destination is
Defines where the transporter will take the agent to. The possible destinations are:
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: DestinationType destinationType
Set new value at runtime: set_destinationType(new value)
Valid values: MoveByTransporter.DEST_NODE; MoveByTransporter.DEST_ATTRACTOR; MoveByTransporter.DEST_PATH; MoveByTransporter.DEST_CONVEYOR; MoveByTransporter.DEST_POSITION_ON_CONVEYOR; MoveByTransporter.DEST_CONVEYOR_STATION; MoveByTransporter.DEST_XYZ
Path [dynamic]
[Visible and applies only if the Destination is option is set to Path] The path the transporter will move to.
Type of value: Path
Local variables:  T agent - the agent
                          Agent transporter - the transporter
Conveyor [dynamic]
[Visible and applies only if the Destination is option is set to Conveyor] The conveyor the transporter will move to.
Type of value: ConveyorPath
Local variables:  T agent - the agent
                          Agent transporter - the transporter
Offset from [dynamic]
[Visible and applies only if the Destination is option is set to 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.
Type of value: boolean
Local variables:  T agent - the agent
                          Agent transporter - the transporter
Offset [dynamic]
[Visible and applies only if the Destination is option is set to 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.
Type of value: double
Local variables:  T agent - the agent
                          Agent transporter - the transporter
Attractor [dynamic]
[Visible and applies only if the Destination is option is set to Attractor] The attractor the transporter will move to.
Type of value: Attractor
Local variables:  T agent - the agent
                          Agent transporter - the transporter
Node [dynamic]
[Visible and applies only if the Destination is option is set to Node] The network node the transporter will move to.
Type of value: Node
Local variables:  T agent - the agent
                          Agent transporter - the transporter
Position on conveyor [dynamic]
[Visible and applies only if the Destination is option is set to Position on conveyor] The position on conveyor the transporter will move to.
Type of value: PositionOnConveyor
Local variables:  T agent - the agent
                          Agent transporter - the transporter
Conveyor station [dynamic]
[Visible and applies only if the Destination is option is set to Conveyor station] The station the transporter will move to.
Type of value: ConveyorStation
Local variables:  T agent - the agent
                          Agent transporter - the transporter
X, Y, Z [dynamic]
[Visible and applies only if the Destination is option is set to (x, y, z)] X, Y, Z coordinates of the point the transporter will move to.
Type of value: double
Local variables:  T agent - the agent
                          Agent transporter - the transporter
... in the network [dynamic]
[Visible and applies only if the Destination is option is set to (x, y, z)] If the option is selected, on releasing the transporter the agent (material item) will be added into the network specified below. 
Type of value: boolean destinationInNetwork
Default value: false
Network [dynamic]
[Visible and applies only if the ...in the network option is selected] The network the agent will be added to once the transporter is released.
Type of value: INetwork
Local variables:  T agent - the agent
                          Agent transporter - the transporter
Seize transporter
Seize transporter
[Enabled by default] Allows this block to seize one transporter from the specified fleet defined by the TransporterFleet block. A transporter must be seized to move the agent. Make sure that either this option is enabled and set or you have a properly configured SeizeTransporter block in your flowchart placed before this MoveByTrasnporter block.
Syntax: boolean seizeTransporter
Set new value at runtime: set_seizeTransporter(new value)
Fleet [dynamic]
[Visible and applies only if the Seize transporter option is enabled] The TransporterFleet block defining the fleet of transporters. This block will seize one transporter from this fleet.
Type of value: TransporterFleet
Local variable:  T agent - the agent
Loading time [dynamic]
[Visible and applies only if the Seize transporter option is enabled] The time required for the agent (material item) to be loaded onto the transporter.
Type of value: double
Local variable:  T agent - the agent
Pickup location is
[Visible and applies only if the Seize transporter option is enabled] Defines the location the transporter will pick up the agent (material agent) from. The location can be represented by:
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 seizeDestinationType
Set new value at runtime: set_seizeDestinationType(new value)
Valid values: MoveByTransporter.PICKUP_AGENT; MoveByTransporter.PICKUP_NODE; MoveByTransporter.PICKUP_ATTRACTOR; MoveByTransporter.PICKUP_PATH; MoveByTransporter.PICKUP_CONVEYOR  MoveByTransporter.PICKUP_POSITION_ON_CONVEYOR; MoveByTransporter.PICKUP_CONVEYOR_STATION; MoveByTransporter.PICKUP_XYZ
Path [dynamic]
[Visible and applies only if the Pickup location is option is set to Path] The path the transporter will move to.
Type of value: Path
Local variables:  T agent - the agent
                          Agent transporter - the transporter
Conveyor [dynamic]
[Visible and applies only if the Pickup location is option is set to Conveyor] The conveyor the transporter will move to.
Type of value: ConveyorPath
Local variables:  T agent - the agent
                          Agent transporter - the transporter
Offset from [dynamic]
[Visible and applies only if the Pickup location is option is set to 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.
Type of value: boolean
Local variables:  T agent - the agent
                          Agent transporter - the transporter
Offset [dynamic]
[Visible and applies only if the Pickup location is option is set to 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.
Type of value: double
Local variables:  T agent - the agent
                          Agent transporter - the transporter
Attractor [dynamic]
[Visible and applies only if the Pickup location is option is set to Attractor] The attractor the transporter will move to.
Type of value: Attractor
Local variables:  T agent - the agent
                          Agent transporter - the transporter
Node [dynamic]
[Visible and applies only if the Pickup location is option is set to Node] The network node the transporter will move to.
Type of value: Node
Local variables:  T agent - the agent
                          Agent transporter - the transporter
Position on conveyor [dynamic]
[Visible and applies only if the Pickup location is option is set to Position on conveyor] The position on conveyor the transporter will move to.
Type of value: PositionOnConveyor
Local variables:  T agent - the agent
                          Agent transporter - the transporter
Conveyor station [dynamic]
[Visible and applies only if the Pickup location is option is set to Conveyor station] The station the transporter will move to.
Type of value: ConveyorStation
Local variables:  T agent - the agent
                          Agent transporter - the transporter
X, Y, Z [dynamic]
[Visible and applies only if the Destination is option is set to (x, y, z)] X, Y, Z coordinates of the point the transporter will move to.
Type of value: double
Local variables:  T agent - the agent
                          Agent transporter - the transporter
Task priority [dynamic]
[Visible and applies only if the Seize transporter option is enabled] The Task priority of the task for the incoming agent (the larger the higher).
Type of value: double
Local variable:  T agent - the agent
Task may preempt [dynamic]
[Visible and applies only if the Seize transporter option is enabled] If the option is selected, this task may preempt other tasks of the requested transporter.
Type of value: boolean
Local variable:  T agent - the agent
Task preemption policy [dynamic]
[Visible and applies only if the Seize transporter option is enabled] 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.
Type of value: SeizeTransporter.TransporterTaskPreemptionPolicy
Local variable:  T agent - the agent
Customize transporter choice
[Visible and applies only if the Seize transporter option is enabled] If the option is selected, you can choose the specific transporter for the operation (using the Transporter choice condition below).
Syntax: boolean customizeTransporterChoice
Set new value at runtime: set_customizeTransporterChoice(new value)
Transporter choice condition [dynamic]
[Visible if the 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.
Type of value: boolean
Local variables:  T agent - the agent
                          Agent transporter - the transporter
                          TransporterFleet fleet - the fleet
Dispatching policy
Here you specify how the block chooses a transporter to perform the agent transportation. If the Customize transporter choice option is set, the transporter will be chosen from the subset returned by the algorithm in the Transporter choice condition parameter.
The possible options are:
Nearest to the agent - The nearest to the current agent transporter will be chosen.
The most preferred - The transporter will be chosen by comparing transporters to each other. The comparison algorithm should be placed in the "unit1 is preferred to unit2" parameter below.
Transporter with top rating - The transporter with the top rating will be chosen. You 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
Set new value at runtime: set_dispatchingPolicy(new value)
Valid values: MoveByTransporter.DISPATCHING_POLICY_NEAREST; MoveByTransporter.DISPATCHING_POLICY_BASED_ON_COMPARISON; MoveByTransporter.DISPATCHING_POLICY_BASED_ON_RATING_VALUE; MoveByTransporter.DISPATCHING_POLICY_SOME_TRANSPORTER
"unit1 is preferred to unit2" [dynamic]
[Visible and applies only if the Dispatching policy is set to 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.
Type of value: 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 [dynamic]
[Visible and applies only if the Dispatching policy is set to 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).
Type of value: double
Default value: 0
Local variables:  Agent unit - the transporter
                           T agent - the current agent
Release transporter
Release transporter
[Enabled by default] Allows this block to release the previously seized transporter. The transporter could have been seized either by this block or by the SeizeTransporter block.
Syntax: boolean releaseTransporter
Set new value at runtime: set_releaseTransporter(new value)
Unloading time [dynamic]
[Visible and applies only if the Release transporter option is enabled] The time required for the agent (material item) to be unloaded from the transporter.
Type of value: double
Local variable:  T agent - the agent
Transporter [dynamic]
[Visible and applies only if the Release transporter option is enabled] Defines, whether the released transporter Returns to home location if no other tasks (if it is not immediately seized by another agent), Returns to home location each time, or Stays where it is after being released.
Type of value: ReleaseTransporter.TransporterReleaseMovingPolicy
Valid values: Returns to home location if no other tasks - ReleaseTransporter.MP_RETURNS_TO_HOME_IF_NO_OTHER_TASKS
                     Returns to home location each timeReleaseTransporter.MP_RETURNS_TO_HOME
                     Stays where it isReleaseTransporter.MP_STAYS_WHERE_IT_IS
Local variable:  Agent transporter - the transporter
Actions
On enter [code]
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 exit [code]
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 remove [code]
Here you can type Java code that will be executed when the agent (material item) is removed from a conveyor.
Local variable:  T agent - the agent
On seize Transporter [code]
[Visible and applies only if the Seize transporter option is enabled] Here you can type Java code that will be executed when the agent (material item) seizes the transporter.
Local variables:  T agent - the agent
                          Agent unit - the transporter
On loading started [code]
[Visible and applies only if the Seize transporter option is enabled] Here you can type Java code that will be executed when loading of the agent (material item) on the transporter starts.
Local variables:  T agent - the agent
                          Agent unit - the transporter
On loading finished [code]
[Visible and applies only if the Seize transporter option is enabled] Here you can type Java code that will be executed when loading of the agent (material item) is completed.
Local variables:  T agent - the agent
                          Agent unit - the transporter
On task suspended [code]
[Visible and applies only if the Task preemption policy option is set to Seize any resource] Callback for action executed when agent task is suspended because of the 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 [code]
[Visible and applies only if the Task preemption policy option is set to 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
On release Transporter [code]
[Visible and applies only if the Release transporter option is enabled] Here you can type Java code that will be executed when the agent (material item) releases the transporter.
Local variables:  T agent - the agent
                          Agent unit - the transporter
On unloading started [code]
[Visible and applies only if the Release transporter option is enabled] Here you can type Java code that will be executed when the unloading of the agent (material item) from the transporter starts.
Local variables:  T agent - the agent
                          Agent unit - the transporter
On unloading finished [code]
[Visible and applies only if the Release transporter option is enabled] Here you can type Java code that will be executed when the unloading of the agent (material item) is completed.
Local variables:  T agent - the agent
                          Agent unit - the transporter

Ports

in
The input port.
out
The output port.