{"id":21098213,"url":"https://github.com/timothymakkison/transportation_network","last_synced_at":"2025-11-11T11:15:51.047Z","repository":{"id":116966900,"uuid":"402585765","full_name":"TimothyMakkison/transportation_network","owner":"TimothyMakkison","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-06T20:59:28.000Z","size":3273,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T07:27:26.747Z","etag":null,"topics":["advanced-programming","benchmarking","criterion","csv","graph-algorithms","graphviz-dot","nom","petgraph","rust","serde"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TimothyMakkison.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-02T23:08:11.000Z","updated_at":"2021-12-12T23:30:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"608ee4df-914c-4b11-baf6-191a88762b54","html_url":"https://github.com/TimothyMakkison/transportation_network","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TimothyMakkison/transportation_network","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyMakkison%2Ftransportation_network","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyMakkison%2Ftransportation_network/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyMakkison%2Ftransportation_network/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyMakkison%2Ftransportation_network/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimothyMakkison","download_url":"https://codeload.github.com/TimothyMakkison/transportation_network/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyMakkison%2Ftransportation_network/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271752125,"owners_count":24814750,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["advanced-programming","benchmarking","criterion","csv","graph-algorithms","graphviz-dot","nom","petgraph","rust","serde"],"created_at":"2024-11-19T22:54:02.538Z","updated_at":"2025-11-11T11:15:50.983Z","avatar_url":"https://github.com/TimothyMakkison.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# transportation_network\n\nThis was the final programming assignnment for an Advanced Programming lab. Found [here.](https://github.com/k4io/lab-i-copy)\n\n# Summary\nThe objective of this final lab is to implement, exercise and assess the performance of data structures that represent a transport network and support route-finding and evaluation. A network is a collection of nodes and arcs so, in the context of a transport network the nodes will correspond to road/rail junctions; towns/cities/villages; bus/rail stations; air/sea ports, etc., while the network arcs will be road/rail route segments or air corridors/sea lanes as appropriate.\n\nData will be supplied (in formats as described below) for the nodes and arcs representing a transport network, together with a ‘command’ file specifying operations to be performed on the network data. These operations may include, for example, reporting the distance between two nodes (places) on the network; finding neighbour nodes to a starting point; finding or validating a node sequence to form a journey between two places (pairs of nodes for origin and destination). For each command type, a specific output format will be defined. To streamline the assessment process, your software must implement all input and output formats precisely.\n\nYou will construct software in C++ with suitable class definitions for the necessary data structures, to input the supplied data and work through the commands. You will also be expected to present diagnostic data on process efficiency, for example the number of node/arc records visited in the data structure.\n\n\n## Data\n3 files were provided; [Places.csv](https://github.com/TimothyMakkison/transportation_network/blob/master/Places.csv) (nodes) containing the Name, Id and Coordinates, [Links.csv](https://github.com/TimothyMakkison/transportation_network/blob/master/Links.csv) (edges)\ncontaining a pair of place Id's and the type of transportation. [Commands.txt](https://github.com/TimothyMakkison/transportation_network/blob/master/Commands.txt) contains commands that must be read and performed e.g. find the shortest path between two places.\n\n### Places.csv\n|Name|Id|Latitude|Longitude|\n| :---:   | :-: | :-: | :-: |\n|Whitley Bridge|\t8441694|\t53.694\t|-1.156|\n|Doncaster Rail|\t8611522\t|53.522|\t-1.139|\n|Doncaster Ctr|\t8631524\t|53.524|\t-1.137|\n\n\n### Links.csv\n|Place a|Place b| Transport Mode|\n| :-:   | :-: | :-: | \n|8441694|\t061761\t|Bus|\n|8441694\t|10381699\t|Car|\n|8611522\t|8631524\t|Car|\n|8611522|\t11251704\t|Rail|\n\n### Modes\nCommands specify what type of travel mode is used, this determines what links are allowed to be traversed as follows.\nie: Foot can use any link, whereas rail and ship may only go on their respect lines.\n|     |Foot Route|Bike Route|Car Route|Bus Route|Ship Route|Rail Route|\n| :-:  | :-:  | :-:  | :-:  | :-:  | :-:  | :-:  |\n|Foot Mode| X  | X | X | X | X | X |\n|Bike Mode|  | X | X | X | X | X |\n|Car Mode|   |  | X | X | X |  |\n|Bus Mode|  |  |  | X | X |  |\n|Rail Mode|  |  |  |   | X |  |\n|Ship Mode|  |  |  |   |  | X |\n\n### Commands\n### Example Comamnds.txt\n```\nMaxLink\nFindDist 9361783 11391765\nFindNeighbour 8611522\nCheck Ship 14601225 12321385 8611522 9361783\nFindRoute Foot 9081958 51889340\n```\n\n### List Of Commands\n#### MaxDist \nFinds the two furthest separated places (calculated using longitude \u0026 latitude). \n```\nMaxDist\n```\nReturns:\n```\n\u003cName of place 1\u003e,\u003cName of place 2\u003e,\u003cDistnace in kilometres\u003e\nYork Rail,Rotterdam Harbour,416.543\n```\n\n#### MaxLink \nFinds the two most separated connected places (calculated using longitude \u0026 latitude).\n'''\nMaxLink\n'''\nReturns:\n```\n\u003cId of place 1\u003e,\u003cId of place 2\u003e,\u003cDistance in kilometres\u003e\n```\n\n#### FindDist\nFinds the distance between two places.\n``` \nFindDist \u003cId of place 1\u003e \u003cId of place 2\u003e\nie:\nFindDist 9361783 11391765\n```\nReturns:\n```\n\u003cName of place 1\u003e,\u003cName of place 2\u003e,\u003cDistance in kilometres\u003e \n\n#### FindNeighbour\nLists the neighbours of a given place.\n'''\nFindNeighbour \u003cId of place\u003e\nie:\nFindNeighbour 8611522\n```\nReturns\n```\n\u003cId of neighbour 1\u003e\n\u003cId of neighbour 2\u003e\n\u003c....\u003e\n```\n\n#### Check\nCheck verifies that a specific route is possible by checking the travel mode and whether the route is viable.\n```\nCheck \u003cTravel mode\u003e \u003cId of place 1\u003e \u003cId of place 2\u003e \u003cId of place 3\u003e \u003c...\u003e\nie: \nCheck Rail 14601225 12321385 8611522 9361783\n```\n\nExample return for a valid route:\n```\nCheck Rail 14601225 12321385 8611522 9361783\n14601225,12321385,PASS\n12321385,8611522,PASS\n8611522,9361783,PASS\n```\n\nExample return for an invalid route:\n```\nCheck Ship 14601225 12321385 8611522 9361783\n14601225,12321385,FAIL\n```\n\n#### FindRoute\nFinds a valid route between two points given a travel mode. This route does not have to be the fastest, instead should it should calculate a valid route in the shortest amount of time possible.\n```\nFindRoute \u003cTravel mode\u003e \u003cId of place 1\u003e \u003cId of place 2\u003e\neg:\nFindRoute Rail 9081958 15832241\n```\n\nExample return for a valid route\n```\nFindRoute Rail 9081958 15832241\n9081958\n12032132\n15832241\n```\n\nExample return of invalid route\n```\nFindRoute Ship 9081958 15832241\nFAIL\n```\n\n#### FindFastest Route\nCommand FindShortestRoute will find the shortest journey sequence of Nodes between first (start) and destination (second) places by the stated Mode. The shortest route is one defined as requiring the least number of nodes and not distance.\n\nThis command is similar to the command FindRoute but it is required to find only the shortest route in terms of number of nodes travelled.\n\nIt will output the references of a route from the starting Node to the end Node by the stated Mode (e.g. Rail, Car, etc.), followed by a blank line. If there is no valid route then output FAIL.\n\nInput form:\n```\nFindShortestRoute \u003cTravel mode\u003e \u003cId of place 1\u003e \u003cId of place 2\u003e\n\neg:\nFindShortestRoute Rail 9081958 15832241\n```\n\nExample return for valid route:\n```\nFindShortestRoute Rail 9081958 15832241\n9081958\n12032132\n15832241\n```\n\nExample return for an invalid route:\n```\nFindShortestRoute Ship 9081958 15832241\nFAIL\n```\n  \n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothymakkison%2Ftransportation_network","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimothymakkison%2Ftransportation_network","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothymakkison%2Ftransportation_network/lists"}