Seldon is a performant code for performing various types of opinion dynamics simulations (under development), written primarily in C++
.
If you want to use micromamba
as the package manager, create and activate the environment.
micromamba create -f environment.yml
micromamba activate seldonenv
We use meson
to compile and build Seldon.
meson setup build
meson compile -C build
To install seldon
to your conda
environment, run the following:
meson setup build --prefix $CONDA_PREFIX
meson install -C build
Run the executable, and provide the input configuration TOML file (as the first positional argument), and an optional output directory location. If the output location is not specified, it is set to the parent directory in which the config file is present
cd build
./seldon /path/to/config -o /path/to/output/dir
If you've installed it, you can simply run seldon
anywhere.
seldon /path/to/config -o /path/to/output/dir
The file network.txt
contains information about the network.
First column is the index of the agent, then the next column is the number of incoming agent connections including the agent itself. Subsequent columns are the neighbouring incoming agent indices and weights. In addition, every iteration produces a double opinion value for each agent. These are outputted to files named opinions_i.txt.
To run the tests, go into the build directory and run the following:
meson test
All contributions are welcome!!
GNU GPL v3 or later.