NetLogo Web

October 28th, 2018 - v2.5.0

Coding Enhancements

As part of Google Summer of Code a trio of improvements were made to the coding experience of NetLogo Web:

  • A “Jump to Procedure” dropdown has been added in the NetLogo Code tab that makes it easy to go right to a procedure definition in the code.
  • A “Show Usage” hotkey has been added - simply highlight some text and hit Ctrl-U (Windows/Linux) or Command-U (macOS) and you’ll see a list of the lines of code the text is used. This is very useful for finding where variables and procedures are used.
  • An “Auto-Complete” feature has been added. When the checkbox is checked in the NetLogo Code tab, suggestions for keywords, primitives, and procedure names will popup as you type in code.

Three more features were added that should also help the coding and model testing experience:

  • A “Comment Code” hotkey has been added that will toggle a line between commented or uncommented with the ; character. Useful for quickly testing code with or without some line. It is available at Ctrl-; (Windows/Linux) or Command-; (macOS).
  • There is an option to move the “Commands and Code” tabs to the right side of the screen, instead of the bottom (the default). This allows viewing the Command Center or NetLogo Code tabs side-by-side with a model, which is much nicer on wide screens.
  • Errors that occur as a result of code typed into the Command Center will now show in the Command Center display, instead of in a dialog box. The Command Center is also more consistent about retaining focus after commands are entered.

Improvements and Bug Fixes

  • Wide models will now expand to take up more screen space by default, instead of getting “stuck” inside a small box on the screen.
  • Lots of improvements to navigating models in the models library dropdown - using browser back and forward buttons should work much more reliably.
  • Workarounds were added to better support the Microsoft Edge web browser, especially around widget editing.
  • The Baby BehaviorSpace experimental feature is now aware of the behaviorspace-expiriment-name and behaviorspace-run-number primitives.
  • Fixed a couple issues and styles for the documentation pages.
  • Turtle pen size choices are now better respected.
  • The same nlogo file can now be uploaded multiple times in a row - before nothing would happen on the 2nd or further uploads.
  • Monitor widgets allow non-numeric values, as in desktop.
  • Models that use inspect can now compile and run, but the command doesn’t do anything.
  • More primitives have been added to the code highlighter.
  • Fix for using turtle-set with special agentsets, like turtles and patches. It wasn’t making a new agentset in these cases, so adjustments to the new agentset would affect all agents in the world.
  • Improved error messages for n-of to match desktop.
  • Fixed an issue where using setxy with pen-down and a wrapped world wouldn’t properly wrap the pen drawings.
  • Exporting anonymous procedures works with export-world without errors. Note that importing is not supported (in desktop or web).
  • Speed optimizations were added around breed checks for agents, the patchat primitive, and using commands or reporters with large agentsets, like patches in a big world.
  • The item primitive now allows non-integer indexes when accessing a list, just like desktop.
  • Errors are thrown when using ask or inspect with a dead agent, as with desktop.
  • Using towards with patches no longer throws an error.

May 31st, 2018 - v2.4.0

Newly Supported NetLogo Features

  • The very exciting new feature for this release is model interface editing support! Model authoring is now possible in NetLogo Web. See the new documentation for more information.

Improvements and Bug Fixes

  • Documentation has been updated for authoring and to include more information on the differences with NetLogo desktop.
  • Manually typed slider values will not go outside the limits of the slider.
  • Small improvements were made to the automatic indentation in the code editor.
  • Performance optimizations were added around using any? and with primitives together, as in any? turtles with [color = red].

March 23rd, 2018 - v2.3.1

Models Library

NetLogo Web has been updated with the same version of the Models Library that comes with NetLogo desktop 6.0.3, which means that many models have been added or modified. See the "Models" section here for more information.

Improvements and Bug Fixes

  • The diffuse and diffuse4 commands are now properly symmetrical, matching the fix made in NetLogo desktop 6.0.3.

March 9th, 2018 - v2.3.0

