{"id":22994572,"url":"https://github.com/singuerinc/subway","last_synced_at":"2025-08-13T22:31:50.947Z","repository":{"id":143400354,"uuid":"98467264","full_name":"singuerinc/subway","owner":"singuerinc","description":"A metro/subway flow simulation.","archived":false,"fork":false,"pushed_at":"2023-11-25T14:09:37.000Z","size":1279,"stargazers_count":14,"open_issues_count":4,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T07:22:01.537Z","etag":null,"topics":["pixijs","simulation","subway","trains","typescript"],"latest_commit_sha":null,"homepage":"https://subway-singuerinc.netlify.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/singuerinc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-07-26T21:27:37.000Z","updated_at":"2024-06-16T18:47:45.000Z","dependencies_parsed_at":"2023-11-25T15:33:55.843Z","dependency_job_id":null,"html_url":"https://github.com/singuerinc/subway","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/singuerinc/subway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singuerinc%2Fsubway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singuerinc%2Fsubway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singuerinc%2Fsubway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singuerinc%2Fsubway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/singuerinc","download_url":"https://codeload.github.com/singuerinc/subway/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singuerinc%2Fsubway/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270329149,"owners_count":24565772,"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-13T02:00:09.904Z","response_time":66,"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":["pixijs","simulation","subway","trains","typescript"],"created_at":"2024-12-15T05:19:24.678Z","updated_at":"2025-08-13T22:31:50.618Z","avatar_url":"https://github.com/singuerinc.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Subway\n\nA metro/subway flow simulation.\n\n[Demo](https://subway-singuerinc.netlify.com/)\n\n![Subway](./subway.jpg)\n\n## About\n\nI am quiet a fan of transportation systems. I used to play a lot to [OpenTTD](https://www.openttd.org/en/): an open source version of [Transport Tycoon](https://en.wikipedia.org/wiki/Transport_Tycoon).\n\nI was always fascinated by the (almost) perfect synchronization that the train systems have.\n\n## Logic\n\nA few statements about this experiment:\n\n- There is no API connected to the app: I was considering the idea of using an API to get the data, but the problem is that it becomes a \"visualization\" rather than a simulation.\n\n- It is based on the Barcelona subway net, but can be easely modified to display any system.\n\n- It includes a simple \"AI\":\n\n    - Trains unload and load cargo on each station\n    - Trains decide when to wait or enter to a waypoint/station by status (free/occupied)\n    - Trains have a predefined itinerary and routes that have to follow\n    - Stations get cargo (passengers) to be delivered to other stations\n    - Trains have different capacity (1, 2, 3 or more wagons)\n    - Trains max speed is affected by the cargo and the size of the train\n    - Trains may have failures (not yet implemented)\n\n## Tech\n\nI created this project as a fun way to learn a bit more about [Typescript](https://www.typescriptlang.org/) and [PIXI.js](http://www.pixijs.com/)\n\n## Other cities\n\nThe simulation is fixed to display the Barcelona subway, but it is very easy to change to any city, you just need to define a Subway line and the coords for each station. Take a look the `src/lines` folder.\n\n## License\n\nSee the [LICENSE](LICENSE.md) file for license rights and limitations (MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinguerinc%2Fsubway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinguerinc%2Fsubway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinguerinc%2Fsubway/lists"}