COMPUTER SYSTEMS RESEARCH
Fall/Spring 2005 - 2006
Agent-based modeling prototypes
Multiagent Traffic Management,
traffic lights
- Sample: run the heatbugs.htmlHeatBugs demo in Netlogo, MASON, and Repast (also sugarscape)
- APIs:
- Make an Applet of your current model
- NetLogo
- Copy your .nlogo source code into web-docs
- Load this source code into NetLogo, choose Save As Applet in the File menu
- Check if this new .html file that has been created loads correctly in a browser
If not, edit the archive= and value= lines in the applet tag and add a complete url path:
"http://www.tjhsst.edu/~yourname/..."
- Samples:
Aaron Salls,
Mr. Latimer's
- MASON
- Copy mason.jar into a directory in web-docs
(or copy mason.jar if it exists in your mason directory)
- In this same web-docs directory, create directories /sim/app/schelling/ for example.
- Copy all your code from your actual mason/sim/app/schelling/ directory
(this example is for the SchellingWith UI code) into this web-docs version
- Sample html file for this Schelling applet
- If you want more info, see How to Make an Applet from the
How To page
- RePast RePast creating an executable
- Starter assignments to try:
- See Hanneman's Schelling's model of residential segregation
- RePast modeling package. To run: repastj.sh (Java version) or repastpy.sh (Python/XML version)
Repast Python version: java -jar /usr/local/repast/RepastPy/repastpy.jar (schelling version included)
See the Sugarscape model as a good example (RepastJ)
Repast study guide
RePast examples, and
Tutorials
To edit and recompile for RePast:
To run
RePast in Python: java - jar /usr/local/repast/RepastPy/repastpy.jar
There is a Schelling model in Python/XML
Implement predator/prey prototype model,
also see
all Hanneman's chapters
Here's MASON's Schelling model. Schelling Segregation Model and Sugarscape
To "install" this Schelling model:
- install MASON, download the mason.tar file
- cd mason/sim/app/
- mv the schelling.tar file to mason/sim/app
- tar xvf schelling.tar
this creates the schelling directory: mason/sim/app/schelling/
- cd schelling
- compile this java code for schelling: javac SchellingWithUI.java
- go back to the mason directory: cd ../../../
- run the schelling code: javac sim.app.schelling.SchellingWithUI
- OR use: java sim.display.Console
this starts the MASON generic interface