Source code for the article "Reflexivity in a diffusion of innovations model" by Carlos Cordoba and Cesar García-Díaz.
These are the parameters that control the evolution of the algorithm, and their corresponding variables in the article:
- Network randomness:
$r$ - Average number of neighbors:
$k$ - Initial proportion (or seed) of adopters:
$\delta$ - Coefficient of social influence:
$\beta$ - Quality:
$q$ - Total number of consumers:
$N$ - Activation sharpness:
$\phi$ - Critical mass of adopters:
$M_{c}$ - Marketing effort:
$e_{1}$ - Level:
$L$ - Time delay distribution:
$f(d)$
- Install Anaconda
- Install
anaconda-project
withconda install anaconda-project
. - Clone this repository and cd to its root.
- Run in a system terminal (cmd.exe):
anaconda-project run
to install its dependencies (this code has only been tested on Windows). - Run
activate envs\default
- Set the model parameters for a given run in
all_parameters.py
. - Run
python run_analysis.py
- The results are several plots, a json file with the parameters of simulation and a csv file with the percentage of adopters when reflexivity is activated in the system. All are saved in a Results subdirectory in this same directory.