created with NetLogo
view/download model file: cruise.nlogo
This page was automatically generated by NetLogo 2.0.2. Questions, problems? Contact feedback@ccl.northwestern.edu.
The applet requires Java 1.4.1 or higher to run. It will not run on Windows 95 or Mac OS 8 or 9. Mac users must have OS X 10.2.6 or higher and use a browser that supports Java 1.4 applets (Safari works, IE does not). On other operating systems, you may obtain the latest Java plugin from Sun's Java site.
In order for this to work, this file, your model file (cruise.nlogo), and the file NetLogoLite.jar must all be in the same directory. (You can copy NetLogoLite.jar from the directory where you installed NetLogo.)
On some systems, you can test the applet locally on your computer before uploading it to a web server. It doesn't work on all systems, though, so if it doesn't work from your hard drive, please try uploading it to a web server.
You don't need to include everything in this file in your page. If you want, you can just take the HTML code beginning with <applet> and ending with </applet>, and paste it into any HTML file you want. It's even OK to put multiple <applet> tags on a single page.
If NetLogoLite.jar and your model are in different directories, you must modify the archive= and value= lines in the HTML code to point to their actual locations. (For example, if you have multiple applets in different directories on the same web server, you may want to put a single copy of NetLogoLite.jar in one central place and change the archive= lines of all the HTML files to point to that one central copy. This will save disk space for you and download time for your user.)
WHAT IS IT?
-----------
This is a proof of concept for including GIS into NetLogo for a dynamic Car Cruising model within the Santa Fe downtown area.
A project was defined for two summer interns, Simran McKenna and Dayoung Jung by Santa Fe Economic Development Inc, under the guidance of Stephen Guerin of the RedfishGroup in collaboration with Santa Fe's Community Development Division and the city police. I helped out evaluating NetLogo's capabilities for importing a GIS image and executing a model with sufficient performance
The background map of the model is the result of converting GIS data for downtown Santa Fe NM into an image, initally a jpeg file. It was then converted into a text format image file: PPM (portable pix map) consisting of three RGB values for each pixel. These were converted into NetLogo color values using the import-ppm procedure. The data was cleaned up a bit within netlogo itself with the cleanup-map procedure, then written to an external data file via the export-dat procedure. Finally, for this version of the model, the data written out in the preceeding step was cut & paste into the model as an array of integer values. Note that 9.9999 was converted to/from 9 as a space saving stunt for performance gains. See http://backspaces.net/hacks/23/netlogo-cruising-model for a blog entry on the topic.
Finally, the model itself simply manages many automobiles driving on the map staying on the "streets" by using the patch colors as guide. The cars randomly choose side streets as they see them, choosing to turn roughly 1/3 of the time in the move-forward procedure. It chooses its next location by seeing if it should turn as just described, or by choosing a forward direction in a set of increasing angles of forward cones. NOTE: See mail lists for newer way to do this via a reporter returning agent-sets within a cone of given degree. It will have considerably better performance.
That said, the fact we get such reasonable performance pushing NetLogo to its limits is quite a testimonal for NetLogo!
HOW IT WORKS
------------
The agents are initialized to be on a street at a random location. They then use a simple move-forward proceedure to choose a reasonable next location.
HOW TO USE IT
-------------
Choose a number of cars. Then click setup then go.
THINGS TO NOTICE
----------------
That it works at all is quite surprising, at least to me! This suggests we can start pushing NetLogo into GIS oriented models using simple patch level heuristics.
THINGS TO TRY
-------------
Not much .. its pretty limited.
EXTENDING THE MODEL
-------------------
Good homework would be to figure out how to have cars handle one way streets, crowding, street repair and so on. Also, different speeds might be interesting.
NETLOGO FEATURES
----------------
Tiny patches => Maps.
RELATED MODELS
--------------
None that I know of .. check the mail archive though, several folks were working in the GIS area when this was discussed on the mail list.
CREDITS AND REFERENCES
----------------------
Stephen Guerin, Simran McKenna and Dayoung Jung of the intern project.
The gang at http://friam.org, especially during our GIS reviews.
Craig Fiels, Santa Fe Community Development Division
Catherine Zacher, SFEDI