Trophallaxis

Trophallaxis is the process where the food acquired by foragers is shared within the ant community.

It is based on three steps:

  1. computing the amount of food acquired by the foragers
  2. computing the amount of food required by the colony
  3. distributing the food among the individuals

Here are more details on these steps:

Derivation of available food supply

First, it is computed how much food/energy is available to share among the rest of the colony. This is done via the following function:

RISKANT.Core._calculate_forager_excess_foodMethod

This function gets the total excess food of foragers to be distributed to all other ants. This is all the food a forager has acquired, minus a small reserve so that the forager itself can survive the next days (configurable).

source

Demand computation

First, the demand of each ant type (nurses, larvae, queens) is computed. This is done as follows:

RISKANT.Core._calculate_colony_nurse_food_demandMethod

Calculates the total food demand of all nurses. Each nurse has itself a food_capacity_nurse_max attribute. A nurses demand is the difference between the current energy level and this maximum capacity. This ensures, that a nurse also has a little buffer of energy.

source
RISKANT.Core._calculate_care_demand_larvaeMethod

Certain amounts of energy are required to feed the larvae. This depends on the number of larvae and the amount of nurses that are required for each larva. (Default: 10 nurses for a larva)

source

Food distribution

First, the queens' food demand is satisfied (if possible). If there is food left to be shared, it is distributed within the colony based on the following function: