diff --git a/activitysim/abm/models/cdap.py b/activitysim/abm/models/cdap.py index 4220521e4..d9449f3a3 100644 --- a/activitysim/abm/models/cdap.py +++ b/activitysim/abm/models/cdap.py @@ -29,15 +29,7 @@ class CdapSettings(PydanticReadable, extra="forbid"): INTERACTION_COEFFICIENTS: str = "cdap_interaction_coefficients.csv" FIXED_RELATIVE_PROPORTIONS_SPEC: str = "cdap_fixed_relative_proportions.csv" ADD_JOINT_TOUR_UTILITY: bool = False - """ - If True, add joint tour utility to CDAP model. - """ - JOINT_TOUR_COEFFICIENTS: str = "cdap_joint_tour_coefficients.csv" - """ - If ADD_JOINT_TOUR_UTILITY is True, this is the name of the coefficients file - for the joint tour utility spec. - """ annotate_persons: PreprocessorSettings | None = None annotate_households: PreprocessorSettings | None = None COEFFICIENTS: Path diff --git a/activitysim/abm/models/disaggregate_accessibility.py b/activitysim/abm/models/disaggregate_accessibility.py index 9f14e4045..ab4f9acef 100644 --- a/activitysim/abm/models/disaggregate_accessibility.py +++ b/activitysim/abm/models/disaggregate_accessibility.py @@ -24,10 +24,6 @@ class DisaggregateAccessibilitySuffixes(PydanticReadable): SUFFIX: str = "proto_" - """ - Suffix to append to the proto-population tables. - """ - ROOTS: list[str] = [ "persons", "households", @@ -37,9 +33,6 @@ class DisaggregateAccessibilitySuffixes(PydanticReadable): "household_id", "tour_id", ] - """ - The roots of the proto-population tables. - """ class DisaggregateAccessibilityTableSettings(PydanticReadable, extra="forbid"): @@ -498,7 +491,7 @@ def read_table_settings(self): return params - def generate_replicates(self, table_name: str): + def generate_replicates(self, table_name): """ Generates replicates finding the cartesian product of the non-mapped field variables. The mapped fields are then annotated after replication @@ -595,10 +588,7 @@ def expand_template_zones(self, tables): return [x for x in proto_tables.values()] - def create_proto_pop(self) -> None: - """ - Creates the proto-population tables. - """ + def create_proto_pop(self): # Separate out the mapped data from the varying data and create base replicate tables klist = ["proto_households", "proto_persons", "proto_tours"] @@ -668,14 +658,7 @@ def create_proto_pop(self) -> None: if len(colnames) > 0: df.rename(columns=colnames, inplace=True) - def inject_tables(self, state: workflow.State) -> None: - """ - Injects the proto-population tables into the pipeline. - - Parameters - ---------- - state : workflow.State - """ + def inject_tables(self, state: workflow.State): # Update canonical tables lists state.tracing.traceable_tables = state.tracing.traceable_tables + list( self.proto_pop.keys() @@ -685,14 +668,7 @@ def inject_tables(self, state: workflow.State) -> None: self.state.get_rn_generator().add_channel(tablename, df) state.tracing.register_traceable_table(tablename, df) - def annotate_tables(self, state: workflow.State) -> None: - """ - Annotates the proto-population tables with additional fields. - - Parameters - ---------- - state : workflow.State - """ + def annotate_tables(self, state: workflow.State): # Extract annotations for annot in self.model_settings.annotate_proto_tables: tablename = annot.tablename @@ -710,10 +686,7 @@ def annotate_tables(self, state: workflow.State) -> None: ) self.state.add_table(tablename, df) - def merge_persons(self) -> None: - """ - Merges the proto-population households into the persons. - """ + def merge_persons(self): persons = self.state.get_dataframe("proto_persons") households = self.state.get_dataframe("proto_households") @@ -740,21 +713,6 @@ def merge_persons(self) -> None: def get_disaggregate_logsums( state: workflow.State, network_los: los.Network_LOS, chunk_size: int, trace_hh_id ): - """ - Get disaggregate logsums for workplace, school, and non-mandatory tour destinations. - - Parameters - ---------- - state : workflow.State - network_los : los.Network_LOS - chunk_size : int - trace_hh_id : int, optional - - Returns - ------- - logsums : dict - Dictionary of logsums for each of the three destination types. - """ logsums = {} persons_merged = state.get_dataframe("proto_persons_merged").sort_index( inplace=False