activitysim icon indicating copy to clipboard operation
activitysim copied to clipboard

los.py expecting number of TAZs in land use to match length of skim index

Open aletzdy opened this issue 1 year ago • 1 comments
trafficstars

The current beta release of ActivitySim expects the length of TAZs in the land use data to match the length of skim indices. This can cause a crash if the skims include external stations, but the land use data only contains internal zones. This is the case with SEMCOG implementation and might be with other models too.

I am brining this up here so others be aware of it, and we can discuss it if needed.

@JilanChen

aletzdy avatar Mar 20 '24 18:03 aletzdy

The source code already provides a solution to this issue. See code snippet below. When the TAZs in the land use data mismatch the skims (which is reasonable as you said re: externals), Users can specify a land_use_taz table in the input_table_list in settings.yaml. The land_use_taz just need to have a TAZ column including all the TAZs in skims, increasing monotonically, see example here.

https://github.com/ActivitySim/activitysim/blob/739c2e428856eb401b42e95cedf9fd88bfcb02c6/activitysim/abm/tables/landuse.py#L50-L61

i-am-sijia avatar Apr 08 '24 15:04 i-am-sijia