<jupyter_start><jupyter_text>A very simple input-displacing model We consider the simple case with:* Two technologies, using a combination of two fuels and capital in a leontief-nest.* Technology $1$ produces two goods $(u1,u2)$. Technology $2$ produces one good $(u3)$. This nest is CET (normalized).* $u1$ is used to produce a component $C1$, goods $(u2,u3)$ are combined as component $C2$. This is MNL (normalized).* Components $(C1,C2)$ are combined into one good $E$. This is CES.  1: Trees *Data file:*<jupyter_code>data_file = 'TreeData.xlsx'<jupyter_output><empty_output><jupyter_text>*Main tree:*<jupyter_code>nt = nesting_tree.nesting_tree(name='A1')<jupyter_output><empty_output><jupyter_text>*Add Trees:*<jupyter_code>nt.add_tree(data_folder+'\\'+data_file,tree_name='T_inp',**{'sheet':'T'})
nt.add_tree(data_folder+'\\'+data_file,tree_name='T_out',**{'sheet':'U', 'type_io':'output','type_f':'CET_norm'})
nt.add_tree(data_folder+'\\'+data_file,tree_name='C',**{'sheet':'C', 'type_f':'MNL'})
nt.add_tree(data_folder+'\\'+data_file,tree_name='E',**{'sheet':'E', 'type_f': 'CES_norm'})
nt.run_all()<jupyter_output><empty_output><jupyter_text>*Read in data on variables as well:*<jupyter_code>[DataBase.GPM_database.merge_dbs(nt.database,excel2py.xl2PM.pm_from_workbook(data_folder+'\\'+data_file,{sheet:'vars'}),'first') for sheet in ('T','U','C','E')];<jupyter_output><empty_output><jupyter_text>2: Production module<jupyter_code>gm = Production.pr_static(nt=nt,work_folder=work_folder,**{'data_folder':gams_folder,'name':'A1'})
gm.write_and_run(kwargs_init={'check_variables':True})
db = gm.model_instances['baseline'].out_db
gm.model_instances['baseline'].modelstat,gm.model_instances['baseline'].solvestat
db.get('qD').plot.bar(figsize=(4,3));
db.get('PbT').plot.bar(figsize=(4,3));<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1955093099671413, 'fraction_numerical': 0.012048192771084338, 'mean_word_length': 10.636942675159236, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '284609', 'license': 'MIT', 'n_tokens_mistral': 721, 'n_tokens_neox': 701, 'n_words': 106, 'path': 'examples/Abatement/A1.ipynb', 'repo_name': 'ChampionApe/GPM_v05', 'size': '1826'}