Skip to content
This repository

NetLogo's extensions facility allows NetLogo's capabilities to be extended from Java, Scala, and other JVM languages. See the Extensions section of the NetLogo User Manual and the guide to the Extensions API.

For other sorts of add-ons and tools for NetLogo, see Resources.

The CCL has authored a number of extensions that are bundled with NetLogo. Community members have also authored extensions. We encourage users to write their own extensions and share them.

Sharing your extension

We strongly encourage authors to share their extensions with the community. Even if your extension is not completely finished or documented, it may be still be useful to others. This wiki page is community-editable; please add your extension here.

Bundled extensions

For descriptions of the extensions bundled with NetLogo, see the Extensions section of the NetLogo User Manual. Source code (Scala or Java) for the bundled extensions is hosted here on GitHub: array, table, matrix, gogo, profiler, sound, gis, bitmap, qtj and the old network extension.

Other CCL extensions

Name Description Author(s) Info Download
Applet Opens up access to applet-specific functionality. (But applets are deprecated; see Applets.) Jason Bertsche Info Download
Custom-Logging Allows for programmatic logging Jason Bertsche Info Download
Goo Manipulates the GUI widgets in NetLogo's Interface tab from NetLogo code. Seth Tisue, Eric Russell Info Download
Gradient Introduces the scale primitive into NetLogo, for allowing the creation of color gradients. Daniel Kornhauser Info Download
Gst-Video A video extension for NetLogo based on the open source media framework GStreamer. Sam Cedarbaum, Jason Bertsche Info Windows
Mac OS
K-Means Allows basic k-means clustering Nicolas Payette Info Download
Landscapes For creating continuous function optimization problem landscapes Nicolas Payette Info Download
NW Provides network analysis primitives. (Supersedes the network extension currently bundled with NetLogo.) Nicolas Payette Info Download
Props Allows you to read and write Java system properties from within NetLogo. Jason Bertsche Info Download
RayTracing Interfaces with POV-Ray ray tracing rendering engine. Rumou Duan, Forrest Stonedahl Info (see info)
Rnd Adds primitives for doing weighted random selection. Nicolas Payette Info Download
Runs Interacts with the (yet unreleased) Model Runs feature Nicolas Payette Info Download
Shell Invokes external shell commands, reads and sets environment variables. Eric Russell Info Download
Speech Speech-synthesis for Mac OS X. Andrei Scheinkman Info (see info)
Test Allows writing unit tests in NetLogo. Josh Cough Info (see info)
URL Does HTTP GET and POST from NetLogo code. (Now superseded by the Web extension) Forrest Stonedahl Info Download
VRML Creates VRML files from NetLogo. Forrest Stonedahl Info (see info)
Web Allows you to import/export all sorts of NetLogo-specific data over HTTP, and overall allows you to make HTTP requests to your heart's content. Jason Bertsche Info Download
Wiimote Interfaces with the Nintendo Wiimote. Michelle Wilkerson-Jerde, Gregory Dam, Nathan Holbert Info (see info)

Community extensions

OSC

by Rodrigo F. Cadiz & Marco Colasso, Byron Christodoulou

Provides primitives to send data from NetLogo models via OSC (Open Sound Control) to third party applications.

SQL

by Jan Blom, Rene Quakkelaar and Mark Rotteveel

JDBC based extension for accessing databases using SQL queries. Supports MySQL and PostgreSQL out of the box, with generic support for other JDBC-compatible databases.

IODA

by Sebastien Picault and Philippe Mathieu

Provides a NetLogo implementation of the 'Interaction-Oriented' Methodology for the design of multiagent simulations. In this method, the behaviors involved in the model can be designed independently from the specificities of the agents, and expressed through abstract condition/action rules ('interactions' written in a text file), which are processed afterwards by a generic simulation engine. The way agents interact one with another is also described through a text file which is loaded during setup.

The package consists of:

  • a jar-based extension which defines all objects required for building an interaction-based simulation
  • a netlogo include file (.nls) which defines a simulation engine, compliant with the IODA approach
  • several programming examples
  • a detailed documentation with a step-by-step tutorial

  • infos/download (for NetLogo 5.0 and 4.1)

R

by Jan C. Thiele and Volker Grimm

Allows the interchange of data with R and the call of R functions from NetLogo.

BMPSprites

by Thomas Dickerson

Exposes tools for loading and working with rasterized sprite sheets. Supports scaling, "chromakey"-style tinting to make select regions match turtle colors, and flipping of sprites.

Graphics

by J. McKenzie Alexander

Exposes a number of Java Graphics2D commands for drawing on the drawing layer.

MIDI

by Martin Dobiasch

Offers more complete support for MIDI than the bundled sound extension.

