input_data module¶
- class input_data.ActivityData(label: str | None = None, group: str | None = None, location: Tuple | None = None, mode: str | None = None, activity_parameters: Dict | None = None, feasible_start: float | None = None, feasible_end: float | None = None, desired_start: float | None = None, desired_duration: float | None = None, desired_start_weekday: float | None = None, desired_duration_weekday: float | None = None, desired_start_weekend: float | None = None, desired_duration_weekend: float | None = None, act_id: int | Dict | None = None, desired_frequency: float | None = None, data: Dict | DataFrame | str | None = None, *args, **kwargs)[source]¶
Bases:
objectThis class stores the data related to an activity (type, location, mode, feasible times), and associated parameters (desired times, penalties).
Attributes:¶
label: unique label of the activity
group: activity type (does not need to be unique)
location: tuple of coordinates (must be an existing key in the travel time dictionary)
mode: mode of transportation (must be an existing key in the travel time dictionary)
feasible_start: feaible start time in hours
feasible_end: feasible end time in hours
desired_start: desired start time in hours
desired_duration: desired duration in hours
desired_start_weekdays: desired start time in hours (weekdays) - only defined for multiday simulation
desired_duration_weekdays: desired duration in hours (weekdays)- only defined for multiday simulation
desired_start_weekdays: desired start time in hours (weekends)- only defined for multiday simulation
desired_duration_weekdays: desired duration in hours (weekends)- only defined for multiday simulation
desired_frequency: desired activity frequency per week - only defined for multiday simulation
act_id: ID of the activity, should either be an integer or a dictionary mapping the activity type to an integer ID.
data: structure keeping the data. Can be a dictionary, a dataframe or a valid JSON string.
Methods:¶
read_from_pandas: instantiates class using data from pandas dataframe
read_from_dict: instantiates class using data from dictionary
add_parameters: add activity-specific parameters
- add_parameters(params: Dict) None[source]¶
Adds activity-specific parameters
- Parameters:
params (-) –