Guides‎ > ‎

Behaviour Composer direct to NetLogo 5.3.1

The BC2NetLogo program enables one to build models in the Behaviour Composer and to run them in NetLogo. It speeds up and automates the process of sending the model from the browser to the NetLogo program. It has many advantages over using Java applets.

How to download and install BC2NetLogo

Download and unzip these files then click on StartBC2NetLogo.jar inside the BC2NetLogo folder after unzippingNote that if you have previously installed BC2NetLogo we recommend you extract these files to the current BC2NetLogo folder. If you choose to use a new folder then reset the 'folder' option in the settings dialogue after start BC2NetLogo. If you unable to install Java version 8 or you encounter errors with the new release try the previous release which can run under Java 7

Some Mac users have reported problems with the latest release. If you have administrator rights try clicking on the StartBC2NetLogo.jar file while holding down the control button and then allow it to run. Mac users may need to run the previous release. The previous version generates annoying but harmless warnings. You can stop these warnings by changing the server to in the advanced settings dialogue.

If you get an error such as installation is missing required file then most likely it is because your operating system is displaying the contents of the zip file but the files have not yet been extracted from the zip archive. To fix this, copy the BC2NetLogo folder to anywhere on your computer. If you get an error such as windows doesn't know how to open this file then you need to install Java 8 (or higher) from


Just click on the StartBC2NetLogo.jar file inside the BC2NetLogo folder.  We recommend you create a shortcut to StartBC2NetLogo.jar on the desktop for convenience. 

Adding custom parameters to the launch 

After launching click on the No, show advanced settings button to customise the launch. You can alter
  • Model ID -- can be a URL with a 'frozen=' parameter or just the value of that parameter. The URL can be obtained from the Share tab.
  • Session ID -- can be a session URL with a 'share=' parameter or just the value of that parameter or the word 'new' to indicate a new session is desired.
  • User ID -- can be a session URL with a 'user=' parameter or just the value of that parameter or the word 'new' to indicate a new user identity is desired.
  • Extra parameters -- any other URL parameters accepted by the Behaviour Composer. E.g. 'tab=' to start with a tab already opened to a URL.
  • Server -- useful if running another instance of the Behaviour Composer, e.g. on localhost when no internet access is available.
  • Installation folder -- where the BC2NetLogo software is located. "." is a valid option which means the folder where BC2NetLogo is installed.
  • 3D tick box -- click to launch the 3D version of NetLogo.
  • Translation tick box -- click to launch a version that is translated on the fly by Google Translate.


You should see NetLogo being launched and a web page being opened.  Create your model in the browser as usual. Instead of the Run and Download tabs you'll see a Send model to NetLogo tab. When you click on that your model will be assembled and loaded automatically into NetLogo.

Managing multiple models

You can switch between as many models as you like using the My Models tab. We recommend you give descriptions to the models you are working on and click the hide check box of those you aren't.  Next time you launch BC2NetLogo it will begin with the last model you worked on.

If you want to use a model that you have the URL of (either a frozen model or one that recreates the session perhaps copied from an earlier use of  BC2NetLogo) then paste the URL in the first line of the Code tab in BC2NetLogo and then click 'Send model to NetLogo'.

Removing History now and then

BC2NetLogo reconstructs your session when it loads. This provides a history that you can inspect and move back and forth through versions. But the longer the history the more time it takes to load. We recommend that now and then you click on Settings and Reload without history.

How to access images and data so the code runs in both BC2NetLogo and Java applets

NetLogo commands such as import-drawing should use the path "NetLogoData" in order to work in both applets and BC2NetLogo. If, for example, you wanted to use the file 'world.png' then import-drawing "NetLogoData/world.png" will work in the applet. You should put world.png in the NetLogoData that was part of the BC2NetLogo zip file. You should also send it to in order for it to be copied to the server so applets can access the file. If you aren't concerned with compatibility with Java applets then you can place images and data files anywhere.

Using the BehaviorSpace tool

The BC2NetLogo tool stores any experiments created with the BehaviourSpace tool so that experiments are not lost when the model is updated.

How to bring a model into BC2NetLogo

There are two ways to import a model:
  1. Paste the Model ID into the model section of the settings of the BC2NetLogo installer/launcher.
  2. Paste the 'frozen' model URL into the 'Import Prototypes' button in the Composer tab.

How to go back to Java applets

Click on the Share tab and copy and paste the first URL into a new browser tab or window.

How to send edits made in NetLogo to the Behaviour Composer

Warning: experimental feature. You can edit the code and the user interface widgets and then when you send a model from BC2NetLogo the system will attempt to copy your edits to your current Behaviour Composer model.

Advantages over running Java applets

  1. No security warnings (Java applets aren't considered secure these days)
  2. Faster execution
  3. Faster loading
  4. Clearer error messages
  5. Agent and patch inspector
  6. Easier to debug
  7. Local file I/O
  8. 3D views and 3D NetLogo
  9. NetLogo tools such as BehaviorSpace
  10. NetLogo logging is available
  11. Easier transition to NetLogo programming