planned activity table structure

Contents

planned activity table structure#

An output table for planned activites a person wants to participate in. Note this is a debug table and records activity attributes at the time of planning in activity generation. As such it will only be populated if write_planned_activity_table is set to true.

Table Structure#

Field

Type

NULL allowed

Default Value

Foreign key

Description

id*

INTEGER

NO

Unique identifier of this activity

seq_num

INTEGER

NO

0

Order in which activities were generated per person; note home activities are +=100 and split activities +=1000

location_id

INTEGER

NO

0

Location of the activity (foreign key to the Location table)

start_time

REAL

YES

0

Start time of the activity at the time of planning (units: seconds)

duration

REAL

YES

0

Duration of the activity at the time of planning (units: seconds)

mode

TEXT

NO

‘’

Mode to reach this activity at the time of planning, possible values are keys in Values at mode.

type

TEXT

NO

‘’

Type of the activity, possible values are keys in Values at type.

person

INTEGER

NO

Person(person)

The person undertaking this activity (foreign key to the Person table)

trip

INTEGER

NO

Always 0

origin_id

INTEGER

NO

0

Location of previous activity at the time of planning (foreign key to the Location table)

status

INTEGER

NO

0

Planning status. 0 means added to schedule, larger than zero indicates planning failure and activity is dropped

plan_time

INTEGER

NO

0

Simulation time when activity is scheduled (units: seconds)

(* - Primary key)

The SQL statement for table and index creation is below.

CREATE TABLE "Planned_Activity" (
  "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  "seq_num" INTEGER NOT NULL DEFAULT 0,
  "location_id" INTEGER NOT NULL DEFAULT 0,
  "start_time" REAL NULL DEFAULT 0,
  "duration" REAL NULL DEFAULT 0,
  "mode" TEXT NOT NULL DEFAULT '',
  "type" TEXT NOT NULL DEFAULT '',
  "person" INTEGER NOT NULL,
  "trip" INTEGER NOT NULL,
  "origin_id" INTEGER NOT NULL DEFAULT 0,
  "status" INTEGER NOT NULL DEFAULT 0,
  "plan_time" INTEGER NOT NULL DEFAULT 0,

  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

DELETED

-2

EMPTY

0

WORK_AT_HOME_ACTIVITY

1

AT_HOME_ACTIVITY

2

PRIMARY_WORK_ACTIVITY

3

OTHER_WORK_ACTIVITY

4

SCHOOL_ACTIVITY

5

MAJOR_SHOPPING_ACTIVITY

6

OTHER_SHOPPING_ACTIVITY

7

SERVICE_VEHICLE_ACTIVITY

8

HEALTHCARE_ACTIVITY

9

PERSONAL_BUSINESS_ACTIVITY

10

ERRANDS_ACTIVITY

11

PICK_UP_OR_DROP_OFF_ACTIVITY

12

EAT_OUT_ACTIVITY

13

RELIGIOUS_OR_CIVIC_ACTIVITY

14

LEISURE_ACTIVITY

15

RECREATION_ACTIVITY

16

SOCIAL_ACTIVITY

17

CHANGE_TRANSPORTATION_ACTIVITY

18

OTHER_ACTIVITY

22

PART_TIME_WORK_ACTIVITY

23

EV_CHARGING_ACTIVITY