{ "info": { "author": "Adrien Pouyet (Ricocotam)", "author_email": "ricocotam@gmail.Com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# SmartCity-simulator\nSmart City Simulator designed for hackathons !\n\n## Package installation\n`pip3 install --user smartcity`\nOn Google Colab\n`!pip3 install smartcity`\n\nPython > 3.6\n\n## Env Instantiation\nIn the package, 3 envs are available :\n\n- SmartCity-v0 : small env\n- SmartCity-v1 : medium env\n- SmartCity-v2 : big env\n\n```python\nimport smartcity\nimport gym\n\nenv = gym.make(\"SmartCity-v0\")\n\nobs, info = env.reset()\n```\n\n## Actions\nTo send action, you have to send a dictionnary instead of the usual vectors. There's 3 keys to send : energies, heaters and lights. Energies defines how much of each type of energy you buy. Lights define whether each light is on or off (a threshold at 0.5 is set). Heaters define the temperature of each heater. To have the size and the type of each parameter, they are available in the `obs` variable. `obs` is a dictionnary you can use to predict your actions. Keys `lights`, `heaters` and `energies_amount` have the exact format requested for actions, you can just copy them.\n\n### Energies\nEnergies are ordered the same way for all the arrays\n\n## Observations and informations\nThere's 5 keys in the obs dictionnary :\n\n- `lights` : numpy array of size #light. Each light is either 0 (off) or 1 (on)\n- `heaters` : numpy array of size #heater. Each heater is defined by its temperature\n- `energies_cost` : cost of each quantity. This cost is defined for each point of each energy\n- `energies_amount` : available amount for energy\n- `needed_energy` : the total amount of energy needed. If you don't send enough energy, an exception is raised. During Hackathon submission, it will be an elimination criteria. If you buy more energy that needed, it is stored indefinitely so you can use it.\n\nThere's 2 keys in `info` dictionnary :\n\n- `light_interraction` : a matrix of shape (#people, #lights). If there's a 1 at `[i, j]`, the citizen `i` is connected to light `light`\n- `heaters_interraction` : same as lights but for heaters\n- `energy_pollution` : pollution factor for each type of enegy (carbon, nuclear, renewable)\n\n## Example\n\n```python\nimport smartcity\nimport gym\nimport random\n\nenv = gym.make(\"SmartCity-v0\")\n\nobs, info = env.reset()\n\nenergies = [0.8*obs[\"needed_energy\"], 0.15*obs[\"needed_energy\"], 0.1*obs[\"needed_energy\"]]\n\nlights = np.array([random.random() for _ in range(obs[\"lights\"].shape[0])])\nheaters = obs[\"heaters\"] + 2\n\nactions = {\"energies\": energies, \"heaters\": heaters, \"lights\": lights}\n\nobs, score, done, info = env.step(actions)\n```\n\n## Evaluation\nWe'll give you a seed and a json file dubbed `setting.json` and a seed.\n\n```py\nimport smartcity\nimport gym\n\nseed = # given seed\nenv = gym.make(\"SmartCity-v0\")\nenv.change_settings(\"path/to/setting.json\")\nenv.seed(seed)\n\nobs, info = env.reset()\n# Learning\n# your code here\n\n# Evaluation\nenv.seed(seed)\nobs, info = env.reset()\n\nwith open(\"groupe_name.sub\", \"w\") as f:\n for i in range(100):\n actions = # prediction de votre mod\u00e8le\n obs, score, done, info = env.step(actions)\n f.write(f\"{actions}\\n\")\n\n```\nPour ceux qui sont dans colab, copiez collez le contenu du fichier json dans une variable dans une cellule puis sauvegarder l\u00e0 comme suit :\n\n```py\nimport json\ncontent = # copy paste subission.json\nwith open(\"submission.json\", \"w\") as f:\n json.dump(content, f)\n\nimport smartcity\nimport gym\n\nseed = # given seed\nenv = gym.make(\"SmartCity-v0\")\nenv.change_settings(\"submission.json\")\nenv.seed(seed)\n```\n\nSEED = 1337", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Ricocotam/SmartCity-simulator", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "smartcity", "package_url": "https://pypi.org/project/smartcity/", "platform": "", "project_url": "https://pypi.org/project/smartcity/", "project_urls": { "Homepage": "https://github.com/Ricocotam/SmartCity-simulator" }, "release_url": "https://pypi.org/project/smartcity/1.1.2/", "requires_dist": null, "requires_python": ">=3.6", "summary": "A Smart City Env designed for Reinforcement Learning", "version": "1.1.2" }, "last_serial": 6002334, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "abf22e3e46c8ea990a0a73b7e0d04d79", "sha256": "ce5b50a181eb34bff0e80d9b0c6f6676f4e3097b87bbf54084ca9bd7fbeef60e" }, "downloads": -1, "filename": "smartcity-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "abf22e3e46c8ea990a0a73b7e0d04d79", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 20645, "upload_time": "2019-10-18T19:46:40", "url": "https://files.pythonhosted.org/packages/3e/ef/96fe118b508320697cc67d2908eaebb4cd28fbd6119f9eb63d71e52602dd/smartcity-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6ec92dfec66b04b6bb145f95dc550d50", "sha256": "ed1cb248b90cd28e5bd89306bf33bae54b37cd258cfbf33d53578c89f1837bca" }, "downloads": -1, "filename": "smartcity-0.0.1.tar.gz", "has_sig": false, "md5_digest": "6ec92dfec66b04b6bb145f95dc550d50", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 5455, "upload_time": "2019-10-18T19:46:43", "url": "https://files.pythonhosted.org/packages/d1/9a/b9e3c77430f60dcc20d5e27f429cc1dc751476d92f273261e1aca36283e0/smartcity-0.0.1.tar.gz" } ], "0.2.13": [ { "comment_text": "", "digests": { "md5": "d29e59f7c1f18465249a52a50142e443", "sha256": "9d85fdffa304c7c3979b8e7325c29934f9879b174bf41aebf70d8a28ce248401" }, "downloads": -1, "filename": "smartcity-0.2.13-py3-none-any.whl", "has_sig": false, "md5_digest": "d29e59f7c1f18465249a52a50142e443", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 28939, "upload_time": "2019-10-18T23:12:19", "url": "https://files.pythonhosted.org/packages/7c/61/e50a5f48cc05434a6e506504fa68544632d339428f3503a9e9b4f93dd7b5/smartcity-0.2.13-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fb500155d532a5552d18805d2bd6240b", "sha256": "dc34c4e7d73166ca49eca5f2d9c91945618a154c602e1aee3c63776518d9d520" }, "downloads": -1, "filename": "smartcity-0.2.13.tar.gz", "has_sig": false, "md5_digest": "fb500155d532a5552d18805d2bd6240b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 6446, "upload_time": "2019-10-18T23:12:21", "url": "https://files.pythonhosted.org/packages/6d/1c/51b8378d491969777b3e54d27cc6ae0c2e461ec4063b24d958f9236570b6/smartcity-0.2.13.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "d6a89a7a75c66d406589b93e6146a210", "sha256": "be42dc490ced8772b68106d0a5d7f375f66e74e2970274f0bf83f59aaca38525" }, "downloads": -1, "filename": "smartcity-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d6a89a7a75c66d406589b93e6146a210", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 28929, "upload_time": "2019-10-18T23:12:52", "url": "https://files.pythonhosted.org/packages/fc/0e/cabfe57c99c9074168aa663d00381af6c53eee0cf002d1dbd34b102b4862/smartcity-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b322d4d1ec55380476be6e1d71e19a07", "sha256": "42277fd9423195f4c143a60b4783717be39a99fa6b5a445b43be55c9c81589e9" }, "downloads": -1, "filename": "smartcity-1.0.0.tar.gz", "has_sig": false, "md5_digest": "b322d4d1ec55380476be6e1d71e19a07", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 6446, "upload_time": "2019-10-18T23:12:54", "url": "https://files.pythonhosted.org/packages/66/af/467a1b870465d8ce28c046db96faece4369b220641e48e2973f210cfe08e/smartcity-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "4ab93ac8d2c9bed2ed56a507d8091ecd", "sha256": "05b9bc80d148132db75e9a3aa90c4c25057059bac60aab233e24f666a819e647" }, "downloads": -1, "filename": "smartcity-1.0.1.tar.gz", "has_sig": false, "md5_digest": "4ab93ac8d2c9bed2ed56a507d8091ecd", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8009, "upload_time": "2019-10-19T10:42:32", "url": "https://files.pythonhosted.org/packages/0a/78/af0d9125900c1f506be253cd7dc568b227972db6d4e30f0242244dbdb33b/smartcity-1.0.1.tar.gz" } ], "1.0.10": [ { "comment_text": "", "digests": { "md5": "3240cb7bb1b48c94bba564a3488b5b88", "sha256": "326c13f9a4b91da35cfbb1eb72d767b331926d64f456163362812e5addd53376" }, "downloads": -1, "filename": "smartcity-1.0.10.tar.gz", "has_sig": false, "md5_digest": "3240cb7bb1b48c94bba564a3488b5b88", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8280, "upload_time": "2019-10-20T06:18:12", "url": "https://files.pythonhosted.org/packages/e1/ae/6324f7c499ec9bf49566a707b4d7d5ada34c583c843b2f4ea39faee2f291/smartcity-1.0.10.tar.gz" } ], "1.0.11": [ { "comment_text": "", "digests": { "md5": "864c737d70f52bb3e5dae5100d734b72", "sha256": "ffa1d15aa4f8d9dc103fe06add1d35843c00558f05a04c8b4ba791783411b9fa" }, "downloads": -1, "filename": "smartcity-1.0.11.tar.gz", "has_sig": false, "md5_digest": "864c737d70f52bb3e5dae5100d734b72", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8299, "upload_time": "2019-10-20T06:25:00", "url": "https://files.pythonhosted.org/packages/75/fb/827da2e01bb137b2e940a3c0bffde997d6d3403b470af6f33fc2caa5c247/smartcity-1.0.11.tar.gz" } ], "1.0.12": [ { "comment_text": "", "digests": { "md5": "d02b03b8caf4f73e4d10a9c9fe8fd965", "sha256": "914acf40dcdbc2efe1cd62c0bb27719225a458bf8f6d3c0bcb8f075457cb6760" }, "downloads": -1, "filename": "smartcity-1.0.12.tar.gz", "has_sig": false, "md5_digest": "d02b03b8caf4f73e4d10a9c9fe8fd965", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8301, "upload_time": "2019-10-20T06:38:15", "url": "https://files.pythonhosted.org/packages/a2/8d/3c5b1b5f184087a651ecf19b9c170c2f5e7a9f9512a090510dddf37cb96a/smartcity-1.0.12.tar.gz" } ], "1.0.13": [ { "comment_text": "", "digests": { "md5": "4646dfc071be53c45435bbbab868edf2", "sha256": "d94c765b72b1cba034096236ec5dae5ce231387f1a75e97f8c00613ee6aebd80" }, "downloads": -1, "filename": "smartcity-1.0.13.tar.gz", "has_sig": false, "md5_digest": "4646dfc071be53c45435bbbab868edf2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8300, "upload_time": "2019-10-20T06:40:27", "url": "https://files.pythonhosted.org/packages/2a/5f/27938f07ce0cbf29d7fdc2ab11582a2a2e9de4e00fd4edb7f95fb42c30bc/smartcity-1.0.13.tar.gz" } ], "1.0.14": [ { "comment_text": "", "digests": { "md5": "5d9c7c6a730d3a7617e2ef1fbbe07b8c", "sha256": "93e6c8dfa03611910eeeb6c44a0d15f20fc5d1b1bb4338390a909666bafd7972" }, "downloads": -1, "filename": "smartcity-1.0.14.tar.gz", "has_sig": false, "md5_digest": "5d9c7c6a730d3a7617e2ef1fbbe07b8c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8303, "upload_time": "2019-10-20T06:42:47", "url": "https://files.pythonhosted.org/packages/ac/8c/74671549ca1dea72520165200e445c1958db911f3be83c02686c6ae8cac7/smartcity-1.0.14.tar.gz" } ], "1.0.15": [ { "comment_text": "", "digests": { "md5": "4d31abfaea847a215acdd8dc48b57d13", "sha256": "9c4573a8e1ffcf5789fdb34db0ef16da3ce61ff06c18d93147e7a8ccb9316f3e" }, "downloads": -1, "filename": "smartcity-1.0.15.tar.gz", "has_sig": false, "md5_digest": "4d31abfaea847a215acdd8dc48b57d13", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8294, "upload_time": "2019-10-20T06:44:08", "url": "https://files.pythonhosted.org/packages/49/c9/794159b1a182cbbdab593bd7f809c2c82976c9790046387c862f64c7a91a/smartcity-1.0.15.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "ca285fc93a88472a498061320a92e16c", "sha256": "582f063872bb626bb99a65b6e3ccf7de35929928f14b5faf397a340f2ed630f7" }, "downloads": -1, "filename": "smartcity-1.0.2.tar.gz", "has_sig": false, "md5_digest": "ca285fc93a88472a498061320a92e16c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8196, "upload_time": "2019-10-19T11:27:40", "url": "https://files.pythonhosted.org/packages/7a/e8/e611da61f5da7f5606271c10a6d118296bcc5741f70fa52d33af7f7f1dd2/smartcity-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "78e8b85921a845136c7686f5a780b310", "sha256": "03b8438c2b157d95aee51fad05c540eb3778205b2f8ace01b226a895ac985fb1" }, "downloads": -1, "filename": "smartcity-1.0.3.tar.gz", "has_sig": false, "md5_digest": "78e8b85921a845136c7686f5a780b310", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8227, "upload_time": "2019-10-19T11:36:10", "url": "https://files.pythonhosted.org/packages/42/16/f36cacc68c3a399cbbee0d109604337208427b2a9481c2a77be66653be91/smartcity-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "93ece094c849c03730353565e6fb7528", "sha256": "cb4788be5a7d39d5e312c198ad318dd290529704183008b4d6ed250f517ff6a4" }, "downloads": -1, "filename": "smartcity-1.0.4.tar.gz", "has_sig": false, "md5_digest": "93ece094c849c03730353565e6fb7528", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8225, "upload_time": "2019-10-19T11:59:29", "url": "https://files.pythonhosted.org/packages/53/ab/4312dd22ea09412ab7e4b5c2cd6aab0736fb891d0b5613c943b50201670d/smartcity-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "c4ef136c2b6df9f88f698d2fc66d87aa", "sha256": "38f47f07586930eec7175d269d77ec4a2036becb34ffbcd6e245daf29e3f8195" }, "downloads": -1, "filename": "smartcity-1.0.5.tar.gz", "has_sig": false, "md5_digest": "c4ef136c2b6df9f88f698d2fc66d87aa", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8235, "upload_time": "2019-10-19T12:03:45", "url": "https://files.pythonhosted.org/packages/02/07/4979442a525004b55b478e2467ba11a25f4fbff93bfe03ce20813def931e/smartcity-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "6cca585361c4923f53ead7ee9fe7a6d9", "sha256": "67c8cafad7fa10fd5c32040ae8b71ae6cc59f755ff6fffb97f24552291d4657a" }, "downloads": -1, "filename": "smartcity-1.0.6.tar.gz", "has_sig": false, "md5_digest": "6cca585361c4923f53ead7ee9fe7a6d9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8278, "upload_time": "2019-10-20T01:57:42", "url": "https://files.pythonhosted.org/packages/c8/9b/c917799ff5b898282b6c791fb9ff506feef165a0e57d59a27e41dd377b93/smartcity-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "95a84531f27fca7d9b48cbe9c2df469f", "sha256": "0773668b1a3490d5ee483a8e99c0fd2a3baee6962d8bd2f558288fb90de558e7" }, "downloads": -1, "filename": "smartcity-1.0.7.tar.gz", "has_sig": false, "md5_digest": "95a84531f27fca7d9b48cbe9c2df469f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8263, "upload_time": "2019-10-20T03:47:53", "url": "https://files.pythonhosted.org/packages/fa/55/13708c4ccae001e33972c6ff1d6e5bbedfebb94c735c8e2867ea41027ceb/smartcity-1.0.7.tar.gz" } ], "1.0.8": [ { "comment_text": "", "digests": { "md5": "2ac33f8e4df064c31c4709248c4e6734", "sha256": "8efbd3c5132f3346a1df2091c615d9ad91fd49385a743d0e8e83a90fb734db96" }, "downloads": -1, "filename": "smartcity-1.0.8.tar.gz", "has_sig": false, "md5_digest": "2ac33f8e4df064c31c4709248c4e6734", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8272, "upload_time": "2019-10-20T06:14:49", "url": "https://files.pythonhosted.org/packages/4b/14/6d5eae4ccf5321268885dff6edcf3a04193add2373b2992d2fdf46f88633/smartcity-1.0.8.tar.gz" } ], "1.0.9": [ { "comment_text": "", "digests": { "md5": "3059f990397b3a7875074606a25b8677", "sha256": "d7bb3b5fc98b96a4a73bb11786cb07be95d407c7e97cebca7f4e2690577229b6" }, "downloads": -1, "filename": "smartcity-1.0.9.tar.gz", "has_sig": false, "md5_digest": "3059f990397b3a7875074606a25b8677", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8280, "upload_time": "2019-10-20T06:17:16", "url": "https://files.pythonhosted.org/packages/12/2f/a5765fceb0a15185155543e3a49d19c6ff0acdc035185c975185e27521b3/smartcity-1.0.9.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "128c321a236108983bfdfa9acf4adfe5", "sha256": "17dc1fc1b81bfe7b9f2c554db2ca0973dc5327c55d5e59e6eacaab40815aa7fd" }, "downloads": -1, "filename": "smartcity-1.1.0.tar.gz", "has_sig": false, "md5_digest": "128c321a236108983bfdfa9acf4adfe5", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 9206, "upload_time": "2019-10-20T08:52:26", "url": "https://files.pythonhosted.org/packages/0f/4e/c091d194e3e49d12e9f9b5e65c0db363dfa063f3e24dab283512885b303e/smartcity-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "6d1cbd958e7560ddf7349d7d1637b96e", "sha256": "1a8244be18150f19d67794307436ac1d5065d883ff75333db0a74ab946e5fbba" }, "downloads": -1, "filename": "smartcity-1.1.1.tar.gz", "has_sig": false, "md5_digest": "6d1cbd958e7560ddf7349d7d1637b96e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 9205, "upload_time": "2019-10-20T08:54:18", "url": "https://files.pythonhosted.org/packages/99/fe/589034ea6d65f96a629b720ece791f2e17c4c13b153e02c96a7f69398cd2/smartcity-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "40c357be5222dfa617b72e8f87675fb9", "sha256": "4b0719f2c85dec564308a023fac23f7f08d45979b79c0a352dc68af8e62897de" }, "downloads": -1, "filename": "smartcity-1.1.2.tar.gz", "has_sig": false, "md5_digest": "40c357be5222dfa617b72e8f87675fb9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 9209, "upload_time": "2019-10-20T08:54:59", "url": "https://files.pythonhosted.org/packages/6a/5e/e14b1155fcfe28c6d3eec5fcf928729a608a14c8d4fc8e3c9c6256c8ea4f/smartcity-1.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "40c357be5222dfa617b72e8f87675fb9", "sha256": "4b0719f2c85dec564308a023fac23f7f08d45979b79c0a352dc68af8e62897de" }, "downloads": -1, "filename": "smartcity-1.1.2.tar.gz", "has_sig": false, "md5_digest": "40c357be5222dfa617b72e8f87675fb9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 9209, "upload_time": "2019-10-20T08:54:59", "url": "https://files.pythonhosted.org/packages/6a/5e/e14b1155fcfe28c6d3eec5fcf928729a608a14c8d4fc8e3c9c6256c8ea4f/smartcity-1.1.2.tar.gz" } ] }