Skip to content

nickmancol/SLAPP3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SLAPP

Swarm-Like Agent Protocol in Python (3)

Here you have SLAPP 3.0.5 build 20170905, running in Python 3 (in the SLAPP repository you have related material and very old versions; the 2.0.x versions are still related to Python 2).

We have here also a Reference Handbook (it is still a draft and has to be improved).

Five chapters of the book of Boero, R., Morini, M., Sonnessa, M., and Terna, P., Agent-based Models of the Economy - From Theories to Applications, are related to SLAPP.

A recent paper (Business Cycle in a Macromodel with Oligopoly and Agents' Heterogeneity: An Agent-Based Approach, 2017) of M.Mazzoli, M.Morini, and P.Terna, is using SLAPP as agent-based modeling shell.

We have also a running version of SLAPP, via the wonderful Binder project: try it!

In October 2016 I taught a course on Agent-Based Simulation for the Master in Data Science for Complex Economic Systems, MADAS and for the Vilfredo Pareto Doctorate in Economics. I have introduced SLAPP both as a tutorial in agent-based programming and a simulation shell, with some comparative references to NetLogo. Look here for the contents and videos of the course; have also a preliminary look to the _README.txt file.
The file 2.mp4 of lesson 4 contains, from minute 41, a short introduction to the use of SLAPP online.


SLAPP logo: credits to Steve Rogers.


How to start: a quick introduction

If you are interested in an introduction to Agent-based programming techniques in a general way, read the content of the file "SLAPP tutorial.txt" ; the tutorial shows the fundamental ideas of the Swarm project, i.e., the roots of the SLAPP construction; NB, to use SLAPP, it is not necessary to study this tutorial.

To start running the agent-based shell, read the content of the file "SLAPP shell.txt" and install the required libraries (about library installation, above all look at the Appendix A of the Reference Handbook here in this same folder); then, via a terminal, go into the SLAPP main folder (that where you have unzipped SLAPP), and:

1 - launch the application "basic" as in the following window:

the effect is (plain text output only):

or

2 - launch the application "school" as in the following window:

the effect is (plain text output):

and as graphical output:

or

3 - launch the application "production" as in the following window:

the effect is (plain text output):

and as graphical output:

If you prefer to work with Python in a notebook—using (i) the IPython interactive version of Python or, better, (ii) the agnostic language shell named Jupyter—via a terminal go into the main SLAPP folder (that where you have unzipped SLAPP) and launch Jupyter as below:

Then chose iRunShell.ipynb as in:

Finally, run the notebook placing the cursor in the first cell and hitting the key in the top bar (or entering Shift+Enter); then chose a project as in:

The results will be the same reported above in the non interactive presentation.

Please note that we have only a set of example. A good starting point about running SLAPP is the Reference Handbook, section How to run SLAPP.

About

Swarm-Like Agent Protocol in Python (3)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 94.3%
  • Jupyter Notebook 5.4%
  • Shell 0.3%