trip table structure

Contents

trip table structure#

All person trips executed during simulation in POLARIS is logged here as a separate record. Note that only the SOV-related record can be counted as a vehicle trip for person-related travel. All freight trips can also be counted as a vehicle trip

Table Structure#

Field

Type

NULL allowed

Default Value

Foreign key

Description

trip_id*

INTEGER

NO

Unique identifier of this trip

hhold

INTEGER

NO

0

Not used

path

INTEGER

YES

Path(path)

path is not NULL if there exists trajectory-related information in the Path table referenced by this value. (foreign key to the Path table)

path_multimodal

INTEGER

YES

Path_Multimodal(path_multimodal)

path_multimodal is not NULL if there exists multimodal trajectory-related information in the Path_Multimodal table referenced by this value. (foreign key to the Path_Multimodal table)

tour

INTEGER

NO

0

Not used

trip

INTEGER

NO

0

Not used

start

REAL

YES

0

Simulation time when this trip starts (units: seconds)

end

REAL

YES

0

Simulation time when this trip ends (units: seconds)

duration

REAL

YES

0

Not used

experienced_gap

REAL

YES

0

Gap experienced by person based on executed travel time (provided by end minus start) compared to routed travel time.

origin

INTEGER

NO

0

The location where this trip begins (foreign key to the Location table)

destination

INTEGER

NO

0

The location where this trip ends (foreign key to the Location table)

purpose

INTEGER

NO

0

Currently used only to distinguish freight trips as E-Commerce or not

mode

INTEGER

NO

0

The mode used to execute the trip. Values at mode.

constraint

INTEGER

NO

0

Not used

priority

INTEGER

NO

0

Not used

vehicle

INTEGER

YES

Vehicle(vehicle)

Vehicle ID used to complete the travel. Can be NULL for non-motorized trips.

passengers

INTEGER

NO

0

Not used

type

INTEGER

NO

0

Trip type is logged as either an ABM, External, External_TNC, TNC, Fixed, Transit, or Unsimulated.

partition

INTEGER

NO

0

Not used

person

INTEGER

YES

Person(person)

Person who was primarily involved in the trip (foreign key to the Person table)

travel_distance

REAL

YES

0

Distance traveled in executing this trip (units: meters)

skim_travel_time

REAL

YES

0

Travel time from the skim table for comparison with execution (units: seconds)

routed_travel_time

REAL

YES

0

Travel time from the router for comparison with execution (units: seconds)

toll

REAL

YES

0

Toll paid in executing the trip (units: $USD)

has_artificial_trip

INTEGER

NO

0

Integer to denote the type of artificial trip and can include: All good (0), Not routed (1), congestion removal (2), simulation ended (3), stuck in entry queue (4)

number_of_switches

INTEGER

NO

0

Integer value indicating the number of times the path was changed to account for downstream congestion or when waiting too long at a link

request

INTEGER

NO

0

Not used

monetary_cost

REAL

YES

0

Dollar amount paid when making the trip (units: $USD)

(* - Primary key)

The SQL statement for table and index creation is below.

CREATE TABLE "Trip" (
  "trip_id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  "hhold" INTEGER NOT NULL DEFAULT 0,
  "path" INTEGER NULL,
  "path_multimodal" INTEGER NULL,
  "tour" INTEGER NOT NULL DEFAULT 0,
  "trip" INTEGER NOT NULL DEFAULT 0,
  "start" REAL NULL DEFAULT 0,
  "end" REAL NULL DEFAULT 0,
  "duration" REAL NULL DEFAULT 0,
  "experienced_gap" REAL NULL DEFAULT 0,
  "origin" INTEGER NOT NULL DEFAULT 0,
  "destination" INTEGER NOT NULL DEFAULT 0,
  "purpose" INTEGER NOT NULL DEFAULT 0,
  "mode" INTEGER NOT NULL DEFAULT 0,
  "constraint" INTEGER NOT NULL DEFAULT 0,
  "priority" INTEGER NOT NULL DEFAULT 0,
  "vehicle" INTEGER NULL,
  "passengers" INTEGER NOT NULL DEFAULT 0,
  "type" INTEGER NOT NULL DEFAULT 0,
  "partition" INTEGER NOT NULL DEFAULT 0,
  "person" INTEGER NULL,
  "travel_distance" REAL NULL DEFAULT 0,
  "skim_travel_time" REAL NULL DEFAULT 0,
  "routed_travel_time" REAL NULL DEFAULT 0,
  "toll" REAL NULL DEFAULT 0,
  "has_artificial_trip" INTEGER NOT NULL DEFAULT 0,
  "number_of_switches" INTEGER NOT NULL DEFAULT 0,
  "request" INTEGER NOT NULL DEFAULT 0,
  "monetary_cost" REAL NULL DEFAULT 0,

  CONSTRAINT "path_fk"
    FOREIGN KEY ("path")
    REFERENCES "Path" ("id")
    DEFERRABLE INITIALLY DEFERRED,
  CONSTRAINT "path_multimodal_fk"
    FOREIGN KEY ("path_multimodal")
    REFERENCES "Path_Multimodal" ("id")
    DEFERRABLE INITIALLY DEFERRED,
  CONSTRAINT "vehicle_fk"
    FOREIGN KEY ("vehicle")
    REFERENCES "Vehicle" ("vehicle_id")
    DEFERRABLE INITIALLY DEFERRED,
  CONSTRAINT "person_fk"
    FOREIGN KEY ("person")
    REFERENCES "Person" ("person")
    DEFERRABLE INITIALLY DEFERRED)

Enums#

The following enums are used in this table.

mode#

Enum Values#

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