Newly Supported NetLogo Features

  • import-world and export-world are now supported.
  • import-drawing has a basic implementation that tries to load an image at the given URL.
  • netlogo-version will return a string value that matches the version from these release notes.

Improvements and Bug Fixes

  • World will not clear on a recompile unless there are code changes that require it.
  • Agents are now rendered in breed declaration order, as they are in desktop.
  • Number input widgets display correctly in Firefox when set to a small size.
  • Input widgets now update values only when an edit is complete, to avoid causing problems with incomplete changes while models are running.
  • The command console will now properly insert show when using any reporter, not just some.
  • Histograms now properly round down when bucketing data.
  • Small improvement to the display of link shapes so they are more reasonably sized.
  • Plot update commands recognize stop.
  • Plots now use a clone of the main model random number generator, as they do in desktop NetLogo.

January 8th, 2018 - v2.2.3

Improvements and Bug Fixes

  • Show an x-value in plot tooltips.

November 27th, 2017 - v2.2.2

Improvements and Bug Fixes

  • Bugfixes around exporting CSV data from plots.
  • Output area widgets should update correctly.
  • Using run or runresult on strings with comments should work correctly.
  • Minor user interface clean-up.

October 27th, 2017 - v2.2.1

Newly Supported NetLogo Features

  • The diffuse4 primitive is now supported.
  • Vertical sliders are now presented correctly.

Improvements and Bug Fixes

  • Fixed a bug where turtles moving back would not draw pen lines.
  • Fixed a bug with the display of histogram plots when using temporary plot pens.
  • Fixed a bug that would incorrectly set tied turtle positions in rare circumstances.

October 5th, 2017 - v2.2.0

Newly Supported NetLogo Language Primitives

  • read-from-string
  • export-view
  • run and runresult now work on string values. Example: run "set sum 10 + 100"

Improvements and Bug Fixes

  • Models that are saved with code tab errors can now be loaded so the errors can be addressed.
  • Running a reporter in the command center automatically adds show for usability.
  • Fix for a couple issues when loading a model from an .nlogo file, including ghosting agents at full tick speed.
  • Plot title sizes were reduced to give more room for the plots.
  • clear-all clears output areas, too.
  • Models library updated to match the 6.0.2 NetLogo desktop release.

July 28th, 2017 - v2.1.0

Now-Supported Language Primitives

  • insert-item
  • range
  • wait (This implementation is for basic compatibility. We recommend NetLogo Web models avoid the use of this primitive.)

Selected BugFixes / Improvements

  • Numerous major optimizations and performance improvements.
  • Improve anonymous reporter and command display with show.
  • Allow extract-hsb to take RGB lists.
  • Make is-breed? work with links.

Models Library

NetLogo Web is now using a preliminary version of the Models Library that will come with the soon-to-be-released NetLogo 6.0.2, which means that many models have been added or modified. See the "Models" section here for more information.

February 5th, 2017

Now-Supported Language Primitives

  • clear-globals
  • downhill
  • downhill4
  • layout-circle
  • layout-radial
  • layout-tutte
  • random-gamma
  • uphill
  • uphill4

NetLogo 6 Parity

Much has been done to keep step with the desktop version of NetLogo as it transitioned from version 5.3.1 to version 6.0.0. The two most significant changes have been making link primitives more consistent with one another in their behavior, and the replacement of tasks with anonymous procedures. For more information about these items, please see the "Tasks replaced by Anonymous Procedures" and "Link reporters overhauled to be more consistent and flexible" subsections of the NetLogo 6 transition guide.

Models Library

NetLogo Web is now using the version of the Models Library that comes with NetLogo 6, which means that many models have been added or modified. See the "Models" section here for more information.

October 11th, 2016

Now-Supported Language Primitives

  • random-gamma

September 13th, 2016

Now-Supported Language Primitives

  • export-output
  • user-input

August 9th, 2016

Now-Supported Language Primitives

  • link-shapes

