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

Add config file functionality and capacity expansion calculations to develop branch #13

Merged
merged 47 commits into from
Sep 16, 2021

Conversation

rjhanes
Copy link
Collaborator

@rjhanes rjhanes commented Sep 9, 2021

This is a continuation of https://github.nrel.gov/aeberle/celavi/pull/202

This pull request isn't ready for review and merging yet; the functionality is still under development and needs to be tested.

@rjhanes
Copy link
Collaborator Author

rjhanes commented Sep 9, 2021

I tested commit 7150b06 on tiny-data and it ran successfully.

@rjhanes
Copy link
Collaborator Author

rjhanes commented Sep 13, 2021

TJ suggests the default value for initialize_cost_graph be set to True instead of False

@rjhanes
Copy link
Collaborator Author

rjhanes commented Sep 13, 2021

[now implemented] Additional bit of functionality: Execute the input data filtering only when the filtering flag is True and the list of states isn't empty.

Update so that command line execution of `python -m celavi [data dir]` can find the transportation tracker.
@akey7
Copy link
Collaborator

akey7 commented Sep 14, 2021

Since we moved to a public repository, I recloned and created a fresh CELAVI environment. I had to make some changes to transportation_tracker.py and setup.py to successfully reinstall CELAVI. I also updated the README so that it does not reflect my idiosyncratic location of my data folder.

Copy link
Collaborator

@akey7 akey7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some changes of my own (see my other comment in this PR). These changes work for me. Great work on the config!

@tjlca
Copy link
Collaborator

tjlca commented Sep 15, 2021

@rjhanes I was unable to find the config.yaml file in the data or code repo. Can you please point me to that?

Found how to create it...

@tjlca
Copy link
Collaborator

tjlca commented Sep 15, 2021

image

@rjhanes I found this file in the medium data branch of the data repo. But its only for IOWA. Can we generalize this? For example what if I want to run CO.

@rjhanes
Copy link
Collaborator Author

rjhanes commented Sep 15, 2021

@TJTapajyoti I'm assuming you're referring to the standard scenarios file. The full file is committed to the develop data branch, under raw_location_data.

@tjlca
Copy link
Collaborator

tjlca commented Sep 15, 2021

@rjhanes Will this file need filtering when working with individual states?

@rjhanes
Copy link
Collaborator Author

rjhanes commented Sep 15, 2021

@TJTapajyoti The way the state filtering is set up currently, it's applied to the input files (locations, turbines, and routes) after those files are generated rather than filtering the raw data used to generate the files. The standard scenarios file is used in generating both locations and turbines, so as long as the state filtering is applied after locations etc is generated, the standard scenarios file won't need to be filtered.

I do think we'll need to relocate the filtering code to line 221 208 or later in main.py, because otherwise there's a chance that the filtering will be overwritten by newly generated input files. I'll commit that change to this branch shortly. (See 79f46d5 - tested by filtering the develop data branch down to just IA and TX; the future power plants showed up in both locations and number_of_turbines and there weren't any extraneous facilities.)

I'll also check whether the step_costs file needs to be filtered - I think not, because CostGraph runs off the locations file and looks for those facility_id values in step_costs, so extra facilities in the step_costs file shouldn't matter, but I want to test and make sure. I'll let you know if we need that extra filtering step.

  • Tested this by running on the develop data branch, generating the step_costs file, then filtering everything down to just Iowa. CostGraph initialized without error and had only the Iowa facilities in it. This means we don't need to add filtering to step_costs for the code to execute properly.

@rjhanes
Copy link
Collaborator Author

rjhanes commented Sep 16, 2021

Additional functionality to add: Add a second parser argument with the config file name

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

Successfully merging this pull request may close these issues.

4 participants