{"id":16791866,"url":"https://github.com/alessandrojcm/shortest-path-graphicator","last_synced_at":"2025-04-10T23:32:45.462Z","repository":{"id":52451214,"uuid":"244423791","full_name":"alessandrojcm/shortest-path-graphicator","owner":"alessandrojcm","description":"A PyQt and Networkx application that plots the shortest path between two nodes","archived":false,"fork":false,"pushed_at":"2021-04-28T22:26:42.000Z","size":52032,"stargazers_count":8,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T04:59:15.568Z","etag":null,"topics":["algorithms","graph","graphviz","networkx","numpy","pyqt5","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alessandrojcm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-02T16:50:05.000Z","updated_at":"2024-07-29T05:29:12.000Z","dependencies_parsed_at":"2022-08-18T13:22:53.051Z","dependency_job_id":null,"html_url":"https://github.com/alessandrojcm/shortest-path-graphicator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alessandrojcm%2Fshortest-path-graphicator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alessandrojcm%2Fshortest-path-graphicator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alessandrojcm%2Fshortest-path-graphicator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alessandrojcm%2Fshortest-path-graphicator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alessandrojcm","download_url":"https://codeload.github.com/alessandrojcm/shortest-path-graphicator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248316848,"owners_count":21083515,"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":["algorithms","graph","graphviz","networkx","numpy","pyqt5","python"],"created_at":"2024-10-13T08:36:02.611Z","updated_at":"2025-04-10T23:32:45.442Z","avatar_url":"https://github.com/alessandrojcm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shortest path plotter\n\n![Main menu demo](demo.gif)\n\nThis is a PyQt5 app whose purpose is to plot the shortest path between two nodes of a undirected\nweighted graph, it uses NetworkX and Matplotlib. The purpose of the app is to simulate the shortest\npath calculation of a routing algorithm, because of this it uses the Bellman-Ford algorithm to calculate \nthe shortest path.\n\nAlso, it uses Simpy to simulate the packet traversal from one node to another.\n\n### Installation\n* Install [poetry](https://python-poetry.org/docs/)\n* Run ```poetry install```\n* Run ```main.py```\n\n### Features\n* Creates random complete graphs with 10 nodes and weights from 0 to 5000\n* Loads graphs from a Graphviz DOT file\n* Loads graphs as a CSV file\n* Paints the path traveled by the \"package\"\n\n## Usage\n\n## Graph creation\n\n### Random graph\n\nSelect \"Random graph\" for a random complete graph with weighted edges from 0 to 5000.\n\n### Graphviz DOT file\n\nSelect \"Open file\" (or hit ```CTRL + O```) to open a Graphviz Dot file.\nThe file must have the ```.dot``` and the following format:\n\n```\ngraph {\n    1 -- 2[label=2];\n    3 -- 4[label=3];\n    5 -- 4[label=5];\n}\n``` \n\nWhich means an adjacency matrix for the graph, for more information refer to the DOT language \n[specification](https://graphviz.gitlab.io/_pages/doc/info/lang.html).\n\n**Important**: edges must have the ```label``` property set to a number as this will be parsed as the edge weight. \nNon integer node names will be converted to numbers.\n\nRefer to the ```test.dot``` file for an example.\n\n### CSV File\nSelect \"Open file\" (or hit ```CTRL + O```) to open a CSV File.\nThe file must have the ```.csv``` and the following format:\n\n```\n1,2,3\n4,5,7\n```\n\nWhere the first element is the start node, the next element the end node and the next element the weight\nof the edge that connects them. All nodes must be integers. Refer to the ```test.csv``` file for an example.\n\n## Data set\n\nAfter creating the graph, click \"Send package\" to select the start and end node, as well as the data.\nA window will pop up, select the start and end node and enter the \"package\"; it mus be comprised of 0 or 1\nand can be no longer that 8 (meaning a binary package of 8 bits).\n\n## Simulation start\n\nClick \"Start simulation\", log window will register the nodes involved in the transmission.\n\n### Possible upgrades\n* Add more shortest path algorithms (Dijstra, A*, etc) and allow the user to select them\n* Animate how the package travels through the nodes (it currently is in real time, but the render time \nis greater than the simulation time)\n* Allow two or more simulations to run at the same time and take into account the \"busy\" edges\n* Allow the user to set the nodes, edges and weight of the random graph\n* Allow for the nodes to have non integer labels\n* Make Data configuration window don't close on error\n* Add \"Step\" button to run the simulation step by step (see [this](https://simpy.readthedocs.io/en/latest/api_reference/simpy.core.html#simpy.core.Environment.step))\n* The GUI is (in my opinion) a _little_ tighly coupled to the logic, decoupling this a bit more\ncould be useful\n* Upgrades on the GUI (more cues, come up with a better idea than the log window, etc)\n\n\nCredits\n---------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n- _Cookiecutter: https://github.com/audreyr/cookiecutter\n- _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falessandrojcm%2Fshortest-path-graphicator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falessandrojcm%2Fshortest-path-graphicator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falessandrojcm%2Fshortest-path-graphicator/lists"}