MultiRepast4py: A Framework for Agent-Based Simulations on Multilayer Networks
摘要
Agent-Based Simulations (ABS) offer a powerful approach for analyzing how individual agents’ decisions and interactions within networked systems lead to system outcomes. ABS have been widely used across various fields, including in the study of the spread of diseases and information. Existing platforms for ABS, such as NetLogo, Repast, and Mesa, typically focus on agents’ interactions over a single network. In reality, however, agents’ interactions are typically multi-layered (i.e., involve multiple interconnected networks that influence agents’ decisions); existing ABS tools offer limited or no direct interaction across multiple networks of interactions. Researchers who require multilayer dynamics often rely on workarounds, such as creating custom implementations in NetworkX, or integrating multiple network representations, which can become highly specialized, difficult to generalize, and technically demanding to reproduce. To address this, we propose MultiRepast4py, a multilayer simulation tool extending the simulation capabilities of Repast4py. Our framework enables simulations on multilayer networked systems by efficiently reconstructing network data and utilizing agent attributes, allowing agents to dynamically access multilayer connections during simulation. By maintaining Repast4py’s scalability and minimizing memory overhead, MultiRepast4py ensures high performance for large-scale simulations. Through simulation examples on the spread of information in social networks, we showcase how MultiRepast4py can enable more comprehensive agent-based simulations, guiding improved predictions and interventions.