From caaa26fd8aded9cc0150137319ac3d3237e24f2f Mon Sep 17 00:00:00 2001 From: Shuyu Cao Date: Sun, 4 Aug 2019 09:38:07 -0400 Subject: [PATCH] Created using Colaboratory --- Logistics_output_files_for_turns.ipynb | 724 ++++++++++++++++--------- 1 file changed, 458 insertions(+), 266 deletions(-) diff --git a/Logistics_output_files_for_turns.ipynb b/Logistics_output_files_for_turns.ipynb index ec1b981..d8d1542 100644 --- a/Logistics_output_files_for_turns.ipynb +++ b/Logistics_output_files_for_turns.ipynb @@ -30,10 +30,10 @@ "metadata": { "id": "94TcKJBXnHAC", "colab_type": "code", - "outputId": "e0d6aabf-907d-48b9-bf1d-b49de43b4c7a", + "outputId": "5903a702-f316-4e4d-bfc0-f1c27193fa26", "colab": { "base_uri": "https://localhost:8080/", - "height": 73 + "height": 1000 } }, "source": [ @@ -104,12 +104,239 @@ "drive.mount('/content/drive')\n", "%cd /content/drive/'My Drive'/BWSI-Remote-Sensing/'Final_exercise'/'game2'/" ], - "execution_count": 43, + "execution_count": 1, "outputs": [ { "output_type": "stream", "text": [ - "Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n", + "Collecting rasterio\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/a2/d6/f5dc5b31b5bbb8c9cf0ae2f38a31e4406994db48f9f14d9434588c935c7c/rasterio-1.0.24-cp36-cp36m-manylinux1_x86_64.whl (19.7MB)\n", + "\u001b[K |████████████████████████████████| 19.7MB 4.9MB/s \n", + "\u001b[?25hCollecting cligj>=0.5 (from rasterio)\n", + " Downloading https://files.pythonhosted.org/packages/e4/be/30a58b4b0733850280d01f8bd132591b4668ed5c7046761098d665ac2174/cligj-0.5.0-py3-none-any.whl\n", + "Collecting affine (from rasterio)\n", + " Downloading https://files.pythonhosted.org/packages/56/5d/6877929932d17850fa4903d0db8233ec8ed35aab7ceae96fa44ea6d479bd/affine-2.2.2-py2.py3-none-any.whl\n", + "Collecting click-plugins (from rasterio)\n", + " Downloading https://files.pythonhosted.org/packages/e9/da/824b92d9942f4e472702488857914bdd50f73021efea15b4cad9aca8ecef/click_plugins-1.1.1-py2.py3-none-any.whl\n", + "Requirement already satisfied: click<8,>=4.0 in /usr/local/lib/python3.6/dist-packages (from rasterio) (7.0)\n", + "Collecting snuggs>=1.4.1 (from rasterio)\n", + " Downloading https://files.pythonhosted.org/packages/58/14/8e90b7586ab6929861161e73e9fd55637a060e4d14dd1be14a4b8a08751f/snuggs-1.4.6-py3-none-any.whl\n", + "Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from rasterio) (1.16.4)\n", + "Requirement already satisfied: attrs in /usr/local/lib/python3.6/dist-packages (from rasterio) (19.1.0)\n", + "Requirement already satisfied: pyparsing>=2.1.6 in /usr/local/lib/python3.6/dist-packages (from snuggs>=1.4.1->rasterio) (2.4.2)\n", + "Installing collected packages: cligj, affine, click-plugins, snuggs, rasterio\n", + "Successfully installed affine-2.2.2 click-plugins-1.1.1 cligj-0.5.0 rasterio-1.0.24 snuggs-1.4.6\n", + "Collecting rasterstats\n", + " Downloading https://files.pythonhosted.org/packages/43/30/7f0b3ed0debd10a6687110dd9d46b308d33ff4696b88c2461758d86ff428/rasterstats-0.13.1-py3-none-any.whl\n", + "Requirement already satisfied: cligj>=0.4 in /usr/local/lib/python3.6/dist-packages (from rasterstats) (0.5.0)\n", + "Collecting simplejson (from rasterstats)\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/e3/24/c35fb1c1c315fc0fffe61ea00d3f88e85469004713dab488dee4f35b0aff/simplejson-3.16.0.tar.gz (81kB)\n", + "\u001b[K |████████████████████████████████| 81kB 8.7MB/s \n", + "\u001b[?25hRequirement already satisfied: numpy>=1.9 in /usr/local/lib/python3.6/dist-packages (from rasterstats) (1.16.4)\n", + "Requirement already satisfied: shapely in /usr/local/lib/python3.6/dist-packages (from rasterstats) (1.6.4.post2)\n", + "Requirement already satisfied: rasterio>=1.0 in /usr/local/lib/python3.6/dist-packages (from rasterstats) (1.0.24)\n", + "Collecting fiona (from rasterstats)\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/89/4a/193cd6a75e51062c85f4e1cd6f312b3bbda6e26ba7510f152ef5016f0b16/Fiona-1.8.6-cp36-cp36m-manylinux1_x86_64.whl (17.9MB)\n", + "\u001b[K |████████████████████████████████| 17.9MB 16.4MB/s \n", + "\u001b[?25hRequirement already satisfied: click<8,>=4.0 in /usr/local/lib/python3.6/dist-packages (from cligj>=0.4->rasterstats) (7.0)\n", + "Requirement already satisfied: affine in /usr/local/lib/python3.6/dist-packages (from rasterio>=1.0->rasterstats) (2.2.2)\n", + "Requirement already satisfied: click-plugins in /usr/local/lib/python3.6/dist-packages (from rasterio>=1.0->rasterstats) (1.1.1)\n", + "Requirement already satisfied: snuggs>=1.4.1 in /usr/local/lib/python3.6/dist-packages (from rasterio>=1.0->rasterstats) (1.4.6)\n", + "Requirement already satisfied: attrs in /usr/local/lib/python3.6/dist-packages (from rasterio>=1.0->rasterstats) (19.1.0)\n", + "Requirement already satisfied: six>=1.7 in /usr/local/lib/python3.6/dist-packages (from fiona->rasterstats) (1.12.0)\n", + "Collecting munch (from fiona->rasterstats)\n", + " Downloading https://files.pythonhosted.org/packages/68/f4/260ec98ea840757a0da09e0ed8135333d59b8dfebe9752a365b04857660a/munch-2.3.2.tar.gz\n", + "Requirement already satisfied: pyparsing>=2.1.6 in /usr/local/lib/python3.6/dist-packages (from snuggs>=1.4.1->rasterio>=1.0->rasterstats) (2.4.2)\n", + "Building wheels for collected packages: simplejson, munch\n", + " Building wheel for simplejson (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for simplejson: filename=simplejson-3.16.0-cp36-cp36m-linux_x86_64.whl size=114019 sha256=6f7b85402241855401562091472299276fa16f9584721a1703e4ea789366e579\n", + " Stored in directory: /root/.cache/pip/wheels/5d/1a/1e/0350bb3df3e74215cd91325344cc86c2c691f5306eb4d22c77\n", + " Building wheel for munch (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for munch: filename=munch-2.3.2-py2.py3-none-any.whl size=6613 sha256=8e4fe9d0750fe2a45d6cd70b44d43cf8d3e746cba13b8cb857b35ae71c1f3287\n", + " Stored in directory: /root/.cache/pip/wheels/db/bf/bc/06a3e1bfe0ab27d2e720ceb3cff3159398d92644c0cec2c125\n", + "Successfully built simplejson munch\n", + "Installing collected packages: simplejson, munch, fiona, rasterstats\n", + "Successfully installed fiona-1.8.6 munch-2.3.2 rasterstats-0.13.1 simplejson-3.16.0\n", + "Collecting pyproj\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/16/59/43869adef45ce4f1cf7d5c3aef1ea5d65d449050abdda5de7a2465c5729d/pyproj-2.2.1-cp36-cp36m-manylinux1_x86_64.whl (11.2MB)\n", + "\u001b[K |████████████████████████████████| 11.2MB 4.7MB/s \n", + "\u001b[?25hInstalling collected packages: pyproj\n", + "Successfully installed pyproj-2.2.1\n", + "Reading package lists... Done\n", + "Building dependency tree \n", + "Reading state information... Done\n", + "The following package was automatically installed and is no longer required:\n", + " libnvidia-common-410\n", + "Use 'apt autoremove' to remove it.\n", + "The following additional packages will be installed:\n", + " libspatialindex-c4v5 libspatialindex4v5\n", + "The following NEW packages will be installed:\n", + " libspatialindex-c4v5 libspatialindex-dev libspatialindex4v5\n", + "0 upgraded, 3 newly installed, 0 to remove and 4 not upgraded.\n", + "Need to get 555 kB of archives.\n", + "After this operation, 3,308 kB of additional disk space will be used.\n", + "Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libspatialindex4v5 amd64 1.8.5-5 [219 kB]\n", + "Get:2 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libspatialindex-c4v5 amd64 1.8.5-5 [51.7 kB]\n", + "Get:3 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libspatialindex-dev amd64 1.8.5-5 [285 kB]\n", + "Fetched 555 kB in 1s (429 kB/s)\n", + "Selecting previously unselected package libspatialindex4v5:amd64.\n", + "(Reading database ... 131289 files and directories currently installed.)\n", + "Preparing to unpack .../libspatialindex4v5_1.8.5-5_amd64.deb ...\n", + "Unpacking libspatialindex4v5:amd64 (1.8.5-5) ...\n", + "Selecting previously unselected package libspatialindex-c4v5:amd64.\n", + "Preparing to unpack .../libspatialindex-c4v5_1.8.5-5_amd64.deb ...\n", + "Unpacking libspatialindex-c4v5:amd64 (1.8.5-5) ...\n", + "Selecting previously unselected package libspatialindex-dev:amd64.\n", + "Preparing to unpack .../libspatialindex-dev_1.8.5-5_amd64.deb ...\n", + "Unpacking libspatialindex-dev:amd64 (1.8.5-5) ...\n", + "Setting up libspatialindex4v5:amd64 (1.8.5-5) ...\n", + "Setting up libspatialindex-c4v5:amd64 (1.8.5-5) ...\n", + "Processing triggers for libc-bin (2.27-3ubuntu1) ...\n", + "Setting up libspatialindex-dev:amd64 (1.8.5-5) ...\n", + "Requirement already satisfied: osmnx in /usr/local/lib/python3.6/dist-packages (0.10)\n", + "Requirement already satisfied: geopandas>=0.5 in /usr/local/lib/python3.6/dist-packages (from osmnx) (0.5.1)\n", + "Requirement already satisfied: pandas>=0.24 in /usr/local/lib/python3.6/dist-packages (from osmnx) (0.24.2)\n", + "Requirement already satisfied: networkx>=2.3 in /usr/local/lib/python3.6/dist-packages (from osmnx) (2.3)\n", + "Requirement already satisfied: Rtree>=0.8.3 in /usr/local/lib/python3.6/dist-packages (from osmnx) (0.8.3)\n", + "Requirement already satisfied: numpy>=1.16 in /usr/local/lib/python3.6/dist-packages (from osmnx) (1.16.4)\n", + "Requirement already satisfied: descartes>=1.1 in /usr/local/lib/python3.6/dist-packages (from osmnx) (1.1.0)\n", + "Requirement already satisfied: requests>=2.21 in /usr/local/lib/python3.6/dist-packages (from osmnx) (2.21.0)\n", + "Requirement already satisfied: Shapely>=1.6 in /usr/local/lib/python3.6/dist-packages (from osmnx) (1.6.4.post2)\n", + "Requirement already satisfied: matplotlib>=2.2 in /usr/local/lib/python3.6/dist-packages (from osmnx) (3.0.3)\n", + "Requirement already satisfied: pyproj in /usr/local/lib/python3.6/dist-packages (from geopandas>=0.5->osmnx) (2.2.1)\n", + "Requirement already satisfied: fiona in /usr/local/lib/python3.6/dist-packages (from geopandas>=0.5->osmnx) (1.8.6)\n", + "Requirement already satisfied: python-dateutil>=2.5.0 in /usr/local/lib/python3.6/dist-packages (from pandas>=0.24->osmnx) (2.5.3)\n", + "Requirement already satisfied: pytz>=2011k in /usr/local/lib/python3.6/dist-packages (from pandas>=0.24->osmnx) (2018.9)\n", + "Requirement already satisfied: decorator>=4.3.0 in /usr/local/lib/python3.6/dist-packages (from networkx>=2.3->osmnx) (4.4.0)\n", + "Requirement already satisfied: setuptools in /usr/local/lib/python3.6/dist-packages (from Rtree>=0.8.3->osmnx) (41.0.1)\n", + "Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests>=2.21->osmnx) (3.0.4)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests>=2.21->osmnx) (2019.6.16)\n", + "Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.6/dist-packages (from requests>=2.21->osmnx) (2.8)\n", + "Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests>=2.21->osmnx) (1.24.3)\n", + "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib>=2.2->osmnx) (1.1.0)\n", + "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.6/dist-packages (from matplotlib>=2.2->osmnx) (0.10.0)\n", + "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib>=2.2->osmnx) (2.4.2)\n", + "Requirement already satisfied: click<8,>=4.0 in /usr/local/lib/python3.6/dist-packages (from fiona->geopandas>=0.5->osmnx) (7.0)\n", + "Requirement already satisfied: munch in /usr/local/lib/python3.6/dist-packages (from fiona->geopandas>=0.5->osmnx) (2.3.2)\n", + "Requirement already satisfied: cligj>=0.5 in /usr/local/lib/python3.6/dist-packages (from fiona->geopandas>=0.5->osmnx) (0.5.0)\n", + "Requirement already satisfied: six>=1.7 in /usr/local/lib/python3.6/dist-packages (from fiona->geopandas>=0.5->osmnx) (1.12.0)\n", + "Requirement already satisfied: click-plugins>=1.0 in /usr/local/lib/python3.6/dist-packages (from fiona->geopandas>=0.5->osmnx) (1.1.1)\n", + "Requirement already satisfied: attrs>=17 in /usr/local/lib/python3.6/dist-packages (from fiona->geopandas>=0.5->osmnx) (19.1.0)\n", + "Reading package lists... Done\n", + "Building dependency tree \n", + "Reading state information... Done\n", + "proj-data is already the newest version (4.9.3-2).\n", + "proj-data set to manually installed.\n", + "The following package was automatically installed and is no longer required:\n", + " libnvidia-common-410\n", + "Use 'apt autoremove' to remove it.\n", + "The following NEW packages will be installed:\n", + " libproj-dev proj-bin\n", + "0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.\n", + "Need to get 232 kB of archives.\n", + "After this operation, 1,220 kB of additional disk space will be used.\n", + "Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libproj-dev amd64 4.9.3-2 [199 kB]\n", + "Get:2 http://archive.ubuntu.com/ubuntu bionic/universe amd64 proj-bin amd64 4.9.3-2 [32.3 kB]\n", + "Fetched 232 kB in 1s (233 kB/s)\n", + "Selecting previously unselected package libproj-dev:amd64.\n", + "(Reading database ... 131342 files and directories currently installed.)\n", + "Preparing to unpack .../libproj-dev_4.9.3-2_amd64.deb ...\n", + "Unpacking libproj-dev:amd64 (4.9.3-2) ...\n", + "Selecting previously unselected package proj-bin.\n", + "Preparing to unpack .../proj-bin_4.9.3-2_amd64.deb ...\n", + "Unpacking proj-bin (4.9.3-2) ...\n", + "Setting up libproj-dev:amd64 (4.9.3-2) ...\n", + "Setting up proj-bin (4.9.3-2) ...\n", + "Processing triggers for man-db (2.8.3-2ubuntu0.1) ...\n", + "Reading package lists... Done\n", + "Building dependency tree \n", + "Reading state information... Done\n", + "The following package was automatically installed and is no longer required:\n", + " libnvidia-common-410\n", + "Use 'apt autoremove' to remove it.\n", + "Suggested packages:\n", + " libgdal-doc\n", + "The following NEW packages will be installed:\n", + " libgeos-dev\n", + "0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.\n", + "Need to get 73.1 kB of archives.\n", + "After this operation, 486 kB of additional disk space will be used.\n", + "Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libgeos-dev amd64 3.6.2-1build2 [73.1 kB]\n", + "Fetched 73.1 kB in 1s (113 kB/s)\n", + "Selecting previously unselected package libgeos-dev.\n", + "(Reading database ... 131375 files and directories currently installed.)\n", + "Preparing to unpack .../libgeos-dev_3.6.2-1build2_amd64.deb ...\n", + "Unpacking libgeos-dev (3.6.2-1build2) ...\n", + "Setting up libgeos-dev (3.6.2-1build2) ...\n", + "Processing triggers for man-db (2.8.3-2ubuntu0.1) ...\n", + "Requirement already satisfied: cython in /usr/local/lib/python3.6/dist-packages (0.29.13)\n", + "Collecting cartopy\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/e5/92/fe8838fa8158931906dfc4f16c5c1436b3dd2daf83592645b179581403ad/Cartopy-0.17.0.tar.gz (8.9MB)\n", + "\u001b[K |████████████████████████████████| 8.9MB 4.8MB/s \n", + "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", + " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", + " Preparing wheel metadata ... \u001b[?25l\u001b[?25hdone\n", + "Requirement already satisfied: six>=1.3.0 in /usr/local/lib/python3.6/dist-packages (from cartopy) (1.12.0)\n", + "Requirement already satisfied: setuptools>=0.7.2 in /usr/local/lib/python3.6/dist-packages (from cartopy) (41.0.1)\n", + "Requirement already satisfied: numpy>=1.10 in /usr/local/lib/python3.6/dist-packages (from cartopy) (1.16.4)\n", + "Collecting pyshp>=1.1.4 (from cartopy)\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/27/16/3bf15aa864fb77845fab8007eda22c2bd67bd6c1fd13496df452c8c43621/pyshp-2.1.0.tar.gz (215kB)\n", + "\u001b[K |████████████████████████████████| 225kB 41.6MB/s \n", + "\u001b[?25hRequirement already satisfied: shapely>=1.5.6 in /usr/local/lib/python3.6/dist-packages (from cartopy) (1.6.4.post2)\n", + "Building wheels for collected packages: cartopy\n", + " Building wheel for cartopy (PEP 517) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for cartopy: filename=Cartopy-0.17.0-cp36-cp36m-linux_x86_64.whl size=9714126 sha256=fc7d56c27bc739218c4553004c6e6ec6048286c2af0328837186179ef15fabea\n", + " Stored in directory: /root/.cache/pip/wheels/cd/cf/40/539f798f94e921e94fd376a5f9d213a6febe77754c0b187c73\n", + "Successfully built cartopy\n", + "Building wheels for collected packages: pyshp\n", + " Building wheel for pyshp (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for pyshp: filename=pyshp-2.1.0-cp36-none-any.whl size=32608 sha256=209ccd812337bfc809a6f87f14cb3e7744ae6ada90e528bb78d62283ebfa0f34\n", + " Stored in directory: /root/.cache/pip/wheels/a6/0c/de/321b5192ad416b328975a2f0385f72c64db4656501eba7cc1a\n", + "Successfully built pyshp\n", + "Installing collected packages: pyshp, cartopy\n", + "Successfully installed cartopy-0.17.0 pyshp-2.1.0\n", + "Collecting contextily==1.0rc1\n", + " Downloading https://files.pythonhosted.org/packages/1c/1c/534e6000b49003d0dc5261298e46853e405d5e27bae8232d1f3d4745b3de/contextily-1.0rc1-py3-none-any.whl\n", + "Requirement already satisfied: pillow in /usr/local/lib/python3.6/dist-packages (from contextily==1.0rc1) (4.3.0)\n", + "Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages (from contextily==1.0rc1) (2.21.0)\n", + "Requirement already satisfied: pandas in /usr/local/lib/python3.6/dist-packages (from contextily==1.0rc1) (0.24.2)\n", + "Collecting mercantile (from contextily==1.0rc1)\n", + " Downloading https://files.pythonhosted.org/packages/f8/d4/f79431df2ea725206e845d06980a2eb7f4264aa6a7cc749647dd6233d6fa/mercantile-1.1.1-py3-none-any.whl\n", + "Requirement already satisfied: rasterio in /usr/local/lib/python3.6/dist-packages (from contextily==1.0rc1) (1.0.24)\n", + "Requirement already satisfied: pytest in /usr/local/lib/python3.6/dist-packages (from contextily==1.0rc1) (3.6.4)\n", + "Requirement already satisfied: geopy in /usr/local/lib/python3.6/dist-packages (from contextily==1.0rc1) (1.17.0)\n", + "Requirement already satisfied: cartopy in /usr/local/lib/python3.6/dist-packages (from contextily==1.0rc1) (0.17.0)\n", + "Requirement already satisfied: olefile in /usr/local/lib/python3.6/dist-packages (from pillow->contextily==1.0rc1) (0.46)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests->contextily==1.0rc1) (2019.6.16)\n", + "Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests->contextily==1.0rc1) (3.0.4)\n", + "Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.6/dist-packages (from requests->contextily==1.0rc1) (2.8)\n", + "Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests->contextily==1.0rc1) (1.24.3)\n", + "Requirement already satisfied: python-dateutil>=2.5.0 in /usr/local/lib/python3.6/dist-packages (from pandas->contextily==1.0rc1) (2.5.3)\n", + "Requirement already satisfied: pytz>=2011k in /usr/local/lib/python3.6/dist-packages (from pandas->contextily==1.0rc1) (2018.9)\n", + "Requirement already satisfied: numpy>=1.12.0 in /usr/local/lib/python3.6/dist-packages (from pandas->contextily==1.0rc1) (1.16.4)\n", + "Requirement already satisfied: click>=3.0 in /usr/local/lib/python3.6/dist-packages (from mercantile->contextily==1.0rc1) (7.0)\n", + "Requirement already satisfied: cligj>=0.5 in /usr/local/lib/python3.6/dist-packages (from rasterio->contextily==1.0rc1) (0.5.0)\n", + "Requirement already satisfied: snuggs>=1.4.1 in /usr/local/lib/python3.6/dist-packages (from rasterio->contextily==1.0rc1) (1.4.6)\n", + "Requirement already satisfied: affine in /usr/local/lib/python3.6/dist-packages (from rasterio->contextily==1.0rc1) (2.2.2)\n", + "Requirement already satisfied: click-plugins in /usr/local/lib/python3.6/dist-packages (from rasterio->contextily==1.0rc1) (1.1.1)\n", + "Requirement already satisfied: attrs in /usr/local/lib/python3.6/dist-packages (from rasterio->contextily==1.0rc1) (19.1.0)\n", + "Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python3.6/dist-packages (from pytest->contextily==1.0rc1) (1.12.0)\n", + "Requirement already satisfied: atomicwrites>=1.0 in /usr/local/lib/python3.6/dist-packages (from pytest->contextily==1.0rc1) (1.3.0)\n", + "Requirement already satisfied: pluggy<0.8,>=0.5 in /usr/local/lib/python3.6/dist-packages (from pytest->contextily==1.0rc1) (0.7.1)\n", + "Requirement already satisfied: more-itertools>=4.0.0 in /usr/local/lib/python3.6/dist-packages (from pytest->contextily==1.0rc1) (7.2.0)\n", + "Requirement already satisfied: py>=1.5.0 in /usr/local/lib/python3.6/dist-packages (from pytest->contextily==1.0rc1) (1.8.0)\n", + "Requirement already satisfied: setuptools in /usr/local/lib/python3.6/dist-packages (from pytest->contextily==1.0rc1) (41.0.1)\n", + "Requirement already satisfied: geographiclib<2,>=1.49 in /usr/local/lib/python3.6/dist-packages (from geopy->contextily==1.0rc1) (1.49)\n", + "Requirement already satisfied: shapely>=1.5.6 in /usr/local/lib/python3.6/dist-packages (from cartopy->contextily==1.0rc1) (1.6.4.post2)\n", + "Requirement already satisfied: pyshp>=1.1.4 in /usr/local/lib/python3.6/dist-packages (from cartopy->contextily==1.0rc1) (2.1.0)\n", + "Requirement already satisfied: pyparsing>=2.1.6 in /usr/local/lib/python3.6/dist-packages (from snuggs>=1.4.1->rasterio->contextily==1.0rc1) (2.4.2)\n", + "Installing collected packages: mercantile, contextily\n", + "Successfully installed contextily-1.0rc1 mercantile-1.1.1\n", + "Go to this URL in a browser: https://accounts.google.com/o/oauth2/auth?client_id=947318989803-6bn6qk8qdgf4n4g3pfee6491hc0brc4i.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdocs.test%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive.photos.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fpeopleapi.readonly&response_type=code\n", + "\n", + "Enter your authorization code:\n", + "··········\n", + "Mounted at /content/drive\n", "/content/drive/My Drive/BWSI-Remote-Sensing/Final_exercise/game2\n" ], "name": "stdout" @@ -138,12 +365,13 @@ " add_supply.loc[idx, 'type']='power_plant'\n", " add_supply.loc[idx, 'food_water']=0\n", " add_supply.loc[idx, 'medicine']=0\n", - " add_supply.loc[idx, 'fuel']=300\n", + " add_supply.loc[idx, 'fuel']=1200\n", + " #add_supply.loc[idx, 'fuel']=300\n", " add_supply.loc[idx, 'objectid']=idx\n", "def unpack_airfields(locations):\n", " global add_supply\n", " for i,idx in enumerate(locations):\n", - " add_supply.loc[idx, 'type']='airfield'\n", + " add_supply.loc[idx, 'type']='airport'\n", " add_supply.loc[idx, 'food_water']=0\n", " add_supply.loc[idx, 'medicine']=0\n", " add_supply.loc[idx, 'fuel']=90\n", @@ -159,7 +387,7 @@ "def unpack_large_hospitals(locations):\n", " global add_supply\n", " for i,idx in enumerate(locations):\n", - " add_supply.loc[idx, 'type']='large_hospital'\n", + " add_supply.loc[idx, 'type']='hospital_l'\n", " add_supply.loc[idx, 'food_water']=300\n", " add_supply.loc[idx, 'medicine']=300\n", " add_supply.loc[idx, 'fuel']=0\n", @@ -167,7 +395,7 @@ "def unpack_small_hospitals(locations):\n", " global add_supply\n", " for i,idx in enumerate(locations):\n", - " add_supply.loc[idx, 'type']='small_hospital'\n", + " add_supply.loc[idx, 'type']='hospital_s'\n", " add_supply.loc[idx, 'food_water']=150\n", " add_supply.loc[idx, 'medicine']=150\n", " add_supply.loc[idx, 'fuel']=0\n", @@ -185,7 +413,7 @@ " global add_supply\n", " for i,idx in enumerate(locations):\n", " #filew.writerow([idx,'airfield',0,0,300])\n", - " add_supply.loc[idx, 'type']='shelter'\n", + " add_supply.loc[idx, 'type']='cell_tower'\n", " add_supply.loc[idx, 'food_water']=0\n", " add_supply.loc[idx, 'medicine']=0\n", " add_supply.loc[idx, 'fuel']=0\n", @@ -264,7 +492,7 @@ " print('Enter destination ids (object id or id), singular or list form [x y z]:')\n", " dests = input()\n", " if dests[0] == '[':\n", - " ids = dests[1:-1].split(' ')\n", + " ids = dests[1:-1].split(',')\n", " else:\n", " ids = [int(dests)]\n", " print('Destination ids: ', ids)\n", @@ -337,23 +565,19 @@ " print('Enter the first asset id')\n", " id1 = int(input())\n", " idt = id1\n", - " ids = []\n", - " desttypes = []\n", + " print(\"What is the asset type?\")\n", + " typ = input()\n", + " print(\"How many assets do you want?\")\n", + " cnt = int(input())\n", + " print(\"Put a list of coordinates of the asset, as in [x1,y1,x2,y2...]\")\n", + " coords = input().replace('[', '').replace(']', '')\n", " geometries = []\n", - " while True:\n", - " ids.append(idt)\n", - " idt+=1\n", - " print('Enter the type')\n", - " desttypes.append(input())\n", - " print('Enter the x-coordinate')\n", - " x = float(input())\n", - " print('Enter the y-coordinate')\n", - " y = float(input())\n", - " pt = Point(x, y)\n", - " geometries.append(pt)\n", - " print(\"Continue? (y/n)\")\n", - " res = input()\n", - " if res == 'n': break\n", + " coords = coords.split(',')\n", + " for i in range(0, len(coords), 2):\n", + " geometries.append(Point(float(coords[i]), float(coords[i+1])))\n", + " ids = [id1+i for i in range(cnt)]\n", + " desttypes = [typ for i in range(cnt)]\n", + "\n", "\n", " print('ind,id,type,geometry')\n", " for i in list(zip(range(len(ids)),ids,desttypes,geometries)):\n", @@ -385,7 +609,8 @@ "colab": {} }, "source": [ - "reset_supply()" + "reset_supply()\n", + "reset_deploy()" ], "execution_count": 0, "outputs": [] @@ -394,46 +619,53 @@ "cell_type": "code", "metadata": { "colab_type": "code", - "outputId": "3525478f-c240-4551-97c7-d9ca0b0a75e3", + "outputId": "4ddb411d-e930-42bb-de13-60a2ff481b81", "id": "RmUa-N2VCVQf", "colab": { "base_uri": "https://localhost:8080/", - "height": 435 + "height": 625 } }, "source": [ "main()" ], - "execution_count": 147, + "execution_count": 0, "outputs": [ { "output_type": "stream", "text": [ "Welcome. Assets or Resources (a/r)?\n", - "a\n", - "Enter the first asset id\n", - "68596825\n", - "Enter the type\n", - "generator\n", - "Enter the x-coordinate\n", - "6364\n", - "Enter the y-coordinate\n", - "534\n", - "Continue? (y/n)\n", - "y\n", - "Enter the type\n", - "generator\n", - "Enter the x-coordinate\n", - "636\n", - "Enter the y-coordinate\n", - "4\n", - "Continue? (y/n)\n", - "n\n", - "ind,id,type,geometry\n", - "(0, 68596825, 'generator') POINT (6364 534)\n", - "(1, 68596826, 'generator') POINT (636 4)\n" + "r\n", + "Enter destination ids (object id or id), singular or list form [x y z]:\n", + "[338.0, 564.0, 397.0, 233.0, 642.0, 466.0, 21.0, 481.0, 512.0, 546.0]\n", + "Destination ids: ['338.0', ' 564.0', ' 397.0', ' 233.0', ' 642.0', ' 466.0', ' 21.0', ' 481.0', ' 512.0', ' 546.0']\n", + "What type is each destination?\n", + "338.0: power_plant\n", + " 564.0: power_plant\n", + " 397.0: power_plant\n", + " 233.0: power_plant\n", + " 642.0: power_plant\n", + " 466.0: power_plant\n", + " 21.0: power_plant\n", + " 481.0: power_plant\n", + " 512.0: power_plant\n", + " 546.0: power_plant\n", + "How much food/water?\n", + "338.0 power_plant: power_plant\n" ], "name": "stdout" + }, + { + "output_type": "error", + "ename": "ValueError", + "evalue": "ignored", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mmain\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;32m\u001b[0m in \u001b[0;36mmain\u001b[0;34m()\u001b[0m\n\u001b[1;32m 19\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0midx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0menumerate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mids\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 20\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m' '\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mdesttypes\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0midx\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m':'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0msep\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m''\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mend\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m' '\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 21\u001b[0;31m \u001b[0mfoodwater\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minput\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 22\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'How much medicine?'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 23\u001b[0m \u001b[0mmedicine\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mValueError\u001b[0m: invalid literal for int() with base 10: 'power_plant'" + ] } ] }, @@ -442,16 +674,16 @@ "metadata": { "id": "UZDWj6T5sp6R", "colab_type": "code", + "outputId": "e2a0d1cc-fdad-4ea1-aaba-34532d2f0b16", "colab": { "base_uri": "https://localhost:8080/", "height": 206 - }, - "outputId": "e2a0d1cc-fdad-4ea1-aaba-34532d2f0b16" + } }, "source": [ "deploy_asset" ], - "execution_count": 148, + "execution_count": 0, "outputs": [ { "output_type": "execute_result", @@ -568,6 +800,33 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "code", + "metadata": { + "id": "whTJyii43C2H", + "colab_type": "code", + "colab": {} + }, + "source": [ + "reset_supply()" + ], + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "-Zu9NCfP3EIc", + "colab_type": "code", + "colab": {} + }, + "source": [ + "unpack_powerplants([338.0, 564.0, 397.0, 233.0, 642.0, 466.0, 21.0, 481.0, 512.0, 546.0,486.0, 658.0, 459.0, 460.0, 577.0, 180.0, 59.0, 39.0, 219.0, 526.0,468.0, 337.0, 550.0, 371.0, 410.0, 92.0, 453.0, 401.0]) \n", + "#RESPONSE TURN 0" + ], + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "metadata": { @@ -576,7 +835,7 @@ "colab": {} }, "source": [ - "unpack_airfields([7519, 7661, 7690, 7650, 7695])" + "unpack_airfields([7519, 7661, 7690, 7650, 7695,])" ], "execution_count": 0, "outputs": [] @@ -599,16 +858,16 @@ "metadata": { "id": "xCXGoaG4uVip", "colab_type": "code", - "outputId": "4b7c8a24-591a-413b-c052-9140a8235546", + "outputId": "31843a01-5c54-41d3-e452-84a1dcc70ca8", "colab": { "base_uri": "https://localhost:8080/", - "height": 833 + "height": 927 } }, "source": [ "add_supply #check order" ], - "execution_count": 51, + "execution_count": 20, "outputs": [ { "output_type": "execute_result", @@ -642,241 +901,268 @@ " \n", " \n", " 338.0\n", - " 338.0\n", + " 338\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 564.0\n", - " 564.0\n", + " 564\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 397.0\n", - " 397.0\n", + " 397\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 233.0\n", - " 233.0\n", + " 233\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 642.0\n", - " 642.0\n", + " 642\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 466.0\n", - " 466.0\n", + " 466\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 21.0\n", - " 21.0\n", + " 21\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 481.0\n", - " 481.0\n", + " 481\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 512.0\n", - " 512.0\n", + " 512\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 546.0\n", - " 546.0\n", + " 546\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 486.0\n", - " 486.0\n", + " 486\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 658.0\n", - " 658.0\n", + " 658\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 459.0\n", - " 459.0\n", + " 459\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 460.0\n", - " 460.0\n", + " 460\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 577.0\n", - " 577.0\n", + " 577\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 180.0\n", - " 180.0\n", + " 180\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 59.0\n", - " 59.0\n", + " 59\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 39.0\n", - " 39.0\n", + " 39\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 219.0\n", - " 219.0\n", + " 219\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", " \n", " \n", " 526.0\n", - " 526.0\n", + " 526\n", " power_plant\n", " 0\n", " 0\n", - " 300\n", + " 1200\n", + " \n", + " \n", + " 468.0\n", + " 468\n", + " power_plant\n", + " 0\n", + " 0\n", + " 1200\n", + " \n", + " \n", + " 337.0\n", + " 337\n", + " power_plant\n", + " 0\n", + " 0\n", + " 1200\n", " \n", " \n", - " 7519.0\n", - " 7519.0\n", - " airfield\n", + " 550.0\n", + " 550\n", + " power_plant\n", " 0\n", " 0\n", - " 90\n", + " 1200\n", " \n", " \n", - " 7661.0\n", - " 7661.0\n", - " airfield\n", + " 371.0\n", + " 371\n", + " power_plant\n", " 0\n", " 0\n", - " 90\n", + " 1200\n", " \n", " \n", - " 7690.0\n", - " 7690.0\n", - " airfield\n", + " 410.0\n", + " 410\n", + " power_plant\n", " 0\n", " 0\n", - " 90\n", + " 1200\n", " \n", " \n", - " 7650.0\n", - " 7650.0\n", - " airfield\n", + " 92.0\n", + " 92\n", + " power_plant\n", " 0\n", " 0\n", - " 90\n", + " 1200\n", " \n", " \n", - " 7695.0\n", - " 7695.0\n", - " airfield\n", - " 150000\n", - " 150000\n", - " 37590\n", + " 453.0\n", + " 453\n", + " power_plant\n", + " 0\n", + " 0\n", + " 1200\n", + " \n", + " \n", + " 401.0\n", + " 401\n", + " power_plant\n", + " 0\n", + " 0\n", + " 1200\n", " \n", " \n", "\n", "" ], "text/plain": [ - " objectid type food_water medicine fuel\n", - "338.0 338.0 power_plant 0 0 300\n", - "564.0 564.0 power_plant 0 0 300\n", - "397.0 397.0 power_plant 0 0 300\n", - "233.0 233.0 power_plant 0 0 300\n", - "642.0 642.0 power_plant 0 0 300\n", - "466.0 466.0 power_plant 0 0 300\n", - "21.0 21.0 power_plant 0 0 300\n", - "481.0 481.0 power_plant 0 0 300\n", - "512.0 512.0 power_plant 0 0 300\n", - "546.0 546.0 power_plant 0 0 300\n", - "486.0 486.0 power_plant 0 0 300\n", - "658.0 658.0 power_plant 0 0 300\n", - "459.0 459.0 power_plant 0 0 300\n", - "460.0 460.0 power_plant 0 0 300\n", - "577.0 577.0 power_plant 0 0 300\n", - "180.0 180.0 power_plant 0 0 300\n", - "59.0 59.0 power_plant 0 0 300\n", - "39.0 39.0 power_plant 0 0 300\n", - "219.0 219.0 power_plant 0 0 300\n", - "526.0 526.0 power_plant 0 0 300\n", - "7519.0 7519.0 airfield 0 0 90\n", - "7661.0 7661.0 airfield 0 0 90\n", - "7690.0 7690.0 airfield 0 0 90\n", - "7650.0 7650.0 airfield 0 0 90\n", - "7695.0 7695.0 airfield 150000 150000 37590" + " objectid type food_water medicine fuel\n", + "338.0 338 power_plant 0 0 1200\n", + "564.0 564 power_plant 0 0 1200\n", + "397.0 397 power_plant 0 0 1200\n", + "233.0 233 power_plant 0 0 1200\n", + "642.0 642 power_plant 0 0 1200\n", + "466.0 466 power_plant 0 0 1200\n", + "21.0 21 power_plant 0 0 1200\n", + "481.0 481 power_plant 0 0 1200\n", + "512.0 512 power_plant 0 0 1200\n", + "546.0 546 power_plant 0 0 1200\n", + "486.0 486 power_plant 0 0 1200\n", + "658.0 658 power_plant 0 0 1200\n", + "459.0 459 power_plant 0 0 1200\n", + "460.0 460 power_plant 0 0 1200\n", + "577.0 577 power_plant 0 0 1200\n", + "180.0 180 power_plant 0 0 1200\n", + "59.0 59 power_plant 0 0 1200\n", + "39.0 39 power_plant 0 0 1200\n", + "219.0 219 power_plant 0 0 1200\n", + "526.0 526 power_plant 0 0 1200\n", + "468.0 468 power_plant 0 0 1200\n", + "337.0 337 power_plant 0 0 1200\n", + "550.0 550 power_plant 0 0 1200\n", + "371.0 371 power_plant 0 0 1200\n", + "410.0 410 power_plant 0 0 1200\n", + "92.0 92 power_plant 0 0 1200\n", + "453.0 453 power_plant 0 0 1200\n", + "401.0 401 power_plant 0 0 1200" ] }, "metadata": { "tags": [] }, - "execution_count": 51 + "execution_count": 20 } ] }, @@ -914,7 +1200,7 @@ "colab": {} }, "source": [ - "unpack_powerplants([468.0, 543.0, 653.0, 519.0, 79.0, 183.0, 661.0, 505.0, 337.0, 550.0, 371.0, 410.0, 92.0, 453.0, 401.0, 457.0, 83.0, 583.0,310.0, 100.0])" + "unpack_powerplants([468.0, 337.0, 550.0, 371.0, 410.0, 92.0, 453.0, 401.0, 457.0, 83.0, 583.0,310.0, 100.0])" ], "execution_count": 0, "outputs": [] @@ -924,16 +1210,16 @@ "metadata": { "id": "mEHCGFEb2LDv", "colab_type": "code", + "outputId": "aa7d3a79-edf0-4f5b-9fa5-ba4fd142af2d", "colab": { "base_uri": "https://localhost:8080/", - "height": 677 - }, - "outputId": "72d503af-db1d-40ce-c56d-792832ea7392" + "height": 300 + } }, "source": [ "add_supply" ], - "execution_count": 58, + "execution_count": 0, "outputs": [ { "output_type": "execute_result", @@ -974,62 +1260,6 @@ " 300\n", " \n", " \n", - " 543.0\n", - " 543\n", - " power_plant\n", - " 0\n", - " 0\n", - " 300\n", - " \n", - " \n", - " 653.0\n", - " 653\n", - " power_plant\n", - " 0\n", - " 0\n", - " 300\n", - " \n", - " \n", - " 519.0\n", - " 519\n", - " power_plant\n", - " 0\n", - " 0\n", - " 300\n", - " \n", - " \n", - " 79.0\n", - " 79\n", - " power_plant\n", - " 0\n", - " 0\n", - " 300\n", - " \n", - " \n", - " 183.0\n", - " 183\n", - " power_plant\n", - " 0\n", - " 0\n", - " 300\n", - " \n", - " \n", - " 661.0\n", - " 661\n", - " power_plant\n", - " 0\n", - " 0\n", - " 300\n", - " \n", - " \n", - " 505.0\n", - " 505\n", - " power_plant\n", - " 0\n", - " 0\n", - " 300\n", - " \n", - " \n", " 337.0\n", " 337\n", " power_plant\n", @@ -1085,46 +1315,6 @@ " 0\n", " 300\n", " \n", - " \n", - " 457.0\n", - " 457\n", - " power_plant\n", - " 0\n", - " 0\n", - " 300\n", - " \n", - " \n", - " 83.0\n", - " 83\n", - " power_plant\n", - " 0\n", - " 0\n", - " 300\n", - " \n", - " \n", - " 583.0\n", - " 583\n", - " power_plant\n", - " 0\n", - " 0\n", - " 300\n", - " \n", - " \n", - " 310.0\n", - " 310\n", - " power_plant\n", - " 0\n", - " 0\n", - " 300\n", - " \n", - " \n", - " 100.0\n", - " 100\n", - " power_plant\n", - " 0\n", - " 0\n", - " 300\n", - " \n", " \n", "\n", "" @@ -1132,49 +1322,51 @@ "text/plain": [ " objectid type food_water medicine fuel\n", "468.0 468 power_plant 0 0 300\n", - "543.0 543 power_plant 0 0 300\n", - "653.0 653 power_plant 0 0 300\n", - "519.0 519 power_plant 0 0 300\n", - "79.0 79 power_plant 0 0 300\n", - "183.0 183 power_plant 0 0 300\n", - "661.0 661 power_plant 0 0 300\n", - "505.0 505 power_plant 0 0 300\n", "337.0 337 power_plant 0 0 300\n", "550.0 550 power_plant 0 0 300\n", "371.0 371 power_plant 0 0 300\n", "410.0 410 power_plant 0 0 300\n", "92.0 92 power_plant 0 0 300\n", "453.0 453 power_plant 0 0 300\n", - "401.0 401 power_plant 0 0 300\n", - "457.0 457 power_plant 0 0 300\n", - "83.0 83 power_plant 0 0 300\n", - "583.0 583 power_plant 0 0 300\n", - "310.0 310 power_plant 0 0 300\n", - "100.0 100 power_plant 0 0 300" + "401.0 401 power_plant 0 0 300" ] }, "metadata": { "tags": [] }, - "execution_count": 58 + "execution_count": 15 } ] }, + { + "cell_type": "code", + "metadata": { + "id": "hNHoyMMd4kYD", + "colab_type": "code", + "colab": {} + }, + "source": [ + "#run for turn 3\n", + "finalize(False)" + ], + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "metadata": { "id": "kE3W63tz2L2G", "colab_type": "code", + "outputId": "5fd9104f-e499-4e69-c9d6-c4c7c88e813b", "colab": { "base_uri": "https://localhost:8080/", "height": 964 - }, - "outputId": "5fd9104f-e499-4e69-c9d6-c4c7c88e813b" + } }, "source": [ "finalize(True)" ], - "execution_count": 59, + "execution_count": 0, "outputs": [ { "output_type": "stream",