{"id":17334067,"url":"https://github.com/veni-vidi-code/rca","last_synced_at":"2025-03-27T06:45:34.539Z","repository":{"id":229016475,"uuid":"775550929","full_name":"veni-vidi-code/RCA","owner":"veni-vidi-code","description":"The Code for the runtime tests for the Paper \"Rescue Craft Allocation in Tidal Waters of the North and Baltic Sea\"","archived":false,"fork":false,"pushed_at":"2024-03-21T16:14:43.000Z","size":6778,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T12:08:30.785Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/veni-vidi-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-21T15:44:48.000Z","updated_at":"2024-03-21T15:55:30.000Z","dependencies_parsed_at":"2024-03-21T16:55:56.747Z","dependency_job_id":null,"html_url":"https://github.com/veni-vidi-code/RCA","commit_stats":null,"previous_names":["veni-vidi-code/rca"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veni-vidi-code%2FRCA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veni-vidi-code%2FRCA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veni-vidi-code%2FRCA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veni-vidi-code%2FRCA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/veni-vidi-code","download_url":"https://codeload.github.com/veni-vidi-code/RCA/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245798539,"owners_count":20673902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T15:04:41.320Z","updated_at":"2025-03-27T06:45:34.520Z","avatar_url":"https://github.com/veni-vidi-code.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This Repository contains the code used for the runtime study\nof the paper \"Rescue Craft Allocation in Tidal Waters of the North and Baltic Sea\" \nby Tom Mucke, Alexander Renneke, Finn Seesemann and Felix Engelhardt. \nThe aim is to allocate rescue craft to stations in tidal waters, and it uses the DGzRS as an example.\nYou're welcome to use and develop it further as long as you include a citation of our paper as reference. If you have any questions, feel free to contact us via tom.mucke@rwth-aachen.de, finn.seesemann@rwth-aachen.de or engelhardt@combi.rwth-aachen.de.\n\nThe code is written in Python and uses the Gurobi solver.\n\n# Installation\nThis gives a short overview on how to install all the necessary software to run the code in this repository. \nIt is meant for Windows user. \nMac is not recommended as QGIS has some big performance issues on Mac from our experience.\nLinux was not tested, but we suspect that Linux users will be able to adapt the installation process to their system and fix some of the path issues in the code for QGIS.\n\n## Disclaimer\nPlease note that we will install several software packages and libraries. \nThese are not maintained by us and we cannot guarantee that the installation will work on your system.\nWe also cannot guarantee the security of the software packages and libraries or the safety of the installation process.\nPlease ensure that you trust the sources of the software packages and libraries and that you are comfortable with the installation process before proceeding.\nPlease also read the license of each package before using it, and make sure to comply with the license. \nAdditionally remember that this code is also just provided as is and we cannot guarantee anything, please read the license before using the code.\n\n## Copyright\nWhile this code is under the GNU Affero General Public License v3 and the Copyright belong to Tom Mucke and Finn Seesemann, \nthe data provided in data/tidal_points is not our property. The data was provided by the Generaldirektion Wasserstraßen und Schifffahrt (GDWS) \nthrough their website https://www.pegelonline.wsv.de, they own the rights to the data.\n\n\n\n## Installation of required software\n### Git\nWe use Git to manage the code. You can download it from the official website: https://git-scm.com/downloads.\nUsing git you can then clone the repository to your local machine.\n\n\n### QGIS\nWe use QGIS to work with geodata. You can download it from the official website: https://qgis.org/en/site/forusers/download.html.\nWe tested the code with QGIS 3.34.1, if you use a different version, you might need to adjust some of the paths in the code.\nWe strongly recommend not using any of the LTR versions if you are not familiar with QGIS, as they require even more adjustments to the code.\n\n### Python\nWe use Python to run the code. You can download it from the official website: https://www.python.org/downloads/. If not\nspecified otherwise, all of the code needs to be executed from the root of the project to prevent path issues.\n\nThis code was tested with Python 3.11.2. \n\n#### Python Packages\nWe recommend to use a virtual environment to install the necessary packages.\nA guide on venv can be found under https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/.\nThe necessary packages can be installed from the requirements.txt file after activating the virtual environment:\n```\npip install -r requirements.txt\n```\n\n\n### Gurobi\nWe use Gurobi to solve the optimization problem. \nIn the requirements.txt file we already listed the package pyguorbi, which is a wrapper for the Gurobi solver.\nAs the instances are quite large the free pyguorbi license is not sufficient. In order of running these large instances you need to get a license from Gurobi.\n\nThis code was tested with Gurobi 10.0.0.\n\n\n## Provided data\nSome of the data is provided in the data folder, as it is likely to be changed in the future.\nThis includes the used tidal data aswell as the ship data. The data of the dgzrs was originally downloaded from\ntheir website, and then extended with additional data, some manually from data sheets, and some from\ndepth data, please see tidal_gen/get_base_depth.py.\n\n\n## Getting the remaining data\nAs some of the data is too large to be stored on GitHub, we decided to download the data from the original sources \nand generate the necessary files from the raw data.\n\n### Tidal Data\nThe tidal data is taken from Pegel Online (Copyright/Urheberrecht ITZBund). \nThe provided data is the one we used for our experiments, but newer \ndata can be downloaded from https://www.pegelonline.wsv.de. In order of parsing the already provided data please run \nparse_tidal_points.py. Please make sure to have the root of the project as the working directory, as otherwise the paths in the code will not work.\nWith the provided data it is expected, that 10843 entries are skipped.\n\n### Zone Data\nThe zone data will need to be downloaded and then parsed using qgis. The dataset is quite large and will\ntake some time to download, parse and process. If you just want to run a quick test we provide one file with 100 zones\nfor seed 1 already, but for proper testing you will need to download the data and parse it yourself.\n\nTo do so we will run zone_creator.py. It will create a folder data/geo and download the borders file from \nhttps://gdz.bkg.bund.de/index.php/default/open-data/geographische-gitter-fur-deutschland-in-utm-projektion-geogitter-national.html. \nPlease read their license, check for potential updates and make sure to comply with the license before using the data.\n\nAs working with QGIS in Python is quite complex, we will need to run the code using the QGIS Python interpreter.\nFor QGIS 3.34.1 the interpreter can be found under C:\\Program Files\\QGIS 3.34.1\\apps\\Python39\\python.exe in Windows. \nIf you use a different version of QGIS or a different OS, you will need to adjust the path in the code.\nTo run using the QGIS Python interpreter, you can use the following command:\n```\n\"C:\\Program Files\\QGIS 3.34.1\\apps\\Python39\\python.exe\" -m zone_creator\n```\n\n## Running the code\nAfter installing all the necessary software and getting the data, you can run the code.\nPlease make sure to have the root of the project as the working directory, as otherwise the paths in the code will not work.\n\nAs an easy point of entry, you can run the test.py file. It accepts the parameters as command line arguments or \nwill ask for them if not provided. The parameters are the following:\n- seed: The seed for the random number generator\n- number of zones: The base number of zones\n- combined number of zones: The number of zones after k-means clustering\n- water: Allows to northern sea or the baltic sea or both\n- output: The output file. If specified as a command line argument, the file will be saved to the specified location. If done using the input prompt, the file will be saved to test/result/\n- solver: The solver to use\n\n\n## The Results\nFor the actual runtime study we used the HPC of the RWTH Aachen University. To do so we used slurm,\nwhich is a job scheduler. The code is not provided in this repository, but we can provide the code if requested.\nThe code is quite specific to the HPC of the RWTH Aachen University and will need to be adjusted to work on other systems.\n\nWe do provide the results of the runtime study in data/results. We do have the\ngurobi json dumps, but did not include them here, as they are quite large. If you want to see them, please contact us.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveni-vidi-code%2Frca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fveni-vidi-code%2Frca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveni-vidi-code%2Frca/lists"}