<jupyter_start><jupyter_text>This is when you already have the results<jupyter_code>df = pd.read_csv('ty-df.csv',index_col='TY')
df<jupyter_output><empty_output><jupyter_text>The rest of the code below is to generate the above results<jupyter_code>starter_string = 'TY'
scenario_nums = ['960','972','984','996','1008']
df = oup.initialize_df(scenario_index=starter_string,
                                 scenarios_nums=scenario_nums)
df['Final HLW'] = 0
df['Final Depleted U'] = 0 
df['Total uranium ore'] = 0
df['Total idle capacity'] = 0
df['Last date idle capacity'] = 0
df['Duration of transition'] = 0
# Before this is run, you must make sure all the ty_.sqlite files are in the output_start folder. This is done by downloading them from my
# ms-thesis box OR running the transition year cooling time dakota input file. 
output_start = '../cyclus-files/oat/transition-year/ty'
ev_dict = {}
for x in range(len(scenario_nums)): 
    output_file = output_start + scenario_nums[x]+'.sqlite'
    ev_dict[scenario_nums[x]] = cym.Evaluator(db=cym.dbopen(output_file),write=True)
for x in range(5):#(len(scenario_nums)): 
    df.loc[scenario_nums[x],'Final HLW'] = cym.timeseries.transactions(ev_dict[scenario_nums[x]],commodities=['lwrreprocessingwaste','moxreprocessingwaste','frreprocessingwaste'])['Mass'].cumsum().iloc[-1]
    df.loc[scenario_nums[x],'Final Depleted U'] = cym.timeseries.transactions(ev_dict[scenario_nums[x]],commodities=['enrichmentwaste'])['Mass'].cumsum().max()
    df.loc[scenario_nums[x],'Total uranium ore'] = cym.timeseries.transactions(ev_dict[scenario_nums[x]],commodities=['sourceout'])['Mass'].cumsum().max()
    df.loc[scenario_nums[x],'Total idle capacity'], df.loc[scenario_nums[x],'Last date idle capacity'], udict = oup.idlecap(ev_dict[scenario_nums[x]],'(60000+250*t/12)/1000')
    df.loc[scenario_nums[x],'Duration of transition'] = df.loc[scenario_nums[x],'Last date idle capacity'] - int(scenario_nums[x])
    
df.to_csv('ty-df.csv')
df_ty_sa = oup.sensitivity(base_case=960,init_df=df)
df_ty_sa
df_ty_sa.to_csv('ty-df-sa.csv')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15674130538351597, 'fraction_numerical': 0.01953311100524059, 'mean_word_length': 6.420494699646643, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '84831', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 814, 'n_tokens_neox': 774, 'n_words': 137, 'path': 'dakota/oat/transition-year/transition-year.ipynb', 'repo_name': 'arfc/dcwrapper', 'size': '2099'}