freight shipment table structure

freight shipment table structure#

An output table for the freight shipment attributes, and mode choice results, including: supplier, receiver commodity type, mode used, shipment size, total trade volume and cost between buyers and suppliers, and if that particular shipment is simulated that day or no

Table Structure#

Field

Type

NULL allowed

Default Value

Foreign key

Description

shipment_id*

INTEGER

NO

The unique identifier of this shipment

supplier_estab_id

INTEGER

NO

0

The supplier of this shipment (foreign key to establishment table)

receiver_estab_id

INTEGER

NO

0

The receiver of this shipment (foreign key to establishment table)

commodity

INTEGER

NO

0

The commodity type of the shipment (none, bulk, intermediate, finished) - TODO: corresponds to the FreightCommodityType enum

mode

INTEGER

NO

0

The freight mode used for the shipment (truck, rail, air, courier) - TODO: corresponds to the FreightModeType enum

total_cost

INTEGER

NO

0

Total shipping cost of annual shipments (units: $USD)

demand_tons

REAL

YES

0

Total annual shipments (units: tons)

shipment_size_lbs

INTEGER

NO

0

Shipment size (units: lbs.)

days_btw_orders

INTEGER

NO

0

Time interval between two subsequent orders (units: days)

distribution_center_loc

INTEGER

NO

0

Location ID of allocated distribution center (foreign key to location table)

shipment_type

INTEGER

NO

0

Type of shipment identifying Internal-Internal (1), Internal-External (2), and External-Internal (3)

is_simulated

INTEGER

NO

0

boolean flag - is the movement of this shipment simulated this day?

(* - Primary key)

The SQL statement for table and index creation is below.

CREATE TABLE Freight_Shipment (
    "shipment_id"              INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    "supplier_estab_id"        INTEGER NOT NULL DEFAULT 0,
    "receiver_estab_id"        INTEGER NOT NULL DEFAULT 0,
    "commodity"                INTEGER NOT NULL DEFAULT 0,
    "mode"                     INTEGER NOT NULL DEFAULT 0,
    "total_cost"               INTEGER NOT NULL DEFAULT 0,
    "demand_tons"              REAL             DEFAULT 0,
    "shipment_size_lbs"        INTEGER NOT NULL DEFAULT 0,
    "days_btw_orders"          INTEGER NOT NULL DEFAULT 0,
    "distribution_center_loc"  INTEGER NOT NULL DEFAULT 0,
    "shipment_type"            INTEGER NOT NULL DEFAULT 0,
    "is_simulated"             INTEGER NOT NULL DEFAULT 0
);