|
13 | 13 | get_time_windows,
|
14 | 14 | )
|
15 | 15 | from activitysim.core import chunk, expressions, simulate, tracing, workflow
|
16 |
| -from activitysim.core.configuration.base import PreprocessorSettings, PydanticReadable |
| 16 | +from activitysim.core.configuration.base import ( |
| 17 | + ComputeSettings, |
| 18 | + PreprocessorSettings, |
| 19 | + PydanticReadable, |
| 20 | +) |
17 | 21 | from activitysim.core.interaction_sample_simulate import _interaction_sample_simulate
|
18 | 22 | from activitysim.core.skim_dataset import SkimDataset
|
19 | 23 | from activitysim.core.skim_dictionary import SkimDict
|
@@ -223,6 +227,7 @@ def run_trip_scheduling_choice(
|
223 | 227 | skims,
|
224 | 228 | locals_dict: Mapping,
|
225 | 229 | trace_label: str,
|
| 230 | + model_settings: TripSchedulingChoiceSettings, |
226 | 231 | ):
|
227 | 232 | NUM_TOUR_LEGS = 3
|
228 | 233 | trace_label = tracing.extend_trace_label(trace_label, "interaction_sample_simulate")
|
@@ -296,6 +301,7 @@ def run_trip_scheduling_choice(
|
296 | 301 | trace_choice_name="trip_schedule_stage_1",
|
297 | 302 | estimator=None,
|
298 | 303 | chunk_sizer=chunk_sizer,
|
| 304 | + compute_settings=model_settings.compute_settings, |
299 | 305 | )
|
300 | 306 |
|
301 | 307 | assert len(choices.index) == len(choosers.index)
|
@@ -338,6 +344,9 @@ class TripSchedulingChoiceSettings(PydanticReadable, extra="forbid"):
|
338 | 344 | SPECIFICATION: str
|
339 | 345 | """file name of specification file"""
|
340 | 346 |
|
| 347 | + compute_settings: ComputeSettings = ComputeSettings() |
| 348 | + """Compute settings for this component.""" |
| 349 | + |
341 | 350 |
|
342 | 351 | @workflow.step
|
343 | 352 | def trip_scheduling_choice(
|
@@ -419,7 +428,13 @@ def trip_scheduling_choice(
|
419 | 428 | )
|
420 | 429 |
|
421 | 430 | tours_df = run_trip_scheduling_choice(
|
422 |
| - state, spec, tours_df, skims, locals_dict, trace_label |
| 431 | + state, |
| 432 | + spec, |
| 433 | + tours_df, |
| 434 | + skims, |
| 435 | + locals_dict, |
| 436 | + trace_label, |
| 437 | + model_settings, |
423 | 438 | )
|
424 | 439 |
|
425 | 440 | state.add_table("tours", tours_df)
|
0 commit comments