shipment table structure#
An output table for the freight shipment attributes, and mode choice results, including: the trade identifier, mode used, shipping cost, shipment size, shipment frequencies, if the shipment use distribution center or no, and if that particular shipment is simulated that day or no
| Field | Type | NULL allowed | Default Value | Foreign key | Description | 
|---|---|---|---|---|---|
| shipment* | INTEGER | NO | The unique identifier of this shipment | ||
| trade_pair | INTEGER | NO | 0 | Trade_Flow(trade_pair) | The trade identifier from the trade flow table | 
| mode | INTEGER | NO | 0 | The freight mode used for the shipment (truck, rail, air, courier) Values at mode. | |
| total_cost | NUMERIC | NO | 0 | Total shipping cost of annual shipments (units: $USD) | |
| shipment_size | NUMERIC | NO | 0 | Shipment size (units: metric tons) | |
| order_interval | NUMERIC | NO | 0 | Time interval between two subsequent orders (units: days) | |
| use_distribution | BOOLEAN | NO | 0 | boolean flag - is this shipment using a distribution center? | |
| is_in_simulation_day | BOOLEAN | NO | 0 | boolean flag - is the movement of this shipment simulated this day? | |
| is_sampled | BOOLEAN | NO | 0 | boolean flag - is this shipment selected to be sampled? | 
(* - Primary key)
The SQL statement for table and index creation is below.
CREATE TABLE Shipment (
    "shipment"                          INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    "trade_pair"                        INTEGER NOT NULL DEFAULT 0,
    "mode"                              INTEGER NOT NULL DEFAULT 0,
    "total_cost"                        NUMERIC NOT NULL DEFAULT 0,
    "shipment_size"                     NUMERIC NOT NULL DEFAULT 0,
    "order_interval"                    NUMERIC NOT NULL DEFAULT 0,
    "use_distribution"                  BOOLEAN NOT NULL DEFAULT 0,
    "is_in_simulation_day"              BOOLEAN NOT NULL DEFAULT 0,
    "is_sampled"                        BOOLEAN NOT NULL DEFAULT 0,
    CONSTRAINT trade_pair_fk FOREIGN KEY (trade_pair)
    REFERENCES Trade_Flow (trade_pair) DEFERRABLE INITIALLY DEFERRED
);
Enums#
The following enums are used in this table.
mode#
| Value | Name | Description | 
|---|---|---|
| -99 | NO_MODE | |
| 0 | TRUCK | |
| 1 | RAIL | |
| 2 | PARCEL_AIR | |
| 3 | COURIER |