This package provides a command-line interface for the sim2net simulator, which allows users to initialize and start simulations.
sim2net – a console script to initialize and start simulations:
sim2net [-h | -d | -v | -i DIRECTORY] CONFIGURATION APPLICATION positional arguments: CONFIGURATION simulation configuration file APPLICATION simulation application file optional arguments: -h, --help show this help message and exit -d, --description show description message and exit -i DIRECTORY, --initialize DIRECTORY write configuration and application files to given directory -v, --version show version message and exit
To start a simulation with the sim2net simulator, two files are necessary:
a configuration file (with the simulator settings) and an application file that
is run by every node in the simulated network (the application must implement
sim2net.application.Application abstract class). The easiest way to
obtain both files is to execute the
sim2net command with the
sim2net -i .
After that, two files are created in the given directory:
application.py. Both files may be edited – for more information about
configuration parameters see Packages
section, and for more information about application implementation see the
sim2net.application.Application abstract class.
Next, to start the simulation, the
sim2net command should be executed with
both files as arguments, eg.:
sim2net ./configuration.py ./application.py