Compile and run
[ACTION] Compile the program with the following command in the terminal:
make compile
Note: If this is your first compilation (i.e. you did not use make all
in the previous step), you have to use make all
to create required folders before compilation.
[ACTION] Run the simulation with:
mpirun -n 1 bin/main.exe props/config.props props/model.props
You should see the following screen:
A simple experiment with threshold
[ACTION] Using Sublime Text, open the file props/model.props. Increase the threshold from 0.3 to 0.6. Run again with mpirun -n 1 bin/main.exe props/config.props props/model.props
(since we only edit the props file, no need to re-compile), and observe the segregation pattern on the board as well as the value of segregation index.
Conclusion
This concludes the tutorial! In a future tutorial, we plan to show you how you can add a second theory to the existing segregation model, making full use of MBSSM’s multi-theory capabilities.