Trip Purpose and Destination#

After running trip purpose and trip destination separately, the two model can be ran together in an iterative fashion on the remaining failed trips (i.e. trips that cannot be assigned a destination). Each iteration uses new random numbers.

The main interface to the trip purpose model is the trip_purpose_and_destination function. This function is registered as an Inject step in the example Pipeline.

Structure#

  • Core Table: trips

  • Result Field: purpose, destination

  • Skims Keys: origin, (tour primary) destination, dest_taz, trip_period

Configuration#

settings activitysim.abm.models.trip_purpose_and_destination.TripPurposeAndDestinationSettings#

Bases: PydanticReadable

Settings for the trip_purpose_and_destination component.

Fields:
field MAX_ITERATIONS: int = 5#

Setting for the maximum iterations

Examples#

Implementation#

activitysim.abm.models.trip_purpose_and_destination.trip_purpose_and_destination(state: State, trips: DataFrame, tours_merged: DataFrame, model_settings: Optional[TripPurposeAndDestinationSettings] = None, model_settings_file_name: str = 'trip_purpose_and_destination.yaml', trace_label: str = 'trip_purpose_and_destination') None#