Population Update

Calculation of agent variation for constant population size

  1. S_neu = \sum_milieus \lfloor X_neu^milieu \lfloor
  2. \deltaS = S_neu - S_alt
  3. X_neu^milieu = p^milieu * X_alt^milieu
  4. Sort X_neu^milieu - \lfloor X_neu^milieu \lfloor
  5. randomly choose \deltaS times milieu with max(X_neu^milieuRemaining - \lfloor X_neu^milieuRemaining \lfloor)

Analysis

POPULATION_UPDATE_INTERVAL

Calculate absolute area between S^1 and S^x where the index indicates the value for POPULATION_UPDATE_INTERVAL.

Important Hints

  1. Do not forget to update internal agent lists that are initialised at simulation's beginning! To this end, there is an observer mechanism implemented at the GPopulationUpdater. To use it, let the class that cares for agent lists, for instance an implementation of ContextBuilder, implement the interface GimAgentBirthDieObserver and register it at the updater:
    this.updater = new GPopulationUpdater<Household<?>>();
    this.updater.subscribeAgentBirthDieObserver(this);
    
  2. Consider network relations in die() and birth() methods. It is a good idea to use an instance of MoreNetworkService to build the network and make it available in the model manager.