What's New?
NetLogo 4.0.4 User Manual
Feedback from users is very valuable to us in designing and improving
NetLogo. We'd like to hear from you. Please send comments,
suggestions, and questions to feedback@ccl.northwestern.edu,
and bug reports to bugs@ccl.northwestern.edu.
Version 4.0.4 (November 2008)
- fixed Mac-only bug where up and down arrow keys stop working after Java update
- the speed slider now disables when view updates are disabled
- fixed bug where applets were sometimes not wide enough.
- fixed bug where sort-by sometimes didn't report the proper error when passed invalid inputs
- fixed extensions API bug where an extension couldn't access the drawing when running headless
- fixed extensions API bug where user-defined primitives didn't work on links by default
- fixed HubNet bug where input boxes didn't work in clients
- various fixes to HubNet plot mirroring
- fixed Gini index calculations in Wealth Distribution model
- GIS extension fixes:
- property name input to gis:property-value is now case-insensitive
- underscores are now allowed in dBase field names
- fixed bug in matrix element order for gis:convolve
- fixed bug in hemisphere clipping during inverse projection
- fixed parsing of float field values
Version 4.0.3 (August 2008)
- models:
- new Computer Science models: Particle Swarm Optimization, Simple Genetic Algorithm
- new Networks models: Diffusion on a Directed Network, Virus on a Network
- model bugs fixed: Wealth Distribution, Turbulence, Bird Breeder, Daisyworld
- features:
- the GIS extension for handling geographic data is now included (formerly was separate download)
- applets now have a small "powered by NetLogo" notice on the side, linked to the NetLogo site
- engine fixes:
- fixed bug where the neighbors primitives could report wrong values in worlds with only one row or column of patches
- fixed bug where histograms with intervals smaller than 1 did not plot correctly
- fixed bug where run and runresult could sometimes fail when certain pieces of code were reused
- fixed bug where links could not use turtles-on
- fixed bug where foo-neighbor? worked even when foo was a directed link breed
- other fixes:
- expanded and improved documentation for GoGo extension (under Robotics/NetLogoLab)
- minor additions and corrections to User Manual
- lowered the memory allocation limit which caused NetLogo to fail to launch on some Windows machines
- fixed bug where the set-plot-pen-color command could lock up the application
- fixed bug where links and lines could be drawn incorrectly around view boundaries in non-square worlds
- fixed bug where loading a model with multiple link breeds could cause an error depending on what other models you had loaded
- fixed bug where importing world files containing drawing data was abnormally slow
- fixed bug where some dictionary entries were not available through quick help
- fixed bug where quick help lookups sometimes failed
- fixed bug where the NetLogo window would jump from monitor to monitor on multiple-monitor systems
- fixed bug where the BehaviorSpace dialog could be cut off on small monitors
- fixed bug where the view updates checkbox would recheck itself when model code changed
- fixed bug where selecting commands from the history menu sometimes did not return focus to the command line
- fixed bug where the color button in a color input box was gray
- fixed bug in HubNet view mirroring where stamp produced an incorrect drawing
- fixed bug in GoGo extension where the return type of gogo:ping was incorrect
- fixed 4.0-only bug where the user-input primitive didn't work in applets
- fixed 4.0-only, Windows-only bug where plotting in point mode could be abnormally slow
- fixed Mac-only bug where the font on printouts was wrong
- fixed Mac-only bug where the link shape editor didn't work on Mac OS X 10.3
Version 4.0.2 (December 2007)
- documentation:
- many small fixes and improvements to User Manual
- models:
- new evolution model: Bug Hunt Coevolution
- improved models: Climate Change (now verified), GasLab
Atmosphere (bugfix), Red Queen, Bug Hunt Camouflage
- engine fixes:
- fixed link death bug (only models with multiple link breeds
were affected)
-
sort-by on agentsets now randomizes the order of equal
agents
-
link-heading now gives an error when the ends are on
top of each other
- fixed bug where custom plot pen colors weren't compatible
with import-world
- fixed bug in profiler extension sometimes causing nonsensical
results when turtles died
- user interface fixes:
- 3D view now works again on Linux
- NetLogo now warns you when you open or save a model from
NetLogo 3.1 or earlier, since 4.0 is not fully interoperable with
earlier versions
- fixed bug where sliders didn't keep their values in
bounds if the min or max changed
- fixed several slider-related bugs causing Java exceptions or
unexpected behavior
- fixed bug where models with long code and many sliders
compiled very slowly
- fixed bugs where you couldn't delete interface items or
edit switches in the HubNet client editor
- improved appearance of dashed lines in 3D view
- improved compatibility of applets with some web browsers and
operating systems
Version 4.0 (September 2007)
- models:
- new earth science models: Continental Divide, Climate Change
- new chemistry model: Diprotic Acid
- new materials science model: Solid Diffusion
- new mathematics models: PANDA BEAR Solo, Surface Walking 2D
- new network model: Team Assembly
- new computer science models: Hex Cell Aggregation, Particle
System Basic, Particle System Fountain, Particle System
Waterfall, Particle System Flame
- new game: Planarity
- new social science models: Language Change, El Farol (old El
Farol model is now named El Farol Network Congestion)
- new NIELS electromagnetism models: Ohm's Law, Series
Circuit, Parallel Circuit
- new Urban Suite curricular models
- new suite of Connected Chemistry curricular models
- new suite of BEAGLE Evolution curricular models
- models improved and promoted to verified: Dice Stalagmite,
Autumn, Conic Sections 2, Echo, Rebellion, Daisyworld, Sound
Machines, Birthdays, Bug Hunt Speeds, Electrostatics
- other improved models: Small Worlds (bugfix), most CA 1D
models (bugfix), Star Fractal (overhauled code), Genetic Drift T
Interact (added optional walls), Flocking (smoother animation),
Planarity (simpler code), Mimicry (simpler code), GasLab Circular
Particles (cleaner code, added plots), acid/base models (simpler
code)
- new Code Examples: Random Grid Walk Example, Link Lattice
Example, Lattice-Walking Turtles Example, Link-Walking Turtles
Example, Intersecting Links Example, State Machine Example, Breed
Procedures Example, Link Breeds Example, Mouse Drag Multiple
Example, Hill Climbing Example, Rolling Plot Example,
Ask-Concurrent Example, Ask Ordering Example, Random Network
Example, Fully Connected Network Example, Mobile Aggregation
Example, Wall Following Example, Circular Path Example, Profiler
Example
- improved Code Examples: Halo Example (simplified using
tie), Intersecting Lines Example (bugfix), RGB and HSB
Example (now demonstrates RGB lists), File Output Example
- new HubNet activity: PANDA BEAR
- new HubNet code example: Template
- improved HubNet activities: Dice Stalagmite HubNet (now
verified), Bug Hunters Camouflage (now verified), Root Beer Game
(now verified), Disease Doctors (now verified), Minority Game
- documentation:
- new Transition Guide section in User Manual provides guidance
on making models from previous versions work in NetLogo 4.0
- new Syntax section in Programming Guide section of User
Manual
- new Applets section in User Manual
- features:
- most models now run somewhat faster:
- while results vary from model to model, typical speedup
is around 1.5x
- the speedup comes from an improved compiler that now
partially compiles NetLogo code into Java byte code
- links are now their own type of agent, alongside turtles and
patches; this is useful for network models, geometry models, and
much else
- new Link Shapes Editor lets you control the appearance of
links
- logging allows researchers to record students' actions
for later analysis
- built in tick counter for keeping track of model time (see
language changes, below)
- new view update system:
- there are now two view update modes, tick-based and
continuous
- continuous is the default when you start up NetLogo;
tick-based is the default for most models in the Models
Library; continuous update mode is useful for non-tick based
models like Termites, but may also be useful during debugging
- tick-based updates are faster for most models and avoid
displaying intermediate state
- buttons no longer have a "force view update"
checkbox; most models should use tick and/or
display instead
- improved speed slider:
- you can now use the slider to "fast forward" a
model (by updating the view less often)
- in tick-based update mode, going slower pauses between
ticks rather than showing intermediate states
- in continuous update mode, going slower shows
intermediate states; you can even go so slow you can watch
agents move one at a time
- new input boxes in Interface tab permit entering text,
numbers, colors, or NetLogo code as model parameters
- arrays and hash tables are now supported via extensions (see
Arrays & Tables section of User Manual)
- new profiler extension lets you measure the running times of
your procedures
- new experimental __includes keyword allows splitting
model code into multiple source files
- color variables can now contain either a NetLogo color or an
RGB color (as a list of three numbers)
- programmable slider bounds (you can now use any NetLogo
reporter as the min, max, or increment of a slider)
- exporting the world now includes all plot data, and when you
import a world the contents of plots are restored
- the sound extension can now play audio files in addition to
MIDI sounds
- notes, monitors and output areas now have editable font size
- the color of text in notes is now editable, and a note's
background may now optionally be transparent
- "Snap to Grid" in Interface tab
- added menu items (and F1 keyboard shortcut) for quickly
accessing NetLogo Dictionary
- sliders may now be vertical or horizontal
- model files with unsaved changes are auto-saved to a
temporary files directory, in case of freezes/crashes
- HubNet clients are much easier to edit now (the client is no
longer a separate model)
- Mathematica-NetLogo link provides a real-time link between
Mathematica and NetLogo, for controlling model runs and
visualizing and analyzing results after the fact or in real time
- language changes:
- the ask command now always runs "without
interruption"; if you need the old-style concurrent
behavior, use ask-concurrent
- the syntax for using extensions is now simpler (no
underscores, no double quotes, no .jar suffix)
- new tick counter primitives: tick, ticks,
tick-advance, reset-ticks
- changes to how numbers work in NetLogo:
- all numbers are now double precision floating point
- numbers with no fractional part print as integers
(without the decimal point)
- much larger integers can now be represented (up to about
9x10^15)
- new primitive of replaces VARIABLE-of,
value-from, values-from
- new reporter all? tests whether all agents in an
agentset satisfy a condition
- turtle who numbers are now never reused until
clear-turtles or clear-all
- new primitive other reports an agentset excluding
the calling agent (this is short for with [self !=
myself])
- removed other-turtles-here and
other-<breeds>-here from language; use
other instead
- new move-to command moves a turtle to the location
of the specified turtle or patch
- for commands that create turtles or links, the commands
following are now optional
-
create-custom-turtles and
create-custom-<breeds> no longer exist; instead,
use create-turtles and create-<breeds>
which now take an optional command block
-
create-turtles now makes turtles with random headings
and colors; to get evenly spaced turtles with sequential colors
and id numbers use create-ordered-turtles
(cro for short)
- new turtle-set, patch-set, and
link-set reporters let you build agentsets in a variety
of ways
- removed turtles-from and patches-from from
language (use turtle-set and patch-set instead)
- new uphill, uphill4, downhill, and
downhill4 commands for doing hill-climbing
- these new commands replace the old reporters with the
same names
- the new commands have somewhat different semantics that
are less prone to problems
- models using the old reporters will require hand changes
- new reporters no-turtles, no-patches, and
no-links report empty agentsets
- two agentsets can now be tested for equality
- the tie and untie commands are no longer
experimental; they now take no inputs and can only be used by
links; two tie modes are available, "fixed" and
"free"
- the + operator only adds numbers now; it doesn't
work on strings or lists anymore; models must be changed by hand
to use word instead for strings and sentence
instead for numbers
- new histogram command replaces old
histogram-list, histogram-from commands
- removed random-int-or-float from the language; some
models may need to be changed by hand to use random or
random-float instead
- removed nsum and nsum4 from language; use
sum [reporter] of neighbors/neighbors4 instead
- new agentset primitives min-n-of and
max-n-of
- new primitive with-local-randomness runs code
without altering the state of the random number generator
- new file I/O primitive file-flush forces output to
disk
- new color primitive base-colors reports a list of
the 14 basic NetLogo hues
- the turtle primitive no longer accepts non-integer
inputs
- the patch primitive now accepts non-integers and
rounds them, and also wraps if allowed
- the observer may no longer use patch-at,
turtles-at, and BREED-at; use patch,
turtles-on patch, and BREED-on patch instead
- comparison operators now work on turtles, patches, and links
- new primitive reporter plot-pen-exists?
- old rgb and hsb primitives renamed to
approximate-rgb and approximate-hsb; they now
expect inputs in 0-255 range instead of 0-1.0
- the hsb and rgb reporters now report RGB
lists instead of NetLogo colors
- new primitive import-pcolors-rgb imports images into
the patches as RGB colors
- new reporter netlogo-applet? lets you test whether
the model is running as an applet or not
- code may now set a slider to values which violate the
minimum, maximum, or increment
-
locals no longer exists; use let instead
- extension primitives must now (by default) be referred to
using the extension name, e.g. sound:drums instead of
just drums
- the file-read primitive now skips over comments
- got rid of many undocumented alternate names for primitives
- user interface changes:
- "note" is the new name for the widget formerly
known as "text box"
- sliders may now be moved using the mouse scroll wheel
- built-in variables are now syntax-colored the same purple as
primitive reporters
- dialogs associated with the user-* primitives have
more consistent appearance and functionality
- contextual menus added to text areas (for cut/copy/paste and
dictionary lookup)
- Pens button removed from plots (you now edit the plot to show
or hide the pens legend)
- engine fixes:
- monitors now use an auxiliary random generator, so code in
monitors won't affect model run reproducibility
- the run and runresult primitives are now
drastically faster when called repeatedly on the same string
- the display command now works even when used by a
turtle, patch, or link
- internally, lists are now linked lists, not arrays; this does
not affect the behavior of models, but may affect performance
(positively or negatively, depending on what list operations you
are doing; see Programming Guide)
- when turtles move in a way that does not indicate direction
(e.g. setxy), the shortest path is now always drawn
(even if it wraps)
- fixed bug where in some conditions, exporting and then
re-importing the world during a model run could alter the outcome
(by affecting how who numbers were reused)
-
sort-by on lists is now stable (that is, it does not
disturb the existing order of equal items)
- the file-read primitive is now much faster at
reading very long lists
- fixed bugs where in-cone and distance
didn't work properly in some topologies
- fixed bug where some layout commands were not controlled by
the random seed
- the global variables associated with sliders, switches,
choices, and input boxes now behave the same when running
headless as in the GUI, that is, they reject values that are of
the wrong type or out of range
- other fixes:
- the Halt item on the Tools menu now works in more situations
(rather than hanging NetLogo)
- if endless recursion occurs, NetLogo now reports the error
instead of bombing
- while startup commands run, the user is now prevented from
interacting with the model
- plotting is now supported when running headless (use
export-plot or export-world to save plotted
data for later perusal)
- in the 3D view, turtle shapes now wrap around the edges if
the world has wrapping enabled
- upgraded JOGL, fixing 3D view bugs for some users
- applets can now find files associated with the model even if
the model file is in a different location than the HTML file
- in the system dynamics modeler, rate connectors can now be
repositioned
- the system dynamics modeler now shows the location of syntax
errors
- in the system dynamics modeler, you can now control which
plot is used using set-current-plot, and which stocks
are plotted is controlled by plot-pen-exists?
- default maximum Java heap size raised to one gigabyte
- headless mode now works with IBM's Java
- the GoGo extension is now easier to use (no separate
installation steps required)
- new checkbox allows you to turn off the world wire frame in
the 3D view
- extensions API changes:
- the extensions API now has a version number, so extensions
can be used with different NetLogo versions as long as the API
version number hasn't changed
- instead of being just a jar, an extension is now a directory
containing a jar, so that the directory can contain other
supporting files
- there is now rudimentary support in the API for extensions to
define new data types (the array and table extensions are
examples)
- the random number generator is now accessible by extensions
- sample extensions are now installed with Java source code
included (formerly it was separate downloads)
Version 3.1.5 (December 2007)
- installer supports Windows Vista
- rewritten and expanded Tutorial #3
- new sound extension command play-note-later for playing
musical phrases
- extensions not requiring additional jars work in applets
-
sort-by on agentsets now randomizes the order of equal
agents
- bugfixes
Version 3.1 (April 2006)
- topologies (wrapping at world edges now optional)
- automatically randomized ordering of agentsets
- you now specify the singular form of a breed name as well as the
plural
-
sort and sort-by work on agentsets now
- link primitives for network and geometry models (experimental)
-
__tie and __untie primitives (experimental)
Version 3.0 (September 2005)
- 3D view (for 2D models)
- System Dynamics Modeler
-
follow, ride and watch commands for
tracking particular agents
- "drawing layer" for marks left by turtles
- more attractive colors
- more attractive Information tab
- GoGo extension for interfacing NetLogo with physical devices
- Color Swatches dialog helps you choose colors
- image file importing
- buttons take turns now (instead of interleaving their code with
each other)
Version 2.1 (December 2004)
- "headless" mode for command line operation
- editor highlights matching parentheses and brackets
- "action keys" let buttons be triggered by keypresses
- makes QuickTime movies of models
- add "output area" to models
- improved shapes editor and built-in shapes
- new primitives including let and carefully
- computer HubNet:
- now more reliable
- clients automatically find server
- improved client interface and Control Center
Version 2.0.2 (August 2004)
- extensions API for writing commands and reporters in Java
- controlling API for controlling NetLogo from external Java code
- sound extension for making sounds and music
Version 2.0 (December 2003)
- full support for Mac OS X and Linux
- Windows 95, MacOS 8/9 no longer supported
- improved look and feel
- fast, flicker-free, non-grid-based graphics
- primitives for reading and writing external files
- strict math mode for identical results cross-platform
- export view or interface tab as image file
- improved BehaviorSpace
- computer HubNet (no longer alpha)
Version 1.3 (June 2003)
- view control strip
- choosers
- new primitives including run, runresult,
map, foreach, filter, reduce
- some primitives accept a variable number of inputs
Version 1.2 (March 2003)
- much improved speed
- computer HubNet (alpha)
Version 1.1 (July 2002)
- "Save as Applet" lets you embed your model in any web
page
- printer support
- Procedures menu
- scrollable Interface tab
Version 1.0 (April 2002)
- initial release (after a series of betas)