Change up the version numbers appropriately in the line below to get the version of Netlogo you want to work with.

In [1]:
!curl > NetLogo.tgz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  191M  100  191M    0     0  40.9M      0  0:00:04  0:00:04 --:--:-- 40.9M

Unzip the file:

In [2]:
!tar -xzf NetLogo.tgz

Having now unzipped Netlogo, we're going to rename it to remove the spaces in the directory name. Spaces can cause problems.

In [7]:
!mv 'NetLogo 6.0.4' 'NetLogo6.0.4'

Finally, we have a 'bash' script that we are going to be using in Step 2. The Step 2 notebook lets us use dropdown menus to configure the experiment we want to run. Then, when we hit the 'run experiment' button, the notebook will pass our settings to the run-abm-script. But first, we have to tell the machine that this is a script in the first place. We do that by changing its permissions.

In [5]:
!chmod 755 run-abm-script

Remember what we said above about spaces in directory names can cause troubles? There are lots of directories in NetLogo that have spaces in the name. We're going to search everything and replace the space with an underscore:

In [4]:
!find . -depth -name '* *' \
| while IFS= read -r f ; do mv -i "$f" "$(dirname "$f")/$(basename "$f"|tr ' ' _)" ; done

Now we're ready. Proceed to Step 2!