AnyLogic
Expand
Font size

Agent population properties

General

Name — The name of the agent or agent population.

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

Ignore — If selected, this agent or 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).

Dimensions and movement

Length — [Visible if it is the population of agents - material items or transporters] The length of the material item / transporter.

Width — [Visible if it is the population of agents - material items or transporters] The width of the material item / transporter.

Height — [Visible if it is the population of agents - material items or transporters] The height of the material item / transporter.

Initial speed — The speed of the agent.

Initial location

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

  • at the agent animation location — [default option] the agent is placed at the place where the agent’s presentation is located in the graphical editor
  • in the specified point — [Visible if agents live in continuous space] the agent is placed in the point defined by its coordinates (using the X, Y and Z fields below)
  • in the latitude/longitude — [Visible if agents live in GIS space] the agent is placed in the point defined by its coordinates (using the Latitude and Longitude fields below)
  • in the node — select this option if you want to place agent in a node (if agent resides in a continuous space), or in case of GIS space, in a GIS Point or inside a GIS Region. You select the required space markup shape from the Node list below
  • in the first result of map search — you specify name of the GIS place (e.g. "Paris") in the Location name field below, and the 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.

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 node] Node (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. If you leave the Default option selected, the default road network of the GIS map will be used by agents (it is described here). If you need agents living in this population to use some other network, you can specify it here. It can be a GIS network drawn graphically by the user and consisting of GIS points and GIS routes. Or, if you have several types of agents in your model that use different types of roads, you can refer here to a custom route provider that uses some alternative type of road network. AnyLogic supports four types of road networks: Car (for all types of vehicles), Rail, Bike, and Foot. So, for example, you may use a route provider if some agents in your model follow roads, while others follow railroads.

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 to Collecting statistics on agents 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 see Optimizing the performance of agent population.

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.

How can we improve this article?