Skip to content

Commit 6c1fc02

Browse files
authored
Merge pull request #1 from SANDAG/BayDAG
Create BayDAG branch in sync with SANDAG's BayDAG branch
2 parents 3df695b + 452b841 commit 6c1fc02

File tree

135 files changed

+11978
-303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+11978
-303
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,4 @@ _test_est
7272
*_local/
7373
*_local.*
7474

75+
**/output/

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
- stage: Examples
2222
name: "MTC Example"
2323
env: TEST_SUITE=activitysim/examples/example_mtc/test
24+
- name: "MTC Extended Example"
25+
env: TEST_SUITE=activitysim/examples/example_mtc_extended/test
2426
- name: "Multizone Example"
2527
env: TEST_SUITE=activitysim/examples/example_multiple_zone/test
2628
- name: "Marin Example"

LICENSE.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
BSD 3-Clause License
22

3-
Copyright (c) After March 2016, Contributing Authors
4-
Copyright (c) Before March 2016, UrbanSim Inc
3+
Copyright (c) Association of Metropolitan Planning Organizations Research Foundation
4+
55
All rights reserved.
66

77
Redistribution and use in source and binary forms, with or without

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ActivitySim
22
===========
33

4-
[![Build Status](https://travis-ci.org/ActivitySim/activitysim.svg?branch=master)](https://travis-ci.org/ActivitySim/activitysim)[![Coverage Status](https://coveralls.io/repos/github/ActivitySim/activitysim/badge.svg?branch=master)](https://coveralls.io/github/ActivitySim/activitysim?branch=master)
4+
[![Build Status](https://travis-ci.com/ActivitySim/activitysim.svg?branch=master)](https://travis-ci.org/github/ActivitySim/activitysim)[![Coverage Status](https://coveralls.io/repos/github/ActivitySim/activitysim/badge.svg?branch=master)](https://coveralls.io/github/ActivitySim/activitysim?branch=master)
55

66
The mission of the ActivitySim project is to create and maintain advanced, open-source,
77
activity-based travel behavior modeling software based on best software development
@@ -15,4 +15,4 @@ and benefit from contributions of other agency partners.
1515

1616
## Documentation
1717

18-
https://activitysim.github.io/activitysim
18+
https://activitysim.github.io/activitysim

activitysim/abm/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,5 @@
3636
from . import trip_scheduling_choice
3737
from . import trip_matrices
3838
from . import summarize
39+
from . import vehicle_allocation
40+
from . import vehicle_type_choice

activitysim/abm/models/accessibility.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def compute_accessibilities_for_zones(
5252
trace_od_rows = None
5353

5454
# merge land_use_columns into od_df
55+
logger.info(f"{trace_label}: merge land_use_columns into od_df")
5556
od_df = pd.merge(od_df, land_use_df, left_on='dest', right_index=True).sort_index()
5657
chunk.log_df(trace_label, "od_df", od_df)
5758

@@ -69,11 +70,13 @@ def compute_accessibilities_for_zones(
6970
if network_los.zone_system == los.THREE_ZONE:
7071
locals_d['tvpb'] = network_los.tvpb
7172

73+
logger.info(f"{trace_label}: assign.assign_variables")
7274
results, trace_results, trace_assigned_locals \
7375
= assign.assign_variables(assignment_spec, od_df, locals_d,
7476
trace_rows=trace_od_rows, trace_label=trace_label, chunk_log=True)
7577

7678
chunk.log_df(trace_label, "results", results)
79+
logger.info(f"{trace_label}: have results")
7780

7881
# accessibility_df = accessibility_df.copy()
7982
for column in results.columns:

activitysim/abm/models/atwork_subtour_mode_choice.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from activitysim.core import inject
1111
from activitysim.core import pipeline
1212
from activitysim.core import simulate
13+
from activitysim.core import expressions
1314

1415
from activitysim.core import los
1516
from activitysim.core.pathbuilder import TransitVirtualPathBuilder
@@ -166,6 +167,15 @@ def atwork_subtour_mode_choice(
166167
assign_in_place(tours, choices_df)
167168
pipeline.replace_table("tours", tours)
168169

170+
# - annotate tours table
171+
if model_settings.get('annotate_tours'):
172+
tours = inject.get_table('tours').to_frame()
173+
expressions.assign_columns(
174+
df=tours,
175+
model_settings=model_settings.get('annotate_tours'),
176+
trace_label=tracing.extend_trace_label(trace_label, 'annotate_tours'))
177+
pipeline.replace_table("tours", tours)
178+
169179
if trace_hh_id:
170180
tracing.trace_df(tours[tours.tour_category == 'atwork'],
171181
label=tracing.extend_trace_label(trace_label, mode_column_name),

activitysim/abm/models/initialize.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,11 @@ def preload_injectables():
184184

185185
t0 = tracing.print_elapsed_time()
186186

187-
# FIXME - still want to do this?
188-
# if inject.get_injectable('skim_dict', None) is not None:
189-
# t0 = tracing.print_elapsed_time("preload skim_dict", t0, debug=True)
190-
#
191-
# if inject.get_injectable('skim_stack', None) is not None:
192-
# t0 = tracing.print_elapsed_time("preload skim_stack", t0, debug=True)
187+
if config.setting('benchmarking', False):
188+
# we don't want to pay for skim_dict inside any model component during
189+
# benchmarking, so we'll preload skim_dict here. Preloading is not needed
190+
# for regular operation, as activitysim components can load-on-demand.
191+
if inject.get_injectable('skim_dict', None) is not None:
192+
t0 = tracing.print_elapsed_time("preload skim_dict", t0, debug=True)
193193

194194
return True

activitysim/abm/models/location_choice.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,10 @@ def workplace_location(
886886
# if multiprocessing.current_process().name =='mp_households_0':
887887
# raise RuntimeError(f"fake fail {process_name}")
888888

889+
# disable locutor for benchmarking
890+
if config.setting('benchmarking', False):
891+
locutor = False
892+
889893
iterate_location_choice(
890894
model_settings,
891895
persons_merged, persons, households,
@@ -917,6 +921,10 @@ def school_location(
917921
if estimator:
918922
write_estimation_specs(estimator, model_settings, 'school_location.yaml')
919923

924+
# disable locutor for benchmarking
925+
if config.setting('benchmarking', False):
926+
locutor = False
927+
920928
iterate_location_choice(
921929
model_settings,
922930
persons_merged, persons, households,

0 commit comments

Comments
 (0)