SANDAG / ABM

Sandag ABM
https://github.com/SANDAG/ABM/wiki
20 stars 21 forks source link

Fix total employment in column bug in ABM3 #94

Closed bhargavasana closed 6 months ago

bhargavasana commented 6 months ago

Total employment field (emp_total) is being derived twice due to initialize land use running once during accessibility calculation and once in regular model steps. This particular line is problematic and is resulting in negative values for some MGRAs - https://github.com/SANDAG/ABM/blob/ABM3_develop/src/asim/configs/resident/annotate_landuse.csv#L11.

The fix is to create a new column and not overwite emp_total and use that for whatever it was being used for in the resident model. This preserves the value of emp_total as in the input land use file and also the new column has an accurate number even if that step is run multiple times.

One needs to make sure that mandatory location choice constraints are working correctly after fixing this.

bhargavasana commented 6 months ago

@aletzdy please make sure to close this issue with your commit.

aletzdy commented 6 months ago

fixed with this commit