mm trip table structure

Contents

mm trip table structure#

Table demostrates travelers’ micromobility trip attributes. It includes origin, destination, path, travel time, etc. attributes of the trip.

Table Structure#

Field

Type

NULL allowed

Default Value

Foreign key

Description

MM_trip_id_int*

INTEGER

NO

The unique identifier for the micromobility trip

MM_trip_id

INTEGER

NO

Duplicative and unused. Will be removed.

path

INTEGER

YES

All MM trips are on bike network, is in the Path table referenced by this ID.

path_multimodal

INTEGER

YES

Path_Multimodal(path_multimodal)

Always NULL because info is logged in the Path table.

start

REAL

YES

0

Start time of the trip (units: seconds)

end

REAL

YES

0

End time of the trip (units: seconds)

origin

INTEGER

NO

0

Trip origin location identifier (foreign key to Location table)

destination

INTEGER

NO

0

Trip destination location identifier (foreign key to Location table)

mode

INTEGER

NO

0

The mode utilised for this trip Values at mode.

type

INTEGER

NO

0

What type of trip is this Values at type.

vehicle

INTEGER

YES

Vehicle(vehicle)

Micromobility vehicle identifier (foreign key to Vehicle table)

travel_distance

REAL

YES

0

Travelled distance of the trip (units: meters)

skim_travel_time

REAL

YES

0

Expected travel time at the start of the trip - from skim (units: seconds)

routed_travel_time

REAL

YES

0

Actual routed travel time of the trip (units: seconds)

status

INTEGER

NO

0

Micromobility vehicle status denoting what operation was being done when trip started. Values at status.

person

INTEGER

YES

Person(person)

The unique identifier for the individual making the trip (foreign key to Person table)

(* - Primary key)

The SQL statement for table and index creation is below.

CREATE TABLE "MM_Trip" (
  "MM_trip_id_int" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  "MM_trip_id" INTEGER NOT NULL,
  "path" INTEGER NULL,
  "path_multimodal" INTEGER NULL,
  "start" REAL NULL DEFAULT 0,
  "end" REAL NULL DEFAULT 0,
  "origin" INTEGER NOT NULL DEFAULT 0,
  "destination" INTEGER NOT NULL DEFAULT 0,
  "mode" INTEGER NOT NULL DEFAULT 0,
  "type" INTEGER NOT NULL DEFAULT 0,
  "vehicle" INTEGER NULL,
  "travel_distance" REAL NULL DEFAULT 0,
  "skim_travel_time" REAL NULL DEFAULT 0,
  "routed_travel_time" REAL NULL DEFAULT 0,
  "status" INTEGER NOT NULL DEFAULT 0,
  "person" INTEGER NULL,

  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

type#

Enum Values#

Value

Description

-1

NULLTRIP

11

ABM

22

EXTERNAL

23

EXTERNAL_TNC

24

EXTERNAL_FREIGHT

33

TNC

34

FREIGHT

44

FIXED

55

TRANSIT

99

UNSIMULATED

status#

Enum Values#

Value

Description

1

MM_Person_Use

2

MM_Relocate