Font size

Agent-based modeling

Although you can find a number of various definitions of Agent Based Modeling in the literature, from the viewpoint of practical applications agent based modeling can be defined simply as essentially decentralized, individual-centric (as opposed to system level) approach to model design. When designing an agent based model the modeler identifies the active agents, the agents (which can be people, companies, projects, assets, vehicles, cities, animals, ships, products, etc.), defines their behavior (main drivers, reactions, history, …), puts them in a certain environment, maybe establishes connections, and runs the simulation. The global (system-level) behavior then emerges as a result of interactions of many individual behaviors. AnyLogic supports Agent Based modeling (as well as Discrete Event and System Dynamics Modeling) and allows you to efficiently combine it with other approaches.

Agent-based modeling is a new way to look at your organization

The traditional modeling approaches are treating the company’s employees, projects, products, customers, partners, etc. either as aggregated averaged quantities or as passive agents/resources in a process. For example, the system dynamics models are full of assumptions like “we have 120 employees in R&D, they can design about 20 new products a year”, or “we have a fleet of 1200 trucks, they can move that much cargo in a month, and 5% of them need to be replaced each year”.

In process-centric (also known as discrete event) approach you would view your organization as a number of processes, such as: “a customer calls a call center, it is first handled by operator of type A, which takes on average 2 minutes, then 20% of the calls need to be forwarded to…”. Those approaches are indeed more capable than “spreadsheet-based modeling”, they can capture organization dynamics, non-linearity, but they ignore the fact that all those people, products, projects, pieces of equipment, assets, etc. are all different, have their histories, intentions, desires, individual properties, and also complex relationships. For example, people may have different expectations regarding their income and career, can have significantly different productivity in different teams, R&D projects interact and compete, and may depend one on another, aircrafts have their individual and rigid maintenance schedules, whose combination may lead to fleet availability problems, a customer may consult his family members before making the purchase decision, etc.

Agent based approach is free of such limitations as it suggests that the modeler directly focuses on individual objects in and around the organization, their individual behaviors, and their communication. The agent based model is actually a set of interacting agents that reflect objects and relationships in the real world, and thus is a natural step forward in understanding and managing the complexity of today’s business and social systems.

Agent-based modeling can make your (currently unused) data work for you

These days companies and governmental organizations have accumulated tons of useful data in their CRM, ERP, HR databases that are very much underutilized. Agent based modeling is a natural way to leverage that data and make them work. As long as agent based models are essentially individual-based, they can be populated with agents whose properties are real and read directly from e.g. a CRM system (in case we are modeling the market), or from ERP/HR database in case we are modeling the dynamics of the human resources inside the organization. This gives you easy, very precise and always up to date way to model, forecast, compare scenarios and optimize strategy.

Applications of Agent-based modeling

A good example application for ABM is consumer market. In the highly dynamic, competitive, and complex market environments (telecom, insurance, leasing, health, etc.) the consumer’s choice essentially depends on a number of individual characteristics, inherent dynamics of the consumer, network of contacts, external influences that may be best captured within the agent based modeling paradigm, especially taken the high availability of individual-centric data from the CRM (Customer Relationships Management) systems that can be directly used to parameterize the agents.

Another traditional example would be epidemiology. Here agents are people that can be susceptible, infectious, recovered, immune to the disease, etc. ABM allows to explicitly capture social networks, contacts between people, their heterogeneity, and therefore to obtain better forecasts of the disease spread.

You however should not think of ABM as of analysis method applicable only to large people communities. There are problems in manufacturing, logistics, supply chains, or business processes where ABM works better than anything else. For example, the behavior of a complex machine that has internal states, inherent timing, different reactions in different modes, etc. may be efficiently modeled by a separate object (agent) with a statechart inside that may be linked to the manufacturing process workflow. The supply chain participants (companies — producers, wholesalers, retailers) have their own goals and rules and can naturally be represented as agents. Agents can even be projects or products within one company have internal states and dynamics, compete for company resources.

AnyLogic support for Agent-based modeling

Before deciding to use the agent based approach you should investigate the problem and verify whether traditional approaches can be used. For example, if the system you are modeling fits well with the process flow paradigm (i.e. can be described as a sequence of operations on essentially passive agents) it may be beneficial to use AnyLogic Process Modeling Library blocks instead of specifying individual behaviors of those agents. Similarly, if the agents in your system have no individuality (no individual history, timing, etc.) it may be worth applying System Dynamics approach.

Agent based models used in practice are very diverse, and it would be virtually impossible to develop a universal “Agent Based Library” and reduce the modeler’s work to a number of drag-and-drop operations. There are however some reusable “design patterns” that simplify development of agent based models and are directly supported by AnyLogic. These patterns are in:

From architectural viewpoint, a typical AnyLogic agent based model would have at least two agent types: Main type for a top-level object where agents would be contained and another type of agent, e.g. Person. A number of agents would be embedded into the Main object, e.g. as a population people of type Person.

Main will act as an environment, here you can specify properties shared by the agents. You are free however to define other hierarchies in your agent based model, for example you may have companies-agents that contain employees-agents and communicate with consumers-agents.

Here are some useful facts aimed to ensure you are not misguided by academic literature and various “theories” of agent based modeling:

  • Agents are not the same thing as cellular automata and they do not have to live in discrete space (like the grid in The Game of Life). In many agent based models space is not present at all. When space is needed, in most cases it is continuous, sometimes a geographical map or a facility floor plan.
  • Agent based modeling does not assume clock “ticks” or “steps” on which agents test conditions and make decisions (synchronous discrete time). Most well-built and efficient agent based models are asynchronous (conditions are tested and things happen only when they need to). Continuous time dynamics may also be a part of agent or environment behavior.
  • Agents are not necessarily people. Anything can be an agent: a vehicle, a piece of equipment, a project, an idea, an organization, an investment. A model of a steel converter plant where each machine is modeled as an agent and steel is produced as a result of their interaction, is an agent based model.
  • An object that seems to be absolutely passive can be an agent. For example, a pipe segment of a water supply network can be modeled as agent: we can associate with it maintenance and replacement schedules, cost, breakdown events.
  • There can be many and can be very few agents in an agent based model (compare the model of American automobile market and the model of steel converter plant). Agents can be of the same type and can be all of different types.
  • There are agent based models where agents do not interact at all. For example, in the area of health economics there are models of alcohol usage, obesity, chronic diseases where individual dynamics depends only on personal parameters and, sometimes, on the environment.
How can we improve this article?