The Unbatch block extracts all agents contained in the incoming agent (batch) and outputs them through the output port. The original agent (batch) is discarded. The operation takes zero time.
All contents of the incoming agent are extracted regardless of how it was created: using Batch, Pickup, or programmatically by calling addEntityToContents().
A permanent batch created by the Batch block does not contain any agents, so it is simply consumed by that block without any output.
- The type of the batch agents entering this block. Referred below as TBatch.
Default value: Agent
- The type of the agents that are extracted from the incoming agent and exit this block. Referred below as T.
Default value: Agent
- Elements appear in batch location
- If selected, the unbatched agents will appear in the same location as the batch.
Syntax: boolean sameAsBatchLocation
Default value: true
Set new value at runtime: set_sameAsBatchLocation(new value) - New location
- The new location of the unbatched agents. There are several available options:
Network/GIS node — Agents are placed in the given node, GIS point, or GIS region.
Attractor — Agents are placed in the specified attractor.
(x, y, z) — Agents are placed in the point with the specified coordinates X, Y, Z.
(latitude, longitude) — Agents are placed in the given point on the GIS map with the specified Latitude and Longitude.
Geographic place — Agents are placed in the particular location on the GIS map. You define this place using the Name of place parameter below.Syntax: InitialLocationType locationType
Set new value at runtime: set_locationType(new value)
Valid values:
InitialLocationType.LOCATION_NODE — Network/GIS node
InitialLocationType.LOCATION_ATTRACTOR — Attractor
InitialLocationType.LOCATION_XYZ — (x, y, z)
InitialLocationType.LOCATION_LATLON — (latitude, longitude)
InitialLocationType.LOCATION_GEO_PLACE — Geographic place - [Visible if New location: Network / GIS node] Network node, GIS point, or GIS region where the unbatched agents are placed.
Type of value: INode
Local variable: T agent — the agent - [Visible if New location: Attractor] Attractor where the unbatched agents are placed.
Type of value: Attractor
Local variable: T agent — the agent - [Visible if New location: (x, y, z)] X, Y, Z coordinates of the point where the unbatched agents will be placed.
Type of value: double
Local variable: T agent — the agent - ...located in
- [Visible if New location: (x, y, z)] Specifies where the unbatched agents will be added: either Level or Network.
Syntax: boolean locationXYZInNetwork
- [Visible if ...located in: Level] The level where the unbatched agent will be placed.
Type of value: Level
Local variable: T agent — the agent - [Visible if ...located in: Network] The network where the unbatched agent will be placed.
Type of value: INetwork
Local variable: T agent — the agent - [Visible if New location: (latitude, longitude)] Latitude and longitude of the point on the GIS map where the unbatched agents will be placed.
Type of value: double
Local variable: T agent — the agent - [Visible if New location: Geographic place] The name of the particular location on the GIS map, where the agents will be placed. You specify the name as text put in quotes, for example, "London". GIS map will search for a location with such name. The first location from the list of GIS search results will be used.
Type of value: String
Local variable: T agent — the agent
- Forced pushing
- If the option is selected (true), when agents finish processing at the block, they are instantly pushed further regardless the state of the succeeding block. If the option is not selected, agents are not pushed, but pulled: only when the succeeding block is ready to accept one more agent, it requests the agent from this block, and only then this agent passes further.
Syntax: boolean pushProtocol
Default value: false
- On enter
- Code executed when the batch agent enters the block.
Local variable: TBatch batch — the batch agent
- On exit
- Code executed for each agent that is extracted from the batch and exits the block. The batch is still accessible here as batch.
Local variables:
T agent — the current agent extracted from the batch agent
TBatch batch — the batch agent
Function | Description |
---|---|
int size() | Returns the number of agents that were the contents of the last batch and are currently waiting to be accepted by the subsequent flowchart blocks. |
- in
- The input port.
- out
- The output port.
-
How can we improve this article?
-