tnc trip table structure#
The TNC_Trip table stores all trips made by shared mobility vehicles - referred to here as TNC vehicles. Each record in the table includes a leg of travel - either pickup, dropoff, charging, or repositioning. Several records together for a specific vehicle may form a tour, meaning the vehicle was continuously in operation from one trip to the next, without a break.
Field |
Type |
NULL allowed |
Default Value |
Foreign key |
Description |
---|---|---|---|---|---|
TNC_trip_id_int* |
INTEGER |
NO |
Integerized trip ID for each TNC_Trip record |
||
TNC_trip_id |
INTEGER |
NO |
Not used |
||
path |
INTEGER |
NO |
-1 |
Path ID is not -1 if there exists Path-related information in the Path table (in H5) referenced by this value (foreign key to the Path table) |
|
path_multimodal |
INTEGER |
YES |
Path_Multimodal(path_multimodal) |
All TNC trips are on auto network, so no multimodal travel information is logged Always NULL |
|
tour |
INTEGER |
NO |
0 |
Counter for tours that are formed from a series of continuous trips undertaken by the TNC vehicle |
|
start |
REAL |
YES |
0 |
Time at which the TNC vehicle started its trip (units: seconds) |
|
end |
REAL |
YES |
0 |
Time at which the TNC vehicle ended its trip (units: seconds) |
|
duration |
REAL |
YES |
0 |
Not used |
|
origin |
INTEGER |
NO |
0 |
Origin location of the trip (foreign key to the Location table) |
|
destination |
INTEGER |
NO |
0 |
Destination location of the trip (foreign key to the Location table) |
|
purpose |
INTEGER |
NO |
0 |
Not used |
|
mode |
INTEGER |
NO |
0 |
The mode of the trip should always be 9: “TAXI/TNC”Values at mode. |
|
type |
INTEGER |
NO |
0 |
Trip type as defined in , should always be ABMValues at type. |
|
vehicle |
INTEGER |
YES |
Vehicle(vehicle) |
TNC vehicle ID associated with the trip (foreign key to the Vehicle table) |
|
passengers |
INTEGER |
NO |
0 |
Number of passengers on board the TNC vehicle during the execution of the trip recorded |
|
travel_distance |
REAL |
YES |
0 |
Distance traveled during the trip (units: meters) |
|
skim_travel_time |
REAL |
YES |
0 |
Travel time from the skim table for comparison with execution (units: seconds) |
|
routed_travel_time |
REAL |
YES |
0 |
Travel time from the router for comparison with execution (units: seconds) |
|
request_time |
REAL |
YES |
0 |
Simulation time when the request being served actually requested that trip (units: seconds) |
|
init_status |
INTEGER |
NO |
0 |
TNC status denoting what operation was being done when trip started. Allowable values are: Pickup (-1), Dropoff (-2), Charging (-3), and Repositioning (-4) |
|
final_status |
INTEGER |
NO |
0 |
TNC status denoting what operation was actually done when trip ended because of mid-trip detours. Allowable values are: Pickup (-1), Dropoff (-2), Charging (-3), and Repositioning (-4) |
|
init_battery |
REAL |
YES |
0 |
If electric vehicle, battery state of charge at the beginning of the trip (units: %) |
|
final_battery |
REAL |
YES |
0 |
If electric vehicle, battery state of charge at the end of the trip (units: %) |
|
fare |
REAL |
YES |
0 |
Fare collected from executing this leg of the trip - Not to be used - Use fare from TNC_Request instead. |
|
person |
INTEGER |
YES |
Person(person) |
If request is related to a person, then the person ID is logged (foreign key to the Person table) |
|
request |
INTEGER |
NO |
0 |
Request object which tracks additional details of the request that generated this trip (foreign key to the TNC_Request table) |
|
toll |
REAL |
NO |
0.0 |
Toll paid in executing the trip (units: $USD) |
(* - Primary key)
The SQL statement for table and index creation is below.
CREATE TABLE "TNC_Trip" (
"TNC_trip_id_int" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"TNC_trip_id" INTEGER NOT NULL,
"path" INTEGER NOT NULL DEFAULT -1,
"path_multimodal" INTEGER NULL,
"tour" INTEGER NOT NULL DEFAULT 0,
"start" REAL NULL DEFAULT 0,
"end" REAL NULL DEFAULT 0,
"duration" REAL NULL DEFAULT 0,
"origin" INTEGER NOT NULL DEFAULT 0,
"destination" INTEGER NOT NULL DEFAULT 0,
"purpose" INTEGER NOT NULL DEFAULT 0,
"mode" INTEGER NOT NULL DEFAULT 0,
"type" INTEGER NOT NULL DEFAULT 0,
"vehicle" INTEGER NULL,
"passengers" INTEGER NOT NULL DEFAULT 0,
"travel_distance" REAL NULL DEFAULT 0,
"skim_travel_time" REAL NULL DEFAULT 0,
"routed_travel_time" REAL NULL DEFAULT 0,
"request_time" REAL NULL DEFAULT 0,
"init_status" INTEGER NOT NULL DEFAULT 0,
"final_status" INTEGER NOT NULL DEFAULT 0,
"init_battery" REAL NULL DEFAULT 0,
"final_battery" REAL NULL DEFAULT 0,
"fare" REAL NULL DEFAULT 0,
"person" INTEGER NULL,
"request" INTEGER NOT NULL DEFAULT 0,
"toll" REAL NOT NULL DEFAULT 0.0,
CONSTRAINT "path_multimodal_fk"
FOREIGN KEY ("path_multimodal")
REFERENCES "Path_Multimodal" ("id")
DEFERRABLE INITIALLY DEFERRED,
CONSTRAINT "vehicle_fk"
FOREIGN KEY ("vehicle")
REFERENCES "Vehicle" ("vehicle_id")
DEFERRABLE INITIALLY DEFERRED,
CONSTRAINT "person_fk"
FOREIGN KEY ("person")
REFERENCES "Person" ("person")
DEFERRABLE INITIALLY DEFERRED)
Enums#
The following enums are used in this table.
mode#
Value |
Description |
---|---|
0 |
SOV |
1 |
AUTO_NEST |
2 |
HOV |
3 |
TRUCK |
4 |
BUS |
5 |
RAIL |
6 |
NONMOTORIZED_NEST |
7 |
BICYCLE |
8 |
WALK |
9 |
TAXI |
10 |
SCHOOLBUS |
11 |
PARK_AND_RIDE |
12 |
KISS_AND_RIDE |
13 |
PARK_AND_RAIL |
14 |
KISS_AND_RAIL |
15 |
TNC_AND_RIDE |
17 |
MD_TRUCK |
18 |
HD_TRUCK |
19 |
BPLATE |
20 |
LD_TRUCK |
21 |
RAIL_NEST |
22 |
BUS40 |
23 |
BUS60 |
24 |
PNR_BIKE_NEST |
25 |
RIDE_AND_UNPARK |
26 |
RIDE_AND_REKISS |
27 |
RAIL_AND_UNPARK |
28 |
RAIL_AND_REKISS |
29 |
MICROM |
30 |
MICROM_NODOCK |
31 |
MICROM_AND_TRANSIT |
32 |
MICROM_NODOCK_AND_TRANSIT |
33 |
ODDELIVERY |
999 |
FAIL_MODE |
1000 |
FAIL_ROUTE |
1001 |
FAIL_REROUTE |
1002 |
FAIL_UNPARK |
1003 |
FAIL_UNPARK2 |
1004 |
FAIL_MODE1 |
1005 |
FAIL_MODE2 |
1006 |
FAIL_MODE3 |
1007 |
FAIL_ROUTE_ACTIVE |
1008 |
FAIL_ROUTE_WALK_AND_TRANSIT |
1009 |
FAIL_ROUTE_DRIVE_TO_TRANSIT |
1010 |
FAIL_ROUTE_DRIVE_FROM_TRANSIT |
1011 |
FAIL_ROUTE_TNC_AND_TRANSIT |
1012 |
FAIL_ROUTE_TNC |
1013 |
FAIL_ROUTE_SOV |
1014 |
FAIL_ROUTE_MICROMOBILITY |
1015 |
NO_MOVE |
9999 |
UNSIMULATED |
type#
Value |
Description |
---|---|
-1 |
NULLTRIP |
11 |
ABM |
22 |
EXTERNAL |
23 |
EXTERNAL_TNC |
24 |
EXTERNAL_FREIGHT |
33 |
TNC |
34 |
FREIGHT |
44 |
FIXED |
55 |
TRANSIT |
99 |
UNSIMULATED |