AirMobiSim can be used standalone (pure Python kinematic simulation) or coupled with OMNeT++/veins for wireless communication simulation. The OMNeT++ coupling is optional.
For the standalone simulator, you only need:
- curl
- pyenv
- poetry
If you also want the OMNeT++/veins coupling, you additionally need:
- OMNeT++ 6
- conan
Please do follow the instructions from the official OMNeT documentation
Please do follow the instructions from the official conan documentation
To install curl please do execute:
Linux/Debian
sudo apt install curl
MacOS
brew install curl
Please do follow the instructions from the official poetry documentation, e.g.:
curl -sSL https://install.python-poetry.org | python3 -This installs poetry to ~/.local/bin, which most Linux distributions (Debian/Ubuntu
included) already add to PATH automatically for login shells - open a new shell (or
re-source your .bashrc/.zshrc) after installing so poetry is picked up before
running build.sh.
Note: on a headless Linux server (no desktop session / D-Bus), poetry install can
hang indefinitely while trying to look up credentials via the keyring library. build.sh
already sets PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring to avoid this; if you
run poetry commands manually outside of build.sh and they seem to hang, export the
same variable first.
Note: if you already had a working environment from before a dependency was removed
from pyproject.toml, plain poetry install will not remove the now-unneeded package
from your existing virtualenv (it only adds what's missing). Use poetry install --sync
instead to also remove packages that are no longer listed.
All required dependencies are locally installed using pyenv and poetry by executing the build.sh script:
./build.shThis installs the standalone Python simulator only (no OMNeT++/conan required).
To also set up the OMNeT++/veins coupling (clones and compiles veins and AirMobiSim_libveins; requires OMNeT++ and conan to be installed), run instead:
./build.sh --with-omnetWithout -y/--non-interactive, the script will also ask interactively whether to set
up the OMNeT++ coupling. Conan's state (profiles, package cache) is kept scoped to the
project directory (.conan_home/) rather than touching your global ~/.conan2.
Note: if you have OMNeT++'s own setenv script sourced in your shell (needed to get
opp_run etc. on PATH), it may also put OMNeT++'s bundled Python distribution ahead in
PATH and export PYTHONHOME/PYTHONPATH. build.sh clears these for its own run, but
if you run poetry install or poetry run ./airmobisim.py manually afterwards in a shell
where OMNeT++'s setenv is sourced, unset them first:
unset PYTHONHOME PYTHONPATHOtherwise poetry/pyenv may end up targeting OMNeT++'s bundled Python instead of this project's own environment, which can silently break either one.
To run the project use the following command in 'poetry shell':
poetry run ./airmobisim.pyThe above command will run the simulation in command line without any plot.
To run the simulation with plot use :
poetry run ./airmobisim.py --plot 1To get a list of options to use with AirMobiSim, use:
poetry run ./airmobisim.py -hThe input parameters for the simulations are taken from a file named simulation.config.
An example is located in the examples directory.
A logfile is written to the project directory (e.g., AirMobiSim/examples/simpleSimulation).
The loglevel can be set in the according configuration file.