4. Structure - coppolam/swarmulator GitHub Wiki

Swarmulator is designed to handle independent threads for each different functions.

The main program launches 3 threads: simulation, animation, logger.

  • Simulation handles the global clock and spawns the agents. Each agent is also a separate detached thread.
  • Animation handles the OpenGL animation and user interaction.
  • Logger handles the logging of the states to a txt file, which is stored in `logs\log_<date+time>.txt

Alt text

The animation and the logger can be made to not run, which can be useful when running tests that do not need to be logged, or when running many tests where seeing the animation is not important.

Activation and deactivation of animation and log can be done from settings.h

⚠️ **GitHub.com Fallback** ⚠️