Skip to content

diBernardoGroup/SwarmSimPublic

Repository files navigation

SwarmSim

Simulate 2D and 3D swarms of mobile agents with various dynamics and implement distributed control laws to obtain different behaviours.

To execute your first simulation simply run Launcher.m.

Features

  • Simulation of swarms of mobile agents (see Launcher.m).
  • Implement your own dynamical model or use one of the embedded ones (see integrateAgents.m).
  • Implement your own distributed control law or use one of the default ones (see globalInteractionForce.m).
  • Acquisition of metrics to evaluate the performance.
  • Extensive simulations to study stochastic effects or different initial conditions (see MultiLauncher.m).
  • Extensive simulations to study the effects of the parameters (see SequentialLauncher.m).
  • Simulate swarms of photo-sensistive microorganisms (see LauncherMicroorg.m)
  • Analize DOME experiments, generate digital twins of microorganisms and run virtual experiments (see DOME folder)
  • Local stability analysis of lattice configurations via linearization (see CrystalStability.m).
  • Interface with Robotarium code to perform advanced simulations and real life experiments (see RobotariumSimulator.m). For more details refer to https://www.robotarium.gatech.edu.
  • Plots to visualise the simulation and the metrics.
  • Automatic save the results of the simulations.

Versions & Releases

Copyrights: If you use this code for research purposes and want to mention it in one of your publications, please cite [Giusti2023B].

  • V3.0 - Authors: Andrea Giusti and Davide Salzano. Date: 2025
  • V2.0 - Authors: Andrea Giusti. Date: 2023
  • V1.1 - Authors: Andrea Giusti and Gian Carlo Maffettone. Date: 2023
  • V1.0 - Authors: Andrea Giusti and Gian Carlo Maffettone. Date: 2022

External resources

The DOME is an open-source platform for the control of microscale agents using light. To use the DOME, perform experiments and analyze the resulting data use DOME-software.

The Robotarium allows to remotely conduct real-life swarm robotics experiments.

For additional information contact andrea.giusti@unina.it.

References

This project implements the algorithms described in [Giusti2023B] (see SwarmSimV1 ), [Giusti2023A] and [Giusti2025]. In the Media folder, there is a video supplement for [Giusti2023B].

  • [Giusti2025] Giusti, A., Salzano, D., di Bernardo, M., & Gorochowski, T.E. (2025) Data-driven inference of digital twins for high-throughput phenotyping of motile and light-responsive microorganisms. BioRXiv preprint.
  • [Giusti2024] Giusti, A. (2024) Modelling and Control of Spatial Behaviours in Multi-Agent Systems with Applications to Biology and Robotics. PhD Thesis.
  • [Giusti2023B] Giusti, A., Maffettone, G. C., Fiore, D., Coraggio, M., & di Bernardo, M. (2023). Distributed Control for Geometric Pattern Formation of Large-Scale Multirobot Systems. Frontiers in Robotics and AI. DOI: 10.3389/frobt.2023.1219931.
  • [Giusti2023A] Giusti, A., Coraggio, M., & di Bernardo, M. (2023). Local Convergence of Multi-Agent Systems Toward Rigid Lattices. IEEE Control Systems Letters. DOI:10.1109/LCSYS.2023.3289060.