Description
Homophily-based Distance Depending Forest Fire Network Service

SHoBNetPy (Spatial Homophily-based Network generator for ABM) offers a network generation algorithm for agent-based models for social simulation. It accounts for agent type (milieu)-specific degree distribution, distance distributions and composition preferences. Furthermore, it explicitly addresses modularity of resulting networks.
The original forest fire algorithm by Leskovec et al. (2007) is adapted and extended in several ways: the fulfillment of degree distributions most likely requires more than one ambassador to connect with. To mitigate ordering effects, agents are assigned ambassadors in a randomly pre-defined chain: the first agent is linked to its first ambassador. Then, every other agent is linked to its first randomly chosen ambassador before the first agent in the chain is connected to its second random ambassador.
SHoBNetPy generates links on the networkx.Graph object which is an component of a mesa.space.NetworkGrid. Therefore, by accessing mesa.space.NetworkGrid teh modeller can manipulate the network and request e.g. an agent’s network partners (neighbours).
Features
The SHoBNetworkGrid seeks to incorporate important features relevant for ABM:
Agent type (milieu)-specific degree distributions
Agent type (milieu)-specific distance distributions
Agent type (milieu)-specific milieu composition preferences
Focus on modularity

Algorithm

Important parameters
Apart from the milieu composition preferences, degree and distance distributions, the algorithm considers two important parameters that allow to control the resulting networks modularity quite well:
settings.main.prob_burning_forwardWhile exploring an ambassador’s neighbours this probability determines the likelihood that the focal agent is linked from ambassador’s outgoing links.
settings.network.prob_burning_backwardWhile exploring an ambassador’s neighbours this probability determines the likelihood that the focal agent is linked from ambassador’s incoming links. This seems especially important for relations of social influence.
Two more parameters are important to adjust the precision for milieu
composition and distance distribution (Note that the sum of both has to
be 1.0):
settings.network.dim_weight_milieuDetermines the weight for milieu composition preferences when calculating a link’s probability. The higher the value the more accurate milieu composition preferences can be fulfilled.
settings.network.dim_weight_geoDetermines the weight for distance related link probability when calculating a link’s probability. The higher the value the more accurate distance distributions can be fulfilled.
See Settings Documentation for a list of all relevant parameters.
Background
SHoBNetPy is a port of the Homophily-based Distance Depending Forest Fire (HDFF) network generator from the original Java library MoRe.
The algorithm is described in more detail in [1], section 11.10.
[1] Holzhauer, S. Dynamic Social Networks in Agent-based Modelling kassel university press, 2017, doi: 10.19211/KUP9783737602631