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 poetryClone this repository:
git clone https://github.com/heinovski/plafosim.gitNavigate to newly created directory of the cloned repository in the command-line
Install PlaFoSim from source in editable mode:
poetry installRun PlaFoSim in the virtual environment:
poetry run plafosimYou can also activate the virtual enviroment first withpoetry shelland 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 theDummyalgorithm (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