{"id":13426229,"url":"https://github.com/sharedstreets/trip-simulator","last_synced_at":"2025-04-12T05:15:00.990Z","repository":{"id":56009410,"uuid":"169285309","full_name":"sharedstreets/trip-simulator","owner":"sharedstreets","description":"probabilistic multi-agent trip simulation with physically realistic GPS modeling","archived":false,"fork":false,"pushed_at":"2020-12-01T14:05:56.000Z","size":40,"stargazers_count":173,"open_issues_count":17,"forks_count":28,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-12T05:14:52.515Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/sharedstreets.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-02-05T17:52:55.000Z","updated_at":"2025-03-27T14:13:24.000Z","dependencies_parsed_at":"2022-08-15T11:20:27.264Z","dependency_job_id":null,"html_url":"https://github.com/sharedstreets/trip-simulator","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharedstreets%2Ftrip-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharedstreets%2Ftrip-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharedstreets%2Ftrip-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharedstreets%2Ftrip-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharedstreets","download_url":"https://codeload.github.com/sharedstreets/trip-simulator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248519557,"owners_count":21117761,"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-07-31T00:01:29.536Z","updated_at":"2025-04-12T05:15:00.944Z","avatar_url":"https://github.com/sharedstreets.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# trip-simulator\n*A module for generating simulated location telemetry*\n\n## Overview\n\n`trip-simulator` is a tool created by [SharedStreets](sharedstreets.io) for generating simulated raw GPS telemetry. Raw GPS data is highly sensitive, since it can be easily deanonymized and used to track the historical movements of an individual. For this reason, it is difficult to safely develop algorithms for use cases like transit analysis, map matching, or speed profiling without having this data locally available. The SharedStreets trip-simulator realistically creates location telemetry using agents and physically modeled GPS output. Since the data is fake, there is no privacy risk, and since the noise is plausibly simulated, it can still be used for algorithms that need to operate under real world signal conditions.\n\n![](https://i.imgur.com/Z1N2Tdj.jpg)\n*1 million trips simulated over NYC*\n\n## Features\n\n- Multi-agent model supporting cars, bikes, or scooters\n- Generates GPS data with no inputs besides OpenStreetMap\n- Reasonable pickup/dropoff generated using agent model based on network density\n- Physically realistic GPS noise modeled for usage in real world telemetry algorithms\n- Outputs 1hz location probes, MDS compliant trips, and MDS compliant status changes\n\n## Install\n\n```sh\nnpm install -g trip-simulator\n```\n\n## CLI\n\n```\ntrip-simulator\n\n-h,--help     show help\n--config      config car,bike,scooter\n--pbf         osm.pbf file\n--graph       osrm graph file\n--agents      number of agents\n--start       start time in epoch milliseconds\n--seconds     number of seconds to simulate\n--probes      GeoJSON probes output file\n--traces      GeoJSON traces output file\n--trips       MDS trips output file\n--changes     MDS status changes output file\n```\n\n## Use\n\ntrip-simulator features a command line interface capable of generating telemetry data for simulated vehicles around a city. The simulation requires an OpenStreetMap extract, which can be downloaded from many sources, such as planet.osm, geofabrick, or nextzen. Download and extract, and trim the network to the target area using a tool such as osmium. Once you have a trimmed extract, process the road graph using OSRM. As an example, we will walk through simulating data for Nashville, TN using a nextzen extract.\n\n### 1. download data\n\n```sh\ncurl https://s3.amazonaws.com/metro-extracts.nextzen.org/nashville_tennessee.osm.pbf -o nashville.osm.pbf\n```\n\n### 2. extract a smaller target bounding box\n\n```sh\nosmium extract -b \"-86.84881,36.12262,-86.73688,36.20494\" nashville.osm.pbf -o ./nash.osm.pbf -s \"complete_ways\" --overwrite\n```\n\n### 3. install OSRM to your project directory \u0026 process the road graph using the default pedestrian profile\n\n```sh\nnpm install osrm;\n./node_modules/osrm/lib/binding/osrm-extract ./nash.osm.pbf -p ./node_modules/osrm/profiles/foot.lua;\n./node_modules/osrm/lib/binding/osrm-contract ./nash.osrm\n```\n\n### 4. run a 24 hour scooter simulation with 100 vehicle agents\n\n```\ntrip-simulator \\\n  --config scooter \\\n  --pbf nash.osm.pbf \\\n  --graph nash.osrm \\\n  --agents 100 \\\n  --start 1563122921000 \\\n  --seconds 86400 \\\n  --traces ./traces.json \\\n  --probes ./probes.json \\\n  --changes ./changes.json \\\n  --trips ./trips.json\n```\n\n## Test\n\n```sh\nnpm test\n```\n\n## Lint\n\n```sh\nnpm run lint\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharedstreets%2Ftrip-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharedstreets%2Ftrip-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharedstreets%2Ftrip-simulator/lists"}