Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
c3fe3f1
update larch pin to 6.0.46 and all dependabot changes
jpn-- Mar 13, 2026
67f4e19
Merge pull request #1054 from driftlesslabs/update-depends
jpn-- Mar 17, 2026
5c506f1
np array instead of for loop
janzill Mar 19, 2026
710b3b0
memory reduction
janzill Mar 19, 2026
60a744a
no duplicate arrays
janzill Mar 19, 2026
f97185e
bug fix: order of chooser_idx in interaction_simulate
janzill Mar 19, 2026
9d69dab
add tests, docstrings for logit
tomstephen Mar 16, 2026
a9db131
Add basic with/without EET test for interaction simulate
tomstephen Mar 17, 2026
a7f2e8f
Fix, complete tests for interaction sample, simulate
tomstephen Mar 18, 2026
df574ee
Linting
tomstephen Mar 18, 2026
cf92aad
Normalise number of choosers, alternatives and minimum tolerance for …
tomstephen Mar 18, 2026
73f45fe
reshape, do not flatten for potential performance
janzill Mar 19, 2026
6440d3f
undo stray comment
janzill Mar 19, 2026
1df7d0d
unify mc and eet reporting during choice making
janzill Mar 19, 2026
5e9847d
series not array
janzill Mar 19, 2026
1213b56
reinstate test, up number of draws for comparison
janzill Mar 19, 2026
fa54204
numpy not loop
janzill Mar 19, 2026
1b2b6dc
interaction_sample test to catch index order bug
janzill Mar 19, 2026
78d8297
Add global option to skip households on simulation failure (#1023)
i-am-sijia Mar 19, 2026
4e0c7e8
make test clearer
janzill Mar 20, 2026
1aa85ba
reset rng offset on iterate_location_choice (shadow pricing)
janzill Mar 22, 2026
bd4211f
Add tests for logit NL, ordering, and all models using EET
tomstephen Mar 23, 2026
76cacb2
Add basic docs for EET
tomstephen Mar 23, 2026
f628505
Add tests checking that choices made using eet and from probabilities…
TylerP132 Mar 23, 2026
362eef0
Linting, minor changes to test_simulate.py
tomstephen Mar 23, 2026
d0a6429
roll back changes to core tests to minimize noise
janzill Mar 26, 2026
65fd171
Implement Jan's suggestion of how to calculate household ids for test…
TylerP132 Mar 30, 2026
f55b2cd
Add test for compute_nested_utilities. Computes nested utilities on a…
TylerP132 Mar 31, 2026
4debaad
Linting
tomstephen Mar 31, 2026
743c56f
Move nest_spec to a fixture in simulate.py tests
TylerP132 Mar 31, 2026
b62001e
Merge with Tom's linting changes
TylerP132 Mar 31, 2026
b021cee
Finish removing nest_spec definition in simulate.py tests
TylerP132 Mar 31, 2026
52f75fa
Merge pull request #5 from outerl/tom/nested-logit-tests-and-docs
janzill Mar 31, 2026
ae71433
lint
janzill Mar 31, 2026
6ef25e1
clean up
janzill Mar 31, 2026
d491e45
Merge branch 'jzill/runtime_improvement' into jzill/reset_rng_on_shad…
janzill Mar 31, 2026
cc8fda0
reset rng only for eet for now. discuss in engineering meeting
janzill Mar 31, 2026
c1806fc
Close out remaining TODO-EETs
tomstephen Mar 31, 2026
3270474
Shuffle check to logit.py
tomstephen Mar 31, 2026
dd54711
Linting
tomstephen Mar 31, 2026
a73f6ea
Fix test
tomstephen Mar 31, 2026
b455e2a
Roll back validate_utils
tomstephen Mar 31, 2026
a490999
eet doco start
janzill Mar 31, 2026
661c6b3
doco part two
janzill Mar 31, 2026
a0bc5ba
Merge branch 'jzill/runtime_improvement' of github.com:outerl/activit…
janzill Mar 31, 2026
40b0b06
add scale comment
janzill Mar 31, 2026
21daa5c
Revert linting changes
tomstephen Apr 1, 2026
0da80bf
.
tomstephen Apr 1, 2026
1d139e0
Fix failing tests
tomstephen Apr 2, 2026
605366f
doc fix
janzill Apr 2, 2026
8c74d2a
docs
janzill Apr 2, 2026
f542e58
doco clean up
janzill Apr 2, 2026
2d1dbcb
doco re memory
janzill Apr 2, 2026
837ae41
doco clean up
janzill Apr 2, 2026
d674268
memory usage doco
janzill Apr 2, 2026
7959c94
clean up doco
janzill Apr 2, 2026
a7e8529
undo changes in unrelated code to reduce noise
janzill Apr 2, 2026
82cbefd
Added instructions for installing specific ActivitySim versions (#1055)
JoeJimFlood Apr 2, 2026
c5bd23f
Merge pull request #3 from outerl/jzill/runtime_improvement
janzill Apr 2, 2026
be3a270
testing for semcog model, update to shadow pricing reset
janzill Apr 2, 2026
7209985
lint
janzill Apr 2, 2026
22a4f62
disable test unitl further investigation
janzill Apr 2, 2026
220c5cf
mp rng reset, disabling one new test for no
janzill Apr 3, 2026
d50ad3c
semcog test with different seed for eet mp to work around non-determi…
janzill Apr 3, 2026
d5a8fd4
no need to restrict to specific choosers for reset, each process has …
janzill Apr 3, 2026
033f08a
Add eet multiple zone test for zone=2
TylerP132 Apr 7, 2026
f5b6301
Change formatting from using ruff to black
TylerP132 Apr 7, 2026
5b24d44
add back accidentally removed import
janzill Apr 7, 2026
9661d01
re-add 3-zone tests
janzill Apr 7, 2026
7c96cbc
base seed same as non-eet, update regress eet data
janzill Apr 7, 2026
c786919
progressive 2 zone test
janzill Apr 7, 2026
08b2b03
Merge pull request #6 from outerl/explicit_error_terms-multiple_zone_…
janzill Apr 8, 2026
0d2356e
Copy changes from m-richards:matt/poisson_eet_2026_04
tomstephen Apr 9, 2026
89dbe5c
Tidy, complete implementation of alts_context, add tests, rebuild reg…
tomstephen Apr 9, 2026
47ed600
Commenting/fix alts context constructions, update semcog test
tomstephen Apr 9, 2026
2d181b2
Deterministic randoms when adding/removing tours for trip scheduling …
tomstephen Apr 10, 2026
cfe6166
PR noise
tomstephen Apr 10, 2026
7a22612
Roll back final_trips.csv for production_semcog
tomstephen Apr 10, 2026
bc56a87
PR noise, make sure alts_context built on un-modified alternatives in…
tomstephen Apr 10, 2026
531b562
linting
tomstephen Apr 10, 2026
19750a0
updates outdated comment
janzill Apr 10, 2026
834fc90
re-add arc test, remove parking choice column from regress trips
janzill Apr 10, 2026
6d29f18
re-instate arc tests
janzill Apr 11, 2026
12a3d8a
Revert "Deterministic randoms when adding/removing tours for trip sch…
janzill Apr 11, 2026
3bd3251
no alts_context for trip_scheduling
janzill Apr 11, 2026
8d7ae41
updates arc regress files
janzill Apr 11, 2026
f2d7bfa
removes outdated comment
janzill Apr 11, 2026
d7c1345
trip scheduling comment for EET
janzill Apr 11, 2026
e9fb130
disable arc sharrow test until regress trips are updated
janzill Apr 11, 2026
10db123
doco update
janzill Apr 11, 2026
fcef6b3
Merge pull request #7 from outerl/deterministic-alt-sample-randoms
janzill Apr 11, 2026
4df74d0
Lower default threshold for skipped failed choices to 0.1% (#1063)
i-am-sijia Apr 11, 2026
1e9f26c
Matt's Poisson sampling changes from PR 1065
janzill Apr 11, 2026
3bde470
bug fix
janzill Apr 12, 2026
346f0e8
add second return arg for zero probs as well
janzill Apr 12, 2026
90c8290
Remove Three Zone Code and Examples (#1056)
dhensle Apr 16, 2026
3d4433f
finish removing 3 zone (#1072)
jpn-- Apr 29, 2026
32a2662
eet for nested logit
janzill May 6, 2026
e0dbad8
towards a unified choice interface
janzill May 6, 2026
e944d1e
test and doco updates
janzill May 6, 2026
968da57
jtp fix
janzill May 6, 2026
04b2a28
fused location sampling
janzill May 6, 2026
8f0ae70
c order to map the first n_alt rands to all alternatives for the firs…
janzill May 6, 2026
510c6ab
fused mnl ev1 argmax with alt_info
janzill May 6, 2026
3ae81fa
stable sampling
janzill May 6, 2026
cb0c5d4
some doco updates
janzill May 6, 2026
bd762c8
doc clean up
janzill May 6, 2026
acaa22a
Merge remote-tracking branch 'origin/jzill/eet_poisson_sampling_from_…
janzill May 6, 2026
248defd
poisson sample tests and runtime improvements
janzill May 10, 2026
cfdd7da
tests for random sampling as fallback, some doc strings and removal o…
janzill May 11, 2026
ee3c429
avoid unneccessary dataframe construction, better doco
janzill May 11, 2026
68faa94
update interaction sample tests for poisson
janzill May 11, 2026
73d83e6
integration of sampling methods with clear separation from eet as sim…
janzill May 11, 2026
e8fb1d7
poisson sampling optimization
janzill May 11, 2026
ccd5098
poisson sampling with stable rands across scenarios where attractions…
janzill May 11, 2026
fecb26d
do not throw on poisson fallback sampling with sample_size > alternat…
janzill May 11, 2026
0cb9289
debug logging
janzill May 11, 2026
3c4a3b1
clean up
janzill May 12, 2026
e4e415a
sampling doco
janzill May 12, 2026
b7b1d90
clean up
janzill May 12, 2026
bf24aa5
doco update
janzill May 12, 2026
067448c
linting
janzill May 12, 2026
1f731ca
razzmatazz. I mean maz for taz.
janzill May 12, 2026
7731971
test fixes and stable sorting for tour/trip loc choice
janzill May 12, 2026
480c8ad
no stable alts for MC
janzill May 12, 2026
c8470ec
lint
janzill May 12, 2026
a77cbec
stable two-zone maz_from_taz for Poisson
janzill May 13, 2026
e91e566
more doco
janzill May 13, 2026
a6ff459
no op if no alts_context
janzill May 13, 2026
7aaeb1b
do not throw on interaction_sample_simulate w/o alts_context
janzill May 13, 2026
e9a2813
eet special casing
janzill May 13, 2026
6d0a24e
tour_od with maz_taz stable, clean up
janzill May 13, 2026
5b0c79e
arc eet golden trips
janzill May 13, 2026
429f954
Merge branch 'jzill/eet_runtime_inc_nl_and_poisson' of github.com:out…
janzill May 13, 2026
5c961b7
switch base seed to avoid trip_scheduling (probabilistic) to come up …
janzill May 13, 2026
a325f45
forgot the corresponding golden trips
janzill May 13, 2026
4fcd239
test multiple_zone golden
janzill May 14, 2026
8933d6c
removes requirement of interaction_sample_simulate to have alts_context
janzill May 14, 2026
270d450
fix test by using eet as intended, remove stable_indexing in tour_des…
janzill May 14, 2026
01b38c7
clean up
janzill May 14, 2026
4b78e20
conditional stable sample indexes
janzill May 14, 2026
ae278cc
stable alts only for eet with poisson sampling for two-zone
janzill May 14, 2026
de74dfc
trip maz-for-taz stable alts for eet with poisson sampling
janzill May 14, 2026
77b80b3
clean up
janzill May 14, 2026
bdfe757
stable two-zone alts for tour_od
janzill May 14, 2026
67fd055
tour_od stable alt cond
janzill May 14, 2026
249acfa
resolve_smapling_method
janzill May 14, 2026
3ebe20c
decouple sample and simulation methods
janzill May 18, 2026
dc52907
separate RNG for shadow pricing to enable loc choiec rng reset for si…
janzill May 18, 2026
d58d0c5
lint
janzill May 18, 2026
7f68160
logging and comments
janzill May 18, 2026
e6b75ea
debug logging for sample method, add warning for disagg acc and poisson
janzill May 20, 2026
4803032
doco
janzill May 20, 2026
d11f2be
info, nto warning
janzill May 20, 2026
7b7170b
compute settings, not model settings
janzill May 20, 2026
b844372
compute settings, not model settings
janzill May 20, 2026
196704a
variable name
janzill May 20, 2026
1567d5f
Merge pull request #8 from outerl/jzill/eet_runtime_inc_nl_and_poisson
janzill May 21, 2026
279e4f9
use all TAZs when using sharrow (#1027)
jpn-- May 28, 2026
99239c2
log log on subset of rands only
janzill May 29, 2026
7768547
optionally bias poisson disagg acc
janzill May 29, 2026
aa13d2d
bias also for non-mand
janzill May 29, 2026
95c1058
avoid copy in favour of log log for gumbel choice
janzill May 31, 2026
82cd511
switch to bias all location choice logsums for poisson sampling
janzill May 31, 2026
5bfd4b3
add setting
janzill May 31, 2026
7424aec
adds missing import in trip dest
janzill May 31, 2026
0f2ddbd
adds missing import in trip dest
janzill May 31, 2026
3d6f1db
ling
janzill May 31, 2026
57156aa
Merge pull request #9 from outerl/jzill/eet_cleanup
janzill May 31, 2026
979337b
addresses claude code review
janzill Jun 9, 2026
bf80d5a
Remove Sample Rate Rounding (#1073)
i-am-sijia Jun 11, 2026
3bcc811
Speed Up Nearest Zone Calculation in Disaggregate Accessibilities (#1…
dhensle Jun 22, 2026
a57e78a
consistent spelling
janzill Jun 27, 2026
ac2adf3
mal-formed html comment
janzill Jun 27, 2026
d3b64ba
doc ref
janzill Jun 27, 2026
9a10edb
addresses copilot code review
janzill Jun 27, 2026
05452ec
remove try block
janzill Jun 27, 2026
c226928
clean up
janzill Jun 27, 2026
a93da9c
logit clean up
janzill Jun 27, 2026
28b4011
clean up
janzill Jun 27, 2026
82b208f
lint
janzill Jun 27, 2026
a859214
estimation safe guard only for poisson
janzill Jun 27, 2026
1cc0ce5
merge origin/main
janzill Jun 27, 2026
ecb3131
deletes arc test as discussed in engineering meeting in June
janzill Jun 27, 2026
d439c7f
adding skip_failed_choices into test, removing dead function parameter
janzill Jun 27, 2026
c93d307
fix eet trip_dest presample test
janzill Jun 27, 2026
fa5b1b7
Merge pull request #10 from outerl/jzill/eet_llm_review
janzill Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions .github/workflows/core_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ jobs:

- run: uv run pytest test/test_skim_name_conflicts.py
- run: uv run pytest test/random_seed/test_random_seed.py
- run: uv run pytest test/skip_failed_choices/test_skip_failed_choices.py
- run: uv run pytest test/trace_id/test_trace_id.py

builtin_regional_models:
Expand All @@ -142,9 +143,7 @@ jobs:
region:
- prototype_mtc
- placeholder_psrc
- prototype_marin
- prototype_mtc_extended
- prototype_sandag_xborder
- production_semcog
- prototype_mwcog
- placeholder_multiple_zone
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
rev: 22.6.0
hooks:
- id: black
language_version: python3.13
language_version: python3.12
# explicitly set the Python version for the hook environment for black,
# as older versions of black don't work with the latest Python.

Expand Down
1 change: 0 additions & 1 deletion activitysim/abm/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
disaggregate_accessibility,
free_parking,
initialize,
initialize_los,
initialize_tours,
input_checker,
joint_tour_composition,
Expand Down
3 changes: 0 additions & 3 deletions activitysim/abm/models/accessibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,6 @@ def compute_accessibilities_for_zones(
locals_d["skim_od"] = skim_dict.wrap("orig", "dest").set_df(od_df)
locals_d["skim_do"] = skim_dict.wrap("dest", "orig").set_df(od_df)

if network_los.zone_system == los.THREE_ZONE:
locals_d["tvpb"] = network_los.tvpb

logger.info(f"{trace_label}: assign.assign_variables")
results, trace_results, trace_assigned_locals = assign.assign_variables(
state,
Expand Down
58 changes: 0 additions & 58 deletions activitysim/abm/models/atwork_subtour_mode_choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,38 +97,6 @@ def atwork_subtour_mode_choice(
"in_time_col_name": in_time_col_name,
}

if network_los.zone_system == los.THREE_ZONE:
# fixme - is this a lightweight object?
tvpb = network_los.tvpb

tvpb_logsum_odt = tvpb.wrap_logsum(
orig_key=orig_col_name,
dest_key=dest_col_name,
tod_key="out_period",
segment_key="demographic_segment",
cache_choices=True,
trace_label=trace_label,
tag="tvpb_logsum_odt",
)
tvpb_logsum_dot = tvpb.wrap_logsum(
orig_key=dest_col_name,
dest_key=orig_col_name,
tod_key="in_period",
segment_key="demographic_segment",
cache_choices=True,
trace_label=trace_label,
tag="tvpb_logsum_dot",
)

skims.update(
{"tvpb_logsum_odt": tvpb_logsum_odt, "tvpb_logsum_dot": tvpb_logsum_dot}
)

# TVPB constants can appear in expressions
constants.update(
network_los.setting("TVPB_SETTINGS.tour_mode_choice.CONSTANTS")
)

estimator = estimation.manager.begin_estimation(state, "atwork_subtour_mode_choice")
if estimator:
estimator.write_coefficients(model_settings=model_settings)
Expand All @@ -152,32 +120,6 @@ def atwork_subtour_mode_choice(
trace_choice_name="tour_mode_choice",
)

# add cached tvpb_logsum tap choices for modes specified in tvpb_mode_path_types
if network_los.zone_system == los.THREE_ZONE:
tvpb_mode_path_types = model_settings.tvpb_mode_path_types
for mode, path_types in tvpb_mode_path_types.items():
for direction, skim in zip(
["od", "do"], [tvpb_logsum_odt, tvpb_logsum_dot]
):
path_type = path_types[direction]
skim_cache = skim.cache[path_type]

print(f"mode {mode} direction {direction} path_type {path_type}")

for c in skim_cache:
dest_col = f"{direction}_{c}"

if dest_col not in choices_df:
choices_df[dest_col] = (
np.nan
if pd.api.types.is_numeric_dtype(skim_cache[c])
else ""
)

choices_df[dest_col].where(
choices_df.tour_mode != mode, skim_cache[c], inplace=True
)

if estimator:
estimator.write_choices(choices_df[mode_column_name])
choices_df[mode_column_name] = estimator.get_survey_values(
Expand Down
16 changes: 14 additions & 2 deletions activitysim/abm/models/disaggregate_accessibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
from activitysim.abm.tables import shadow_pricing
from activitysim.core import estimation, los, tracing, util, workflow
from activitysim.core.configuration.base import (
ComputeSettings,
PreprocessorSettings,
PydanticReadable,
ComputeSettings,
)
from activitysim.core.configuration.logit import TourLocationComponentSettings
from activitysim.core.expressions import assign_columns
Expand Down Expand Up @@ -653,6 +653,8 @@ def create_proto_pop(self):
households.name, persons.name, tours.name = klist

# Create hhid
# the households dataframe created by generate_replicates above is indexed by a
# simple zero-based RangeIndex, so we will create new ID's by adding 1.
households[hhid] = households.index + 1
households["household_serial_no"] = households[hhid]

Expand All @@ -664,8 +666,14 @@ def create_proto_pop(self):
.set_index("index")
.rename(columns={"hhid": hhid})
)
# NOTE: in order to get a stable and reproducible sort of persons here,
# the sort keys need to be given all in a single sort command. This code
# originally sorted the join (to in theory get all the persons joined in
# order, then sorted again by hhid to get the households order, but this
# does not guarantee that the persons stay in order, and sorting implementations
# can and do vary by platform and dependency version.
persons = (
rep.join(persons, sort=True).sort_values(hhid).reset_index(drop=True)
rep.join(persons).sort_values([hhid, "index"]).reset_index(drop=True)
)
persons[perid] = persons.index + 1

Expand All @@ -674,6 +682,10 @@ def create_proto_pop(self):
tours = tours.merge(
persons[[pkey, hhid, perid]], left_on=tkey, right_on=pkey
)
# We sort tours on the three keys, then drop the index (which is just a row number but scrambled),
# then set the tour id, based on the sorted row number. This is to ensure that the tour ids are
# assigned in a stable way that is not dependent on the order of the merge.
tours = tours.sort_values([hhid, perid, tkey]).reset_index(drop=True)
tours.index = tours.index.set_names([tourid])
tours.index += 1
tours = tours.reset_index().drop(columns=[pkey])
Expand Down
Loading
Loading