July 26th, 2016

Miscellaneous

NetLogo Web files are now distributed in such a way that clearing your browser's cache should never be necessary for obtaining the latest versions of the files.

June 1st, 2016

Now-Supported Language Primitives

  • user-yes-or-no?

April 8th, 2016

Widget Enhancement

Input widgets can now be used to select colors.

February 25th, 2016

Widget Enhancement

Buttons now indicate if they are "forever" buttons. Also, buttons now indicate if they run in an agent context (T (turtles), P (patches), or L (links)).

February 10th, 2016

Now-Supported Language Primitives

  • at-points
  • sort-by
  • sort-on

December 14th, 2015

Widget Error Reporting

Widgets now support displaying red label text when they contain an error.

This does not currently apply to plot widgets, which will still display pop-ups about errors on model load, for the time being.

November 9th, 2015

Newly-Implemented Language Primitives

First and foremost, this update brings with it the implementation of many NetLogo primitives, substantially increasing the percentage of the language supported by NetLogo Web.

The newly-supported primitives are as follows:

  • approximate-rgb
  • approximate-hsb
  • breed-at
  • clear-drawing
  • date-and-time
  • extract-hsb
  • home
  • hsb
  • in-cone
  • is-boolean?
  • max-n-of
  • min-n-of
  • modes
  • netlogo-web?
  • patch-at-heading-and-distance
  • patch-size
  • pen-erase
  • random-exponential
  • random-normal
  • random-poisson
  • random-pxcor
  • random-pycor
  • rgb
  • set-patch-size
  • shapes
  • shuffle
  • stamp-erase
  • user-message
  • with-local-randomness
  • with-min
  • with-max
  • wrap-color

Updated Models Library

This change adds the Traffic Basic Adaptive Individuals model and updates dozens of other models were updated with small tweaks and code style improvements.

The above changes, combined with all of the new primitives added, has allowed the following models to now be openable in NetLogo Web:

  • Autumn
  • Bacteria Food Hunt
  • Bacteria Hunt Speeds
  • BeeSmart Hive Finding
  • Bug Hunt Coevolution
  • Bug Hunt Speeds
  • Connected Chemistry Gas Combustion
  • Connected Chemistry Rusting Reaction
  • Connected Chemistry Solid Combustion
  • Current in a Wire
  • Dice Stalagmite
  • Disease Solo
  • DNA Replication Fork
  • Echo
  • El Farol Network Congestion
  • epiDEM Basic
  • epiDEM Travel and Control
  • Equidistant Probability
  • Fireworks
  • Flocking - Alternative Visualizations
  • Flocking Vee Formations
  • GasLab Single Collision
  • Geometron Top-Down
  • HSB and RGB Example
  • K-Means Clustering
  • Lightning
  • Lunar Lander
  • Many Regions Example
  • Muscle Development
  • Osmotic Pressure
  • Particle Swarm Optimization
  • Particle System Flame
  • Particle System Fountain
  • Particle System Waterfall
  • Plant Speciation
  • Prob Graphs Basic
  • Random Basic Advanced
  • Reactor Top Down
  • Red Queen
  • Sampler Solo
  • Shuffle Board
  • Simple Economy.nlogo
  • Stochastic Patchwork
  • Sunflower Biomorphs
  • Traffic Basic Adaptive Individuals
  • Turtles Circling
  • Urban Suite - Path Dependence
  • Urban Suite - Recycling
  • Vision Cone Example
  • Voronoi

Note: While most of these work fine, the fact that a model is openable does not imply that we think the model is running well. Some of these models are still a bit slow or buggy, and we plan to fix that in future updates.

New Random Number Generator

Previously, NetLogo Web used the standard JavaScript random number generator. With this update, NetLogo Web now gets its random numbers from a direct port of the random number generator used in desktop NetLogo. Thanks to this, any seed passed to random-seed leads to exactly the same model run in NetLogo Web as it does in desktop NetLogo.