-
Notifications
You must be signed in to change notification settings - Fork 12
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
Modified creation of cyclus input from PRIS data #115
Merged
Merged
Changes from 26 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
596fa88
inputs/current_us.xml
89f5ca9
created notebook for analysis
5476d46
Pulled in templates from predicting-the-past repo
89108ea
getting MemoryError using 2016 data output file
a108494
added script to create cyclus input from raw PRIS data
92abc00
changed write_reactors to match unites_states.ipynb
0aac6ae
modified render_cyclus to match united_states.ipynb
4cd9c10
works with 2016 database
4268acd
added save_output function from merge_coordinates
2a2fcc5
changed reactor power cap, some path names to haleu directory
f419424
mostly working
982d2bf
fixed connection date of reactors
e2de78f
creates input that runs and produces non-empty sqlite file
8831068
pulled user specifications to beginning
cd81e1a
removed old input
34b83c8
added comment
6b6a9c9
updated countries in select_region
9d35d38
removed renaming of USA
8cd9940
changed not_null to '' to remove lines with country totals
88f9d2d
returning to current state on master branch
74892bc
pep8 fixes
c23c968
modified to include merge_coordiantes function
dc80ceb
added liquid format back in
9add92d
changed import_pris to column names instead of numbers
90da11c
DRY suggestion from @katyhuff
24f1846
pep8 fixes
1578509
removed magic numbers
1b9cd1a
reorganized variables
c45b0ca
modified paths, removal of magic numbers doesn't work
18c4938
changed intermediate reactor data containers to dataframes
f9b63d5
added out_file for produce_recipes, pep8 fixes
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import pandas as pd | ||
import sys | ||
|
||
import predicting_the_past_import as import_data | ||
|
||
# user defined characteristics of cyclus simulation | ||
data_year = 2020 | ||
start_year = 1965 | ||
region = 'united_states' | ||
project = 'haleu' | ||
katyhuff marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
import_data.merge_coordinates('../database/Year-end Reactor Status_' + str(data_year) + '.csv', | ||
'../database/coordinates.sqlite', data_year) | ||
|
||
pris_file = '../database/reactors_pris_' + str(data_year) + '.csv' | ||
deployinst_tmpl = '../input/predicting-the-past/templates/' + \ | ||
region + '/deployinst_template.xml' | ||
inclusions_tmpl = '../input/predicting-the-past/templates/inclusions_template.xml' | ||
deployment_path = '../input/' + project + '/inputs/' + region + '/buildtimes' | ||
reactor_path = '../input/' + project + '/inputs/' + region + '/reactors' | ||
reactor_template = '../input/predicting-the-past/templates/reactors_template.xml' | ||
|
||
|
||
pris = import_data.import_csv(pris_file) | ||
|
||
|
||
recipes = import_data.import_csv('../database/vision_recipes/uox.csv', ',') | ||
recipe_template = import_data.load_template( | ||
'../input/predicting-the-past/templates/recipes_template.xml') | ||
burnups = [33, 51, 100] | ||
for bu in burnups: | ||
fresh = import_data.get_composition_fresh(recipes, bu) | ||
spent = import_data.get_composition_spent(recipes, bu) | ||
import_data.write_recipes(fresh, spent, recipe_template, bu, region) | ||
|
||
reactor_list = import_data.select_region(pris, region) | ||
import_data.write_reactors( | ||
reactor_list, | ||
reactor_path, | ||
reactor_template, | ||
18, | ||
1) # change cycle and refuel time | ||
buildtime = import_data.deploy_reactors(pris_file, region, start_year, deployinst_tmpl, | ||
inclusions_tmpl, reactor_path, deployment_path) | ||
|
||
cyclus_tmpl = ('../input/predicting-the-past/templates/' + | ||
region + '/' + region + '_template.xml') | ||
import_data.render_cyclus( | ||
cyclus_tmpl, | ||
region, | ||
buildtime, | ||
'../input/' + | ||
project + | ||
'/inputs/', | ||
51) # change burn up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like something that should be user specified.
E.g. allow for options when running
create_input.py
likeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as the IAEA PRIS database is on a mass basis, this is fine. @abachma2 feel free to resolve this conversation if that's the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The recipe data doesn't come from PRIS. It comes from the vision recipes in
database/vision_recipes/
. I don't know where that data came from originally.