Skip to content

CTRAMP Models

Pydantic data models for CT-RAMP (Coordinated Travel – Regional Activity Modeling Platform) output file formats. These models define the schema for the eleven tables produced by the CT-RAMP formatting pipeline step.

The schema is based on the MTC Data Dictionary for Travel Model One.

Purpose

Survey data formatted to this schema can be compared directly against CT-RAMP model output tables to assess model accuracy. Each model class below corresponds to one output CSV file:

Model class CT-RAMP wiki Description
HouseholdCTRAMPModel Household Household attributes: TAZ, income, autos, joint tour frequency
PersonCTRAMPModel Person Person attributes: type, activity pattern, tour frequencies
MandatoryLocationCTRAMPModel MandatoryLocation Usual work and school TAZ per person
IndividualTourCTRAMPModel IndividualTour Individual (non-joint) tour records
JointTourCTRAMPModel JointTour Jointly-made tour records
IndividualTripCTRAMPModel IndividualTrip Individual trip records (stops on individual tours)
JointTripCTRAMPModel JointTrip Joint trip records (stops on joint tours)

Model-only fields

Several fields in these models are populated only when running the travel demand model itself (e.g. random-number seeds, walk_subzone, auto_suff, value_of_time). When survey data is formatted to this schema these fields are null. See the CT-RAMP Formatting documentation for the full list.


data_canon.models.ctramp

Data models for CT-RAMP file formats.

Based on https://github.com/BayAreaMetro/modeling-website/wiki/DataDictionary

See Pipeline Steps > Format Output > CT-RAMP Format

HouseholdCTRAMPModel pydantic-model

Household results from Travel Model (CT-RAMP format).

Fields:

  • hh_id (int)
  • taz (int)
  • income (int | None)
  • autos (int)
  • jtf_choice (int)
  • size (int)
  • workers (int)
  • humanVehicles (int | None)
  • autonomousVehicles (int | None)
  • walk_subzone (WalkToTransitSubZone | None)
  • auto_suff (int | None)
  • wfh_choice (WFHChoice | None)
  • ao_rn (int | None)
  • fp_rn (int | None)
  • cdap_rn (int | None)
  • imtf_rn (int | None)
  • imtod_rn (int | None)
  • immc_rn (int | None)
  • jtf_rn (int | None)
  • jtl_rn (int | None)
  • jtod_rn (int | None)
  • jmc_rn (int | None)
  • inmtf_rn (int | None)
  • inmtl_rn (int | None)
  • inmtod_rn (int | None)
  • inmmc_rn (int | None)
  • awf_rn (int | None)
  • awl_rn (int | None)
  • awtod_rn (int | None)
  • awmc_rn (int | None)
  • stf_rn (int | None)
  • stl_rn (int | None)
  • sampleRate (float | None)
  • hh_weight (float | None)

humanVehicles pydantic-field

humanVehicles: int | None = None

Household automobiles, human-driven (New in TM1.5)

autonomousVehicles pydantic-field

autonomousVehicles: int | None = None

Household automobiles, autonomous (New in TM1.5)

sampleRate pydantic-field

sampleRate: float | None = None

This household represents 1/sampleRate households, calculate from weights as 1/weight

PersonCTRAMPModel pydantic-model

Person results from Travel Model (CT-RAMP format).

Fields:

Validators:

  • validate_person_type_from_label → type

sampleRate pydantic-field

sampleRate: float | None = None

This person represents 1/sampleRate persons, calculate from weights as 1/weight

MandatoryLocationCTRAMPModel pydantic-model

Mandatory tour locations from Travel Model (CT-RAMP format).

Fields:

HHID pydantic-field

HHID: int

Unique household ID number

HomeTAZ pydantic-field

HomeTAZ: int

Home transportation analysis zone

Income pydantic-field

Income: int | None = None

Annual household income ($2000)

PersonID pydantic-field

PersonID: int

Unique person ID number

PersonNum pydantic-field

PersonNum: int

Person number unique to the household

PersonType pydantic-field

PersonType: CTRAMPPersonType

Person lifestage/employment type (1=Full-time worker; 2=Part-time worker; 3=University student; 4=Nonworker; 5=Retired; 6=Student of non-driving age; 7=Student of driving age; 8=Child too young for school)

