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

Initialize script in packages #183

Closed
goreaditya opened this issue Jun 4, 2018 · 4 comments
Closed

Initialize script in packages #183

goreaditya opened this issue Jun 4, 2018 · 4 comments

Comments

@goreaditya
Copy link
Collaborator

I noticed an issue of validating required user inputs by using an Initialize script in packages. VERPAT and VERSPM do not share many modules, and the respective inputs from the same package. For e.g. CreateBasePlaceTypes module in the VELandUse package is only used by VERPAT. This module needs input that requires validation. This can be done using the Initialize script but this poses a problem when running VERSPM as this input is not required by the RSPM model. Maybe some of these standard validation methods (like checking proportions by year or checking NAs) can be moved to the visioneval framework. Initialize script is great for optional inputs but creates a problem when the user inputs are necessary.

@gregorbj
Copy link
Owner

gregorbj commented Jun 4, 2018

Yes that is a problem. I don't see an obvious solution in the framework itself for checking several data fields simultaneously. Here is a different idea. Perhaps we can add an optional specification that would be like the 'Call' specification. This 'Initialize' specification could be used to identify the name of an initialization module. When the 'initializeModel' function compiles the list of specifications for all the modules, it would identify any modules identified in their 'Initialize' specifications and would add those modules to the specifications list. This approach would be similar to the current but would allow multiple initialization scripts.

@goreaditya
Copy link
Collaborator Author

goreaditya commented Jun 21, 2018

Adding an 'initialize.R' script in https://github.com/gregorbj/VisionEval/tree/master/sources/modules/VELandUse/R to validate data in bzone_pop_emp_prop.csv (used in CreateBasePlaceTypes and module) creates a problem as this file is needed by VERPAT but not by VERSPM. Running VERSPM model will fail in this scenario as the bzone_pop_emp_prop.csv is only required by VERPAT and not VERSPM.

Here is an example 'initialize.R' script fro VERSPM - https://github.com/gregorbj/VisionEval/blob/master/sources/modules/VEPowertrainsAndFuels/R/Initialize.R

@bstabler
Copy link
Collaborator

@bstabler
Copy link
Collaborator

Moving issues here - https://github.com/VisionEval/VisionEval-Dev/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants