trip-simulator

Scripts for generating simulated GPS data from NYC taxi origin/destinations

  • 所有者: sharedstreets/trip-simulator
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

trip-simulator

A module for generating simulated location telemetry

Overview

trip-simulator is a tool created by SharedStreets 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.


1 million trips simulated over NYC

Features

  • Multi-agent model supporting cars, bikes, or scooters
  • Generates GPS data with no inputs besides OpenStreetMap
  • Reasonable pickup/dropoff generated using agent model based on network density
  • Physically realistic GPS noise modeled for usage in real world telemetry algorithms
  • Outputs 1hz location probes, MDS compliant trips, and MDS compliant status changes

Install

npm install -g trip-simulator

CLI

trip-simulator

-h,--help     show help
--config      config car,bike,scooter
--pbf         osm.pbf file
--graph       osrm graph file
--agents      number of agents
--start       start time in epoch milliseconds
--seconds     number of seconds to simulate
--probes      GeoJSON probes output file
--traces      GeoJSON traces output file
--trips       MDS trips output file
--changes     MDS status changes output file

Use

trip-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.

1. download data

curl https://s3.amazonaws.com/metro-extracts.nextzen.org/nashville_tennessee.osm.pbf -o nashville.osm.pbf

2. extract a smaller target bounding box

osmium extract -b "-86.84881,36.12262,-86.73688,36.20494" nashville.osm.pbf -o ./nash.osm.pbf -s "complete_ways" --overwrite

3. install OSRM to your project directory & process the road graph using the default pedestrian profile

npm install osrm;
./node_modules/osrm/lib/binding/osrm-extract ./nash.osm.pbf -p ./node_modules/osrm/profiles/foot.lua;
./node_modules/osrm/lib/binding/osrm-contract ./nash.osrm

4. run a 24 hour scooter simulation with 100 vehicle agents

trip-simulator \
  --config scooter \
  --pbf nash.osm.pbf \
  --graph nash.osrm \
  --agents 100 \
  --start 1563122921000 \
  --seconds 86400 \
  --traces ./traces.json \
  --probes ./probes.json \
  --changes ./changes.json \
  --trips ./trips.json

Test

npm test

Lint

npm run lint

主要指標

概覽
名稱與所有者sharedstreets/trip-simulator
主編程語言JavaScript
編程語言JavaScript (語言數: 1)
平台
許可證MIT License
所有者活动
創建於2019-02-05 17:52:55
推送於2020-12-01 14:05:56
最后一次提交2020-12-01 09:05:49
發布數7
最新版本名稱v3.0.0 (發布於 2019-07-14 15:21:26)
第一版名稱v2.0.1 (發布於 2019-05-23 15:59:37)
用户参与
星數173
關注者數10
派生數28
提交數49
已啟用問題?
問題數30
打開的問題數17
拉請求數6
打開的拉請求數0
關閉的拉請求數1
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?