Welcome to defSim’s documentation!

Here you can find the API documentation for the discrete event framework for social influence models. The package is freely available on GitHub.

defSim is a package that aims to be the modular standard for social influence models. With defSim you can run a single Simulation, execute a larger Simulation Experiment, or use any number of pre-programmed modules for your own idea or variation of a traditional social influence model. Using defSim is meant to save you time on programming functions that you will need in any social influence research project, but furthermore you make sure that your model remains strictly comparable (‘aligned’) with traditional models, and other models in the defSim-realm, while working completely open source by default.

The flow of a single simulation run implemented by defSim looks like this:

defSim workflow

All elements on the left represent the separate modules.

The Simulation class handles the execution of all modules as depicted in the flow chart, and returns a single row of results as a Pandas dataframe. The Experiment class handles multiple executions of the simulation class, calling the simulation class effectively a number of times (repetitions) for every user-given parameter combination. Alternatively, you might want to use just one of a couple of the pre-programmed modules, and use your own code to create a variation on the traditional social influence models.

Find out about the different modules and their relation to the interface on our modules overview page

Learn the basics of defSim on our introduction page

Contents of the documentation

Indices and tables