|
15 | 15 | from activitysim.abm.models.util import tour_destination |
16 | 16 | from activitysim.abm.tables import shadow_pricing |
17 | 17 | from activitysim.core import estimation, los, tracing, util, workflow |
18 | | -from activitysim.core.configuration.base import PreprocessorSettings, PydanticReadable |
| 18 | +from activitysim.core.configuration.base import PreprocessorSettings, PydanticReadable, ComputeSettings |
19 | 19 | from activitysim.core.configuration.logit import TourLocationComponentSettings |
20 | 20 | from activitysim.core.expressions import assign_columns |
21 | 21 |
|
@@ -75,8 +75,7 @@ class DisaggregateAccessibilityAnnotateSettings(PydanticReadable, extra="forbid" |
75 | 75 | annotate: PreprocessorSettings |
76 | 76 |
|
77 | 77 |
|
78 | | -# TODO-EET: add eet override for SOA MC sampling |
79 | | -class DisaggregateAccessibilitySettings(PydanticReadable): # , extra="forbid") |
| 78 | +class DisaggregateAccessibilitySettings(PydanticReadable, extra="forbid"): |
80 | 79 | suffixes: DisaggregateAccessibilitySuffixes = DisaggregateAccessibilitySuffixes() |
81 | 80 | ORIGIN_SAMPLE_SIZE: float | int = 0 |
82 | 81 | """ |
@@ -185,6 +184,8 @@ class DisaggregateAccessibilitySettings(PydanticReadable): # , extra="forbid") |
185 | 184 | If not supplied or None, will default to the chunk size in the location choice model settings. |
186 | 185 | """ |
187 | 186 |
|
| 187 | + compute_settings: ComputeSettings | None = None |
| 188 | + |
188 | 189 |
|
189 | 190 | def read_disaggregate_accessibility_yaml( |
190 | 191 | state: workflow.State, file_name |
@@ -770,6 +771,11 @@ def get_disaggregate_logsums( |
770 | 771 | if disagg_model_settings.explicit_chunk is not None: |
771 | 772 | model_settings.explicit_chunk = disagg_model_settings.explicit_chunk |
772 | 773 |
|
| 774 | + # Can set compute settings for disaggregate accessibility |
| 775 | + # Otherwise this will be set to whatever is in the location model settings |
| 776 | + if disagg_model_settings.compute_settings is not None: |
| 777 | + model_settings.compute_settings = disagg_model_settings.compute_settings |
| 778 | + |
773 | 779 | # Include the suffix tags to pass onto downstream logsum models (e.g., tour mode choice) |
774 | 780 | if model_settings.LOGSUM_SETTINGS: |
775 | 781 | suffixes = util.concat_suffix_dict(disagg_model_settings.suffixes) |
|
0 commit comments