PersonAge pydantic-field

PersonAge: int

Person age

EmploymentCategory pydantic-field

EmploymentCategory: CTRAMPEmploymentCategory

Employment category derived from the BATS employment field. See format_persons for the full mapping from BATS employment values to CT-RAMP categories.

StudentCategory pydantic-field

StudentCategory: CTRAMPStudentCategory

Student category ("College or higher", "Grade or high school", "Not student")

WorkLocation pydantic-field

WorkLocation: int

Work location transportation analysis zone (1-1454, or 0 if no workplace is selected)

SchoolLocation pydantic-field

SchoolLocation: int

School location transportation analysis zone (1-1454, or 0 if no school is selected)

HomeSubZone pydantic-field

HomeSubZone: WalkToTransitSubZone | None = None

Walk to transit home sub-zone (0=cannot walk to transit; 1=short-walk; 2=long-walk)

SchoolSubZone pydantic-field

SchoolSubZone: WalkToTransitSubZone | None = None

Walk to transit school sub-zone (0=cannot walk to transit; 1=short-walk; 2=long-walk)

WorkSubZone pydantic-field

WorkSubZone: WalkToTransitSubZone | None = None

Walk to transit work sub-zone (0=cannot walk to transit; 1=short-walk; 2=long-walk)

IndividualTourCTRAMPModel pydantic-model

Individual tours from Travel Model (CT-RAMP format).

Fields:

atWork_freq pydantic-field

atWork_freq: int

Number of at work sub-tours (non-zero only for work tours)

sampleRate pydantic-field

sampleRate: float | None = None

This tour represents 1/sampleRate tours, calculate from weights as 1/weight

avAvailable pydantic-field

avAvailable: int | None = None

Autonomous vehicle available, added in Travel Model 1.5

dcLogsum pydantic-field

dcLogsum: float | None = None

To document, added in Travel Model 1.5

origTaxiWait pydantic-field

origTaxiWait: float | None = None

To document, added in Travel Model 1.5

destTaxiWait pydantic-field

destTaxiWait: float | None = None

To document, added in Travel Model 1.5

origSingleTNCWait pydantic-field

origSingleTNCWait: float | None = None

To document, added in Travel Model 1.5

destSingleTNCWait pydantic-field

destSingleTNCWait: float | None = None

To document, added in Travel Model 1.5

origSharedTNCWait pydantic-field

origSharedTNCWait: float | None = None

To document, added in Travel Model 1.5

destSharedTNCWait pydantic-field

destSharedTNCWait: float | None = None

To document, added in Travel Model 1.5

JointTourCTRAMPModel pydantic-model

Joint tours from Travel Model (CT-RAMP format).

Fields:

sampleRate pydantic-field

sampleRate: float | None = None

Per-tour sampling rate. NOT 1/joint_tour_weight: that weight is the sum over participants, and CT-RAMP re-applies the party multiplier itself. Derived as n_member_tours/joint_tour_weight (the inverse of the member mean).

IndividualTripCTRAMPModel pydantic-model

Individual trips from Travel Model (CT-RAMP format).

Fields:

sampleRate pydantic-field

sampleRate: float | None = None

This trip represents 1/sampleRate trips, calculate from weights as 1/weight

avAvailable pydantic-field

avAvailable: int | None = None

Does the household have an autonomous vehicle available for this tour?

taxiWait pydantic-field

taxiWait: float | None = None

TBD

singleTNCWait pydantic-field

singleTNCWait: float | None = None

TBD

sharedTNCWait pydantic-field

sharedTNCWait: float | None = None

TBD

JointTripCTRAMPModel pydantic-model

Joint trip results from Travel Model (CT-RAMP format).

Fields:

sampleRate pydantic-field

sampleRate: float | None = None

Per-person sampling rate. NOT 1/joint_trip_weight: that weight is the sum over participants, and CT-RAMP re-applies the party multiplier itself (num_participants/sampleRate in TM1 PrepAssign.job), so inverting the sum would count the party twice. Derived as n_member_trips/joint_trip_weight (the inverse of the member mean).