Skip to content

Commit 7ddebde

Browse files
committed
Merge branch 'extended' of https://github.com/ActivitySim/activitysim-prototype-mtc into extended
2 parents 69bcda5 + 5f27067 commit 7ddebde

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,23 @@ for the `prototype_mtc_extended` example model.
2828

2929
```python
3030
from pathlib import Path
31-
from activitysim.examples.external import registered_external_example
32-
33-
example_dir = registered_external_example(
34-
name="prototype_mtc_extended",
35-
working_dir=Path.cwd()
31+
from activitysim.examples.external import download_external_example
32+
33+
example_dir = download_external_example(
34+
name="prototype_mtc_extended",
35+
working_dir=Path.cwd(),
36+
url="https://github.com/ActivitySim/activitysim-prototype-mtc/archive/refs/heads/extended.tar.gz",
37+
assets={
38+
"data_full.tar.zst": {
39+
"url": "https://github.com/ActivitySim/activitysim-prototype-mtc/releases/download/v1.3.4/data_full.tar.zst",
40+
"sha256": "b402506a61055e2d38621416dd9a5c7e3cf7517c0a9ae5869f6d760c03284ef3",
41+
"unpack": "data_full",
42+
},
43+
"test/prototype_mtc_reference_pipeline.zip": {
44+
"url": "https://github.com/ActivitySim/activitysim-prototype-mtc/releases/download/v1.3.2/prototype_mtc_extended_reference_pipeline.zip",
45+
"sha256": "4d94b6a8a83225dda17e9ca19c9110bc1df2df5b4b362effa153d1c8d31524f5",
46+
}
47+
}
3648
)
3749
```
3850

@@ -42,5 +54,6 @@ The `prototype_mtc` example model is run using the `activitysim` command line to
4254
A quick and easy way to run the model for benchmarking is to use the following command:
4355

4456
```shell
57+
cd activitysim-prototype-mtc-extended
4558
activitysim workflow performance-benchmarking
4659
```

data_model/input_checks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,12 @@ def check_pop_per_zone(cls, land_use: pd.DataFrame):
226226
persons = TABLE_STORE["persons"]
227227
households = TABLE_STORE["households"]
228228
persons_per_household = persons.groupby("household_id").size()
229-
hh = households[["household_id", "home_zone_id"]].merge(
230-
persons_per_household.rename("persons_per_household"), on="household_id"
229+
hh = households[["household_id", "home_zone_id"]].merge(persons_per_household.rename("persons_per_household"), on="household_id")
230+
pop = (
231+
hh.groupby(households.home_zone_id)["persons_per_household"].sum()
231232
)
232-
pop = hh.groupby(households.home_zone_id)["persons_per_household"].sum()
233233
lu = land_use.set_index("zone_id")
234-
return pop.reindex(lu.index) == lu.TOTPOP
234+
return (pop.reindex(lu.index) == lu.TOTPOP)
235235

236236

237237
class NetworkLinks(pa.DataFrameModel):

performance-benchmarking.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ steps:
1414
defaults:
1515
example_name: .
1616
workflow_name: performance-benchmarking/mtc-extended
17-
workspace: ..
17+
workspace: .
1818
create: False
1919
compile: True
2020
sharrow: True

0 commit comments

Comments
 (0)