Extending PlaFoSim
You can extend and customize PlaFoSim flexibly by modifying its source code. For this, you first need ot install it from source.
Installing from Source
Install poetry:
pip install poetry
Clone this repository:
git clone https://github.com/heinovski/plafosim.git
Navigate to newly created directory of the cloned repository in the command-line
Install PlaFoSim from source in editable mode:
poetry install
Run PlaFoSim in the virtual environment:
poetry run plafosim
You can also activate the virtual enviroment first withpoetry shell
and run the commands as usual (see above).
Adding a new Formation Algorithm
In order to add a new formation algorithm, you need to follow these steps:
Create a new sub-class of
FormationAlgorithm
(seeformation_algorithm.py
) within the sub-directoryalgorithms
. You can use theDummy
algorithm (seealgorithms/dummy.py
) as an example.Add specific arguments for your algorithm to the argument parser group within the new sub-class if necessary.
You should now be able to use your new algorithm with
plafosim --formation-algorithm dummy_algorithm_name