freight delivery table structure#
An output table for the freight tours synthesized by CRISTAL, including their mode, volume, trip type, origin and destination
Field |
Type |
NULL allowed |
Default Value |
Foreign key |
Description |
---|---|---|---|---|---|
trip_id* |
INTEGER |
NO |
unique identifier of this freight trip |
||
tour_id |
INTEGER |
NO |
0 |
Freight tour identifier |
|
carrier_estab_id |
INTEGER |
NO |
0 |
Carrier establishment identifier (foreign key to the Establishment table) |
|
supplier_estab_id |
INTEGER |
NO |
0 |
Supplier establishment identifier (foreign key to the Establishment table) |
|
receiver_estab_id |
INTEGER |
NO |
0 |
Receiver establishment identifier (foreign key to the Establishment table) |
|
origin_loc_id |
INTEGER |
NO |
0 |
The trip’s origin location (foreign key to the Location table) |
|
destination_loc_id |
INTEGER |
NO |
0 |
The trip’s destination location (foreign key to the Location table) |
|
volume |
INTEGER |
NO |
0 |
Shipment volume (units: lbs.) |
|
good_type |
INTEGER |
NO |
0 |
Type of good being shipped (TODO: Add the enum) |
|
mode_type |
INTEGER |
NO |
0 |
Mode used to make the deliver Values at mode_type. |
|
pickup_trip |
INTEGER |
NO |
0 |
boolean flag - is this a pick up trip? |
|
OHD |
INTEGER |
NO |
0 |
boolean flag - is this delivery performed in off hours? |
(* - Primary key)
The SQL statement for table and index creation is below.
CREATE TABLE Freight_Delivery (
"trip_id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"tour_id" INTEGER NOT NULL DEFAULT 0,
"carrier_estab_id" INTEGER NOT NULL DEFAULT 0,
"supplier_estab_id" INTEGER NOT NULL DEFAULT 0,
"receiver_estab_id" INTEGER NOT NULL DEFAULT 0,
"origin_loc_id" INTEGER NOT NULL DEFAULT 0,
"destination_loc_id" INTEGER NOT NULL DEFAULT 0,
"volume" INTEGER NOT NULL DEFAULT 0,
"good_type" INTEGER NOT NULL DEFAULT 0,
"mode_type" INTEGER NOT NULL DEFAULT 0,
"pickup_trip" INTEGER NOT NULL DEFAULT 0,
"OHD" INTEGER NOT NULL DEFAULT 0
);
Enums#
The following enums are used in this table.
mode_type#
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 |