Agent / agent population properties

General

Name – The name of the agent/agent population.

Show name – If selected, the element name is shown on the diagram.

Ignore – If selected, this agent/population is excluded from the model.

Single agent - If selected, the element defines a single agent. 

Population of agents – If selected, the element defines an agent population that contains multiple agents of the same agent type

Population is – [Visible if the Population of agents option is selected] Here you choose how the agent population is created.

There are three alternative options:

Initially empty – Use this option when you plan to add agents programmatically inside a population, on model startup, or dynamically during the model execution.

Contains a given number of agents – Use this option if you need a population with known initial number of agents. Specify the number of agents in a population in the field Initial number of agents below.

Loaded from database – Use this option when you have agent data stored in a database, and want to create agents in a population by reading data from the database table.

Initial number of agents – [Visible if the Population is: Contains a given number of agents] Here you specify the initial number of agents in the population. The number can be changed later on by adding and/or removing agents during the model execution.

Table – [Visible if the Population is: Loaded from database] The database table containing the agent data. Below are the sections to define the data fetch conditions.

Mode – [Visible if the Population is: Loaded from database] Here you can choose whether AnyLogic should create One agent per database record, or Multiple agents per record.

Quantity is contained in column – [Visible if the Mode: Multiple agents per record] The name of the database table's column containing the number of the agents that should be created for each table entry.

This agent (population) is an instance of the user-defined agent type. If there are parameters defined in this agent type, here in the properties you will see edit boxes enabling the user to change the default values of these parameters for this specific agent (population). 

Movement

Initial speed – The speed of the agent.

Initial location

Place agent(s) – Here you define the agent location in the space.

X, Y, Z –  [Visible if agents live in continuous space, and Place agent(s) is set to in the specified point] the agent location coordinates.

Latitude, Longitude – [Visible if agents live in GIS space, and Place agent(s) is set to in the latitude/longitude] the agent location coordinates.

Node – [Enabled if agents live in continuous, or GIS space, and Place agent(s) is set to in the nodeNode (if agent lives in a continuous space), or in case of GIS space, a GIS Point or a GIS Region where the agent will be placed.

Location name – [Visible if agents live in GIS space, and Place agent(s) is set to in the first result of map search]  Name of the GIS place (e.g. "Paris"). GIS map will search for the place with this name. The agent will be placed in the GIS point that is the first result returned by the GIS map search.

Routing – [Visible if agents live in GIS space] - The routing option for agents moving in GIS space. AnyLogic supports four types of road networks: Car (for all types of vehicles), Rail, Bike, and Foot. If you have several types of agents that use different types of roads, you need to add custom route provider (to enable some agents to use not the default road network of the GIS map, but some alternative road network), and specify its name here.

Row, Column – [Visible if agents live in discrete space] The agent location coordinates, the row and the column number (note that numbering starts from 0).

Statistics

Here you can define functions that will collect statistics for agents living in this population. Please refer here for details.

Advanced

Model / library  –  The name of the AnyLogic model, or library where the agent type of this agent is defined.

Visible – Here you specify whether the element is visible on the animation at the model runtime, or not.

Visible on upper level – If selected, the element is also visible on the diagram of the upper level agent.

Optimize for – Agent population in AnyLogic is implemented as a Java collection. Here you can change Java type of the collection. We give you this opportunity since one implementation gives best performance on adding and removing collection elements (i.e. agents of the population), while another - on accessing elements by index (searching by index, removing by index). For more details on collection types please refer here

Log to database – If selected, all information about this agent (population) (parameter values, statistics on movement and time spent in different states, etc.) will be saved into the model execution log (if logging is turned on in the model's Database properties). 

Show presentation – If you cannot see this agent's presentation on the diagram of the upper level agent, click this button to create agent presentation there. Please refer here for details.