Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when TotEmp field of bzone_employment.csv contains 0 value #39

Closed
shichenfan opened this issue May 15, 2019 · 2 comments · Fixed by #161
Closed

Error when TotEmp field of bzone_employment.csv contains 0 value #39

shichenfan opened this issue May 15, 2019 · 2 comments · Fixed by #161
Labels
bug Something isn't working

Comments

@shichenfan
Copy link
Contributor

When TotEmp field of bzone_employment.csv contains 0 value, get error as below:
error_employ
bzone_employment.csv is an input of LocateEmployment Module.
Model got error in 'Calculate4DMeasures' step

@dflynn-volpe dflynn-volpe added the bug Something isn't working label Jul 16, 2019
@dflynn-volpe
Copy link
Collaborator

Notes from Chi Ping:

First, VERSPM could not run to completion if there is BZONE with zero employment. The error occurs in LocateEmployment module when it adjusts the regional employment to the number of workers:

    TotEmp_Bz <- colSums(WkrOD_BzBz)
    RetEmp_Bz <- round(TotEmp_Bz * (L$Year$Bzone$RetEmp/L$Year$Bzone$TotEmp))
    SvcEmp_Bz <- round(TotEmp_Bz * L$Year$Bzone$SvcEmp/L$Year$Bzone$TotEmp)

If the TotEmp for a Bzone is zero, R will return the NA value to RetEmp_Bz and SvcEmp_Bz. Any NA value will cause fatal error down the road. Hopefully this will be addressed.

Second, by matching the total employment to the total number of workers, VERSPM implicitly assumes that all workers works inside the Metropolitan area. This implicit assumption may not be true if VERSPM is applied to the a region where there are significant workers coming from outside region or going out of the region (like Washington DC) or to a subregion of a Metropolitan area. I wish the documentation will discuss applying VisionEval to such region with significant imbalance between number of workers and employments.

@dflynn-volpe
Copy link
Collaborator

I have rediscovered this old issue with new inputs. I have a patch in progress here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants