{"id":20355860,"url":"https://github.com/davidingplus/transportation-planning","last_synced_at":"2025-05-08T05:31:34.316Z","repository":{"id":199491845,"uuid":"702989558","full_name":"DavidingPlus/transportation-planning","owner":"DavidingPlus","description":"交通规划原理（transportation planning）的期末项目。","archived":true,"fork":false,"pushed_at":"2025-02-28T08:43:41.000Z","size":60747,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T15:29:30.430Z","etag":null,"topics":["transportation-planning","transportation-problem","transportation-simulation"],"latest_commit_sha":null,"homepage":"","language":"Python","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/DavidingPlus.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":"2023-10-10T11:45:17.000Z","updated_at":"2025-02-28T08:45:41.000Z","dependencies_parsed_at":"2023-10-15T08:54:59.813Z","dependency_job_id":"256a1724-53f6-48a8-b773-ff2b02dc5cb5","html_url":"https://github.com/DavidingPlus/transportation-planning","commit_stats":null,"previous_names":["davidingplus/traffic_flow","davidingplus/tp_project","davidingplus/transportation-planning"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidingPlus%2Ftransportation-planning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidingPlus%2Ftransportation-planning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidingPlus%2Ftransportation-planning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidingPlus%2Ftransportation-planning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavidingPlus","download_url":"https://codeload.github.com/DavidingPlus/transportation-planning/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253008768,"owners_count":21839699,"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":["transportation-planning","transportation-problem","transportation-simulation"],"created_at":"2024-11-14T23:14:19.383Z","updated_at":"2025-05-08T05:31:29.305Z","avatar_url":"https://github.com/DavidingPlus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 交通规划原理期末项目\n\n# 项目组人员\n\n- 小组人员：**王森，刘治学，田景颢，刘杰**\n- 指导老师：**熊耀华**\n\n# 具体分工\n\n- 王森\n  - 完成工具算法库`Astar`，`Curvaa`，`Graphs`的编写\n  - 完成图形绘制和数据请求整合文件`Gpp.py`的编写\n- 刘治学\n  - 完成`PyQt5`的界面编写，包括`draw.py`和`draw.ui`\n  - 完成主程序入口`main.py`的编写\n  - 完成项目整体架构的设计和代码的汇总，以及文档的编写\n- 田景颢\n  - 完成`data.json`数据格式的设计和数据的生成\n  - 完成`get`请求服务端的配置，能通过浏览器获取到数据的页面以及通过代码发送`get`请求获得数据\n- 刘杰\n  - 完成颜色工具库`hover`和`Json`数据处理工具库`JsonParser`的编写\n  - 完成演示视频的录制和剪辑\n\n# 注意事项\n\n- 项目在`Github`上开源，地址：[https://github.com/DavidingPlus/Transportation-Planning](https://github.com/DavidingPlus/Transportation-Planning)\n\n- 项目依赖`python3`环境，依赖`PyQt5`包，`windows`系统和`Linux`系统均兼容，本测试在`windows`上运行\n\n  - 安装`PyQT5`：在终端使用如下命令\n\n    ```bash\n    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyqt5 pyqt5-tools\n    ```\n\n    \n\n- 项目根目录中的`项目文档`是本`README.md`的`pdf`版本\n\n- 项目根目录中的`演示视频`是该项目的测试视频\n\n# 代码分析\n\n## 整体框架\n\n- 代码的框架如下：\n\n  \u003cimg src=\"https://img-blog.csdnimg.cn/direct/2168b73844f14021b625db6f03b545c5.png\" alt=\"image-20231229204237018\" style=\"zoom:75%;\" /\u003e\n\n## res目录\n\n- `res`目录：存放交通网络结点和边的数据，是一个`json`文件\n\n  \u003cimg src=\"https://img-blog.csdnimg.cn/direct/e563b0417a4849fbad7d923528b5864a.png\" alt=\"image-20231229204758402\" style=\"zoom:60%;\" /\u003e\n\n## src目录\n\n- `src`目录：存放代码执行需要的依赖文件，类似于库或者包\n\n  - `Astar.py`\n\n    - `Astars`是一个用于进行路径计算的算法库，在该算法中，我们可以进行`Astars`作为算法的起始，我们选用曼哈顿距离作为启发函数\n\n    \u003cimg src=\"https://img-blog.csdnimg.cn/direct/758fdb90f31b47be9571ccf80c8e389c.png\" alt=\"image-20231229204443744\" style=\"zoom:60%;\" /\u003e\n\n  - `Curvva.py`\n\n    - `Curvaa`是一个用于进行路径计算、绘制的库，在该算法中，我们可以进行计算绘制，画出参数方程形式的路径\n\n    \u003cimg src=\"https://img-blog.csdnimg.cn/direct/d381b8d5e6df4aba8e3ae6dc3fd3a328.png\" alt=\"image-20231229204817590\" style=\"zoom:67%;\" /\u003e\n\n  - `Gpp.py`\n\n    - `Gpp.py`是用来进行图形的基础绘制的文件，里面通过拿取`data.json`的数据，将数据转化为图展示出来，在其中还包括了发送`get`请求从远端服务器获得数据的操作\n\n    \u003cimg src=\"https://img-blog.csdnimg.cn/direct/1251c2bc44294ff98709db46cfa36950.png\" alt=\"image-20231229205120224\" style=\"zoom:65%;\" /\u003e\n\n  - `Graphs.py`\n\n    - `Graphs`是基于`plt`和`netWorkX`的简单的计算规划展示交通流的类\n    - `Graphs`主要使用了`Astar`算法进行计算，并通过该算法得到所需的结果进一步获取\n\n    \u003cimg src=\"https://img-blog.csdnimg.cn/direct/0f6fe237336e46f998f33f88ddba49ce.png\" alt=\"image-20231229204853443\" style=\"zoom:67%;\" /\u003e\n\n  - `hover.py`\n\n    - 是一个颜色的工具库，最后的成品有三种不同的颜色主题进行展示，相关在这里进行定义\n\n    \u003cimg src=\"https://img-blog.csdnimg.cn/direct/3e2bda1bc80444e7835787c442d89ed7.png\" alt=\"image-20231229205228796\" style=\"zoom:65%;\" /\u003e\n\n  - `JsonPraser.py`\n\n    - `JsonParser`本项目的工具类，存放`json`解析的东西\n\n    \u003cimg src=\"https://img-blog.csdnimg.cn/direct/c543f0c4ca94425ca896d584dfa51d09.png\" alt=\"image-20231229204909300\" style=\"zoom:65%;\" /\u003e\n\n## ui目录\n\n- `ui`目录：存放成品展示的界面的`python`文件和`ui`文件\n\n  - `draw.py`\n\n    - 运用`pythonQt`库，在画出一个主界面加上三个按钮并且对应不同的事件\n\n    \u003cimg src=\"https://img-blog.csdnimg.cn/direct/94db79bb40c543b4a725cff4b77f4801.png\" alt=\"image-20231229205538583\" style=\"zoom:60%;\" /\u003e\n\n  - `draw.ui`\n\n    - 界面的`ui`文件\n\n    \u003cimg src=\"https://img-blog.csdnimg.cn/direct/1cfe32d1556448f99a084c4d94558d58.png\" alt=\"image-20231229205604683\" style=\"zoom:65%;\" /\u003e\n\n## 主程序\n\n- `main.py`：程序的主入口，创建`MainWindow`对象，并且运行之后展示出来，然后进行后续发送`get`请求，并处理数据画图的逻辑\n\n  \u003cimg src=\"https://img-blog.csdnimg.cn/direct/f55c54a807304919b7a1e65d1a237bf2.png\" alt=\"image-20231229205752120\" style=\"zoom:65%;\" /\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidingplus%2Ftransportation-planning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidingplus%2Ftransportation-planning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidingplus%2Ftransportation-planning/lists"}