The MultiView Extension gives you the opportunity to visualize more than one patch variable at a time within different views.
A second usage scenario is, that you preserve the state of former simulation steps different windows, to see the spatial and temporal (patch) pattern during the simulation.
It creates new windows, in which you see the NetLogo World/View (only the patches, without turtles). For each window you can define a patch variable which should be used for the colorization of the patches as it is done for the normal view with the pcolor variable. The new window(s) has/have a context menu which gives you the opporunity to inspect the patches and to export the view into a png image file.
Jan C. Thiele, 2010
University of Goettingen, Germany
Department of Ecoinformatics, Biometrics and Forest Growth
This software is published under the terms of the GNU GPL (General Public License) v2.
The MultiView extension is new and experimental. It is not yet tested extensivly.
Nonetheless, I hope it will find some users.
Please let me know about your experiences (jthiele at gwdg dot de, http://www.uni-goettingen.de/en/72779.html).
Unzip the package directly (without creating a new folder) into the extensions-Folder of your NetLogo installation. You should find a folder multiview now and within this folder a file multiview.jar as well as some other folders. See folder example for a short and simple demonstration of the functionality of the extension. To use the extension in your model, add a line to the top of your procedures tab:
extensions [multiview]
If your model already uses other extensions, then it already has an extensions line in it, so just add multiview to the list.
For more information on using NetLogo extensions, see the Extensions Guide.
To use a new View-Window you should declare a new global variable, for example like this:
globals[ view1 ]
You will need such a global variable for every view window you want to use. Then define your patch variables, for example:
patches-own[ pcolor2 ]
In your setup-procedure you will create the new window and save the (object) reference into the global variable. This could look like this:
to setup[ ; create a new window with the title "visualization for pcolor2" which will use the patch variable "pcolor2" for visualization set view1 multiview:newView "visualization for pcolor2" "pcolor2" ]
Every time you want an update of the colorization of the patches of your new view window you have to call the repaint primitive for every view window. In most cases you will do this in the go-procedure like this:
to go[ ... ; do something multiview:repaint view1 ]
Please note, that you can't call multiview:repaint primitive for a window which you have already closed via a mouse click, because the reference saved in the global variable won't be found and the call of multiview:repaint will fail. If you close NetLogo, load a new model or call the clear-all primitive all open view windows will be closed.
multiview:close multiview:newView multiview:rename multiview:repaint
Will close (and destroy) the view window (if open) specified in the variable argument. Please remember that it isn't possible to call the repaint primitive for the variable againt after executing close. But you can create a new window, stored in the variable, again.
A reporter to create a new view window. The window uses the settings defined for the NetLogo World/View (i.e. max-pxcor, min-pxcor, patch-size etc.) at the time of the call of the primitive. You can't change this settings after creation of the view window. Close the current window and create a new one will help.
The first argument, title, is any string (surrounded by quotation marks) and will be used for as title of the new window. The second argument, patch-variable, is the patch-variable, which should be used for the colorization of the patches in the new view window. This argument should be given as a string (surrounded by quotation marks).
You should save the return value of this reporter into a global variable.
Primitive to change the title of a view window. The first argument is the variable which holds the reference to the window and the second argument is a string (surrounded by quotation marks) with the new window title.
Primitive to repaint/update a view window saved in variable. This should be called in every simulation step, when the NetLogo World is updated/repainted. But it is also possible to save the state of a former simulation step in such a window. In this case, you shouldn't call the repaint primitive in a go-procedure.