{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Change up the version numbers appropriately in the line below to get the version of Netlogo you want to work with." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " % Total % Received % Xferd Average Speed Time Time Time Current\n", " Dload Upload Total Spent Left Speed\n", "100 191M 100 191M 0 0 40.9M 0 0:00:04 0:00:04 --:--:-- 40.9M\n" ] } ], "source": [ "!curl http://ccl.northwestern.edu/netlogo/6.0.4/NetLogo-6.0.4-64.tgz > NetLogo.tgz\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Unzip the file:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "!tar -xzf NetLogo.tgz" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Having now unzipped Netlogo, we're going to rename it to remove the spaces in the directory name. Spaces can cause problems." ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "!mv 'NetLogo 6.0.4' 'NetLogo6.0.4'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "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." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "!chmod 755 run-abm-script" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "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:" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "!find . -depth -name '* *' \\\n", "| while IFS= read -r f ; do mv -i \"$f\" \"$(dirname \"$f\")/$(basename \"$f\"|tr ' ' _)\" ; done" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we're ready. Proceed to Step 2!" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.6" } }, "nbformat": 4, "nbformat_minor": 2 }