Pathdir

by Charles Staelin

An extension for working with directories in NetLogo.

Pathdir provides tools for finding the current working, user and model directories; creating, moving, renaming, identifying and deleting directories; and listing the contents of directories. Pathdir also allows one to find the size and modification date of files.

String

by James Steiner

Extends NetLogo to include several useful string-manipulation primitives (a la the Java standard library).

Arduino

by Zach Haga

Lets you use an Arduino board with NetLogo

numanal (numerical analysis)

by Charles Staelin

This extension provides a number of primitives for finding the roots and minima of single variable equations, the minima of multi-variable equations, and the roots of systems of n equations in n variables. For single variable equations the extension provides the Brent algorithms for finding minima and roots. For single equations in several variables the extension uses the simplex algorithm for finding the minimum. Finally, for systems of n equations in n unknowns, the extension includes the Newton and Broyden algorithms for finding the n-dimensional root.

This extension assumes that functions can be passed to it in the form of NetLogo tasks (reporters), and therefore works only with NetLogo version 5. Several of the primitives are written to use matrix algebra and so also require the Jama Matrix class of java methods for performing linear algebra. The Jama-1.0.2.jar file, distributed with this package, must be placed in the same directory as the numanal.jar file.

NetProLogo (NetLogo + Prolog)

by Juan Galán Páez

NetProLogo (NetLogo + Prolog) is a NetLogo extension that allows to run Prolog inside NetLogo in order to add the good Prolog features about reasoning to NetLogo agents (turtles, links and patches... or the observer).

On September 2012 we have published the version 0.2 fixing some reported bugs (thanks to the users who sent the reports) and to add some new functionality.

The next version will take sometime, because we are moving to a different Prolog implementation, and the extension must be rebuilt from the beginning. The reason is that the current Prolog implementation only supports basic Prolog functionality and most of the Prolog libraries are not supported. Also the next version will be implemented in Scala instead of Java.

stats (some statistical procedures)

by Charles Staelin

The “stats” extension provides basic statistical functions for data generated within NetLogo models. stats maintains an internal data table of observations on an arbitrary number of variables and allows the user to find such statistics for the data as the means, medians, quantiles, percentiles, standard deviations, and variance-covariance and correlation matrices; to regress one or more variables on another; and to forecast the value of any variable into the future based on past observations. Regression statistics include R2, Adjusted R2, F and the probability of F, and for each of the coefficients, the standard error, T statistic and probability of the T statistic. stats also provides values of and the areas under the normal, student, binomial, gamma, beta and Chi-Square distributions, and, for some, their inverses.

Although stats can be used to analyze the overall results of a run of a model, it is intended mostly for the use of “smart” agents who gather and analyze data in order to make decisions. Agents can maintain their private data tables, or use tables shared as globals, or both.

uneof

by Marshall Abrams

When NetLogo is reading a file and encounters the end of the file, it assumes that this point in the file will always be the file's end, and that data will never be added. This extension adds the file-at-end-now? reporter, which can be used instead of NetLogo's file-at-end?. If new data is added to a file subsequent to an encounter with the end of file, calling file-at-end-now? allows NetLogo to read the new data.

Requires

time

by Colin Sheppard and Steve Railsback

The extension provides tools for common date and time operations, discrete event scheduling, and using time-series input data. This extension replaces (and dramatically improves upon) the previously published "dynamic-scheduler" extension which is now deprecated.

gs (GraphStream)

by Stefan Balev

This extension connects NetLogo to other applications supporting the NetStream protocol, such as GraphStream-based applications. NetLogo agents can use its primitives to send graph events. By receiving and processing these events, the external application can maintain and analyze a dynamic graph view of a NetLogo simulation. The nodes of this graph correspond to the turtles and its edges are the links between them. The agents can also receive graph events from external applications and use them to take their decisions.

NetCDF

by David Kaplan

Extension for reading data from NetCDF files (.nc extension; often used for atmospheric or oceanographic data) into NetLogo. The extension is able to read data from multiple NetCDF files into nested NetLogo lists.

MATLAB

by Matt Biggs

Extension for accessing Matlab from a NetLogo script. Includes primitives for passing data back and forth between NetLogo and Matlab, and the evaluation of any valid Matlab commands, including running scripts and packages available in the user's Matlab environment.

Soundx

by Eyal Ofeck, Sharona T. Levy , Orly Lahav

The soundx extension enables playing audio files concurrently. It also enables control of gain and pan. This ability can enrich a model with very nice sound effects, having full control of the stereo 'location'(left <-> right) of the sound and its volume which could give the user the feeling of depth or distance within the NetLogo spatial.

Arduino

by Corey Brady

Provides a no-frills communication link between a NetLogo model and a USB-connected Arduino board.

File

by Andreas Ihrig (alias RoboMod)

Provides new file interactions. So far implemented are filtering file extension for user dialog and reading/managing zip files.

for NetLogo 4.1 only

The following extensions are not yet available for NetLogo 5.0.

Linear Programming Solver

by Adam MacKenzie

Calls out to LPsolve55 mixed-integer linear programming solver.

This roughly complete extension assumes the problem has been formulated as a maximization problem, but allows user to declare a subset of variables within the problem as integer, and appears to work as it should. Source code, compiled extension and sample .nlogo file with documentation is included. Have also included the lpsolve library that will be required to execute.

SynthExtension

by Toby Gilham

Produces sound from NetLogo without using sound files or MIDI.

The extension currently allows for 2 different types of sound generation, simple tones with a duration and wave front interpretation. It is all written in Java and uses a separate thread to handle the sound generation.

nlboris

by Simon Lynch

Enables NetLogo agents to send messages to/from other NetLogo agents.

The download contains:

  • a README file describing the other files used
  • nlboris.jar – the extension
  • two PDF files (a tutorial & a reference guide)
  • three models which use the extension --- these are examples used in the tutorial to illustrate how the extension works

To get an overview please check the tutorial & the models.

Multiview

by Jan C. Thiele

Adds further windows for displaying patches.

It is possible to define a patch variable, which should be used for colorization. Therefore it can be used to visualize more than one patch-variable at a time (it can’t visualize turtles currently). The colorization can be actualized in each simulation step and there is a reduced set of right-mouse-click functions available (export to graphics file, inspect patch x y). The settings of the view about the size and number of patches is used for each extra view-window.

I used this stuff to visualize vegetation cover degrees of patches on different vertical layers in a forest and tested it with NetLogo v 4.1 and 4.1.1 (on Win XP and Ubuntu). The zip-file contains the extension, the source code, a html documentation and a simple example.

BDI and FIPA ACL

by Ilias Sakellariou, Petros Kefalas, and Ioanna Stamatopoulou

Supports development of goal-oriented agents that communicate using FIPA-ACL messages.

MySQL

by Yuelei Li

This extension for accessing MySQL databases can execute SQL commands such as select, insert, update, etc.

Random Number Generators

by Adam MacKenzie

Includes all of the core NetLogo probability distributions, as well as Negative Binomial and Beta distributions.

Broadens the scope of Dr. O'Sullivan's "Multiple Random Number Generator".

Usage is as follows:

  • rngs:init clears all random number generators
  • rngs:set-seed <stream_id> <seed> creates a random number generator with identifier <stream_id> with a seed value (positive integer) of <seed>. Seeds of zero will be seeded from the system clock.

Probability distribution declarations are below. A random number generator must be created with the rngs:set-seed command prior to use below.

  • rngs:rnd-float <stream_id> <range> returns a uniform number between (0, range)
  • rngs:rnd-norm <stream_id> <mean> <std-dev>
  • rngs:rnd-poisson <stream_id> <mean>
  • rngs:rnd-gamma <stream_id> <alpha> <lambda>
  • rngs:rnd-exponential <stream_id> <mean>
  • rngs:rnd-negbinomial <stream> <trials> <p(success)>
  • rngs:rnd-beta <stream_id> <alpha> <beta>

  • download (for NetLogo 4.1)

jGE (Java Grammatical Evolution)

by Loukas Georgiou

Allows NetLogo users to get familiar with and use Grammatical Evolution in their models.

The jGE NetLogo v2.0 is a jGE (Java Grammatical Evolution) library extension for NetLogo 4.1. The jGE library (link) was the first implementation of Grammatical Evolution in Java.

Another goal of this extension is to allow people interested in Evolutionary Computation to use Evolutionary Algorithms (like Grammatical Evolution) directly within a modelling environment like NetLogo for the evolution of the morphology and behaviour of agents.

Just unzip the following archive to the extensions folder and you can use the Grammatical Evolution algorithm in your NetLogo models.

The zip archive includes also:

  • Documentation and Manual
  • Source code
  • Demonstration model
  • jGE Library
  • Demo BNF grammars

  • download (for NetLogo 4.1)

Agentlist

by FliegenderFisch

Converts an agentset to a list of agents with a simple primitive agentset-to-list.

Note: I just figured out that one could do the same by using sort agentset which reports a (sorted) list of agents. I will leave the file up for download in case someone is interested in this code as a start for his own extension.

for NetLogo 4.0

see this separate page

Note that 4.0 extensions don't work with 4.1 or 5.0 (unless they are recompiled).

Something went wrong with that request. Please try again.