tnc statistics table structure

tnc statistics table structure#

TNC_Statistics contains all the aggregated outputs of the shared mobility simulation. Results are stored for each vehicle across all the operators simulated

Table Structure#

Field

Type

NULL allowed

Default Value

Foreign key

Description

id*

INTEGER

NO

Record id for a unique row

tnc_operator

TEXT

NO

‘’

Text description of the operator name, such as Operator_1

tnc_id

INTEGER

NO

0

1-ordered ID of TNC vehicles within a specific operator

vehicle_id

INTEGER

NO

0

Vehicle ID corresponding to the Vehicle table in Demand and is typically used in all Demand-related tables

human_driver

INTEGER

NO

0

Boolean to denote whether this vehicle was driven by a human driver or was controlled in an automated fashion by the operator

driver_reloc_type

INTEGER

NO

0

Driver relocation type uses an enum to define the different behaviors experienced by TNC drivers while waiting for a request. Values at driver_reloc_type.

start

INTEGER

NO

0

Simulation time in seconds when TNC vehicle begins operations

end

INTEGER

NO

0

Simulation time in seconds when TNC vehicle ends operations

tot_pickups

INTEGER

NO

0

Total number of pickups successfully completed by vehicle in the simulation

tot_dropoffs

INTEGER

NO

0

Total number of dropoffs successfully completed by vehicle in the simulation

num_same_OD_trips

INTEGER

NO

0

Integer value recording if there were trips starting and ending from the same location/link

enroute_switches

INTEGER

NO

0

Total number of reroute/detours requested of the vehicle while serving all trips

charging_trips

INTEGER

NO

0

Total number of trips to an electric vehicle charging station made by vehicle

maintenance_trips

INTEGER

NO

0

Total number of trips for maintenance made by vehicle

cleaning_trips

INTEGER

NO

0

Total number of trips for cleaning only made by vehicle

parking_trips

INTEGER

NO

0

Total number of trips for parking made by vehicle

revenue

REAL

YES

0

Total revenue earned by vehicle in serving requests while in operation

target_income

REAL

YES

0

If human driver, an estimate of target income desired to be earned by driver while in operation

initial_loc

INTEGER

NO

0

Location ID consistent with the Location table of where the vehicle began operations from in the simulation period

final_loc

INTEGER

NO

0

Location ID consistent with the Location table of where the vehicle ended operations at in the simulation period

trip_requests

INTEGER

NO

0

Total number of requests passed along to the vehicle after several conditions are evaluated (such as proximity and detour if shared)

trip_rejections

INTEGER

NO

0

If human driver, total number of requests rejected by driver. Always lesser than or equal to trip_requests.

driver_rating

REAL

NO

0

Driver rating set from a distribution and tracked to repeat across iterations.

service_type

INTEGER

NO

0

Integer from an enum list representing the type of service offered by the vehicle. @@ TNC_Service_Types @@

num_seats

INTEGER

NO

0

Number of seats offered by the vehicle, especially useful for pooling but also when requests need a minimum number of available seats.

(* - Primary key)

The SQL statement for table and index creation is below.

CREATE TABLE "TNC_Statistics" (
  "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  "tnc_operator" TEXT NOT NULL DEFAULT '',
  "tnc_id" INTEGER NOT NULL DEFAULT 0,
  "vehicle_id" INTEGER NOT NULL DEFAULT 0,
  "human_driver" INTEGER NOT NULL DEFAULT 0,
  "driver_reloc_type" INTEGER NOT NULL DEFAULT 0,
  "start" INTEGER NOT NULL DEFAULT 0,
  "end" INTEGER NOT NULL DEFAULT 0,
  "tot_pickups" INTEGER NOT NULL DEFAULT 0,
  "tot_dropoffs" INTEGER NOT NULL DEFAULT 0,
  "num_same_OD_trips" INTEGER NOT NULL DEFAULT 0,
  "enroute_switches" INTEGER NOT NULL DEFAULT 0,
  "charging_trips" INTEGER NOT NULL DEFAULT 0,
  "maintenance_trips" INTEGER NOT NULL DEFAULT 0,
  "cleaning_trips" INTEGER NOT NULL DEFAULT 0,
  "parking_trips" INTEGER NOT NULL DEFAULT 0,
  "revenue" REAL NULL DEFAULT 0,
  "target_income" REAL NULL DEFAULT 0,
  "initial_loc" INTEGER NOT NULL DEFAULT 0,
  "final_loc" INTEGER NOT NULL DEFAULT 0,
  "trip_requests" INTEGER NOT NULL DEFAULT 0,
  "trip_rejections" INTEGER NOT NULL DEFAULT 0,
  "driver_rating" REAL NOT NULL DEFAULT 0,
  "service_type" INTEGER NOT NULL DEFAULT 0,
  "num_seats" INTEGER NOT NULL DEFAULT 0)

Enums#

The following enums are used in this table.

driver_reloc_type#

Enum Values#

Value

Description

-999

Not_A_Driver

0

Driver_Waits

1

Driver_Relocates_To_Demand

2

Driver_Relocates_To_Surge