tnc servicing table structure#
Table contains records of every maintenance and cleaning activity for shared vehicles during simulation. Records in this table is typically not generated and needs to be turned on for the fleet within the fleet model file.
Field |
Type |
NULL allowed |
Default Value |
Foreign key |
Description |
---|---|---|---|---|---|
Station_ID |
INTEGER |
YES |
0 |
Service station ID where maintenance or cleaning was performed. Currently the same as an EV_Charging_Station. |
|
Latitude |
REAL |
YES |
0 |
Latitude of the station in degrees. To be converted to meters soon. |
|
Longitude |
REAL |
YES |
0 |
Longitude of the station in degrees. To be converted to meters soon. |
|
vehicle |
INTEGER |
YES |
Vehicle(vehicle) |
Vehicle that underwent maintenance and/or cleaning (foreign key to the Vehicle table) |
|
Time_In |
INTEGER |
NO |
0 |
The time at which the vehicle reached the service station. (units: seconds) |
|
Time_Start |
INTEGER |
NO |
0 |
The time at which the maintenance/cleaning operation began. (units: seconds) |
|
Time_Out |
INTEGER |
NO |
0 |
The time at which the maintenance/cleaning operation ended. (units: seconds) |
|
Location_Type |
TEXT |
NO |
‘’ |
Location type - possible values are {“Station”} |
|
Is_TNC_Vehicle |
INTEGER |
NO |
0 |
boolean flag - is the TNC vehicle being serviced a TNC vehicle. Should always be true at the moment. |
|
Is_Cleaning_Only |
INTEGER |
NO |
0 |
boolean flag - is the activity is cleaning only? (includes maintenance if false) |
|
Is_Artificial_Move |
INTEGER |
NO |
0 |
boolean flag - did the EV arrive at the station without sufficient battery. Will be removed. |
(* - Primary key)
The SQL statement for table and index creation is below.
CREATE TABLE "TNC_Servicing" (
"Station_ID" INTEGER NULL DEFAULT 0,
"Latitude" REAL NULL DEFAULT 0,
"Longitude" REAL NULL DEFAULT 0,
"vehicle" INTEGER NULL,
"Time_In" INTEGER NOT NULL DEFAULT 0,
"Time_Start" INTEGER NOT NULL DEFAULT 0,
"Time_Out" INTEGER NOT NULL DEFAULT 0,
"Location_Type" TEXT NOT NULL DEFAULT '',
"Is_TNC_Vehicle" INTEGER NOT NULL DEFAULT 0,
"Is_Cleaning_Only" INTEGER NOT NULL DEFAULT 0,
"Is_Artificial_Move" INTEGER NOT NULL DEFAULT 0,
CONSTRAINT "vehicle_fk"
FOREIGN KEY ("vehicle")
REFERENCES "Vehicle" ("vehicle_id")
DEFERRABLE INITIALLY DEFERRED)