input_data module¶
- class input_data.ActivityData(label: Optional[str] = None, group: Optional[str] = None, location: Optional[Tuple] = None, mode: Optional[str] = None, activity_parameters: Optional[Dict] = None, feasible_start: Optional[float] = None, feasible_end: Optional[float] = None, desired_start: Optional[float] = None, desired_duration: Optional[float] = None, desired_start_weekday: Optional[float] = None, desired_duration_weekday: Optional[float] = None, desired_start_weekend: Optional[float] = None, desired_duration_weekend: Optional[float] = None, act_id: Optional[Union[int, Dict]] = None, desired_frequency: Optional[float] = None, data: Optional[Union[Dict, DataFrame, str]] = None, *args, **kwargs)[source]¶
Bases:
object
This class stores the data related to an activity (type, location, mode, feasible times), and associated parameters (desired times, penalties).
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.
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 (-) –