Mentions légales du service

Skip to content
Snippets Groups Projects
Commit eb8e33c1 authored by Aina's avatar Aina
Browse files

Adaptation du code au nouvel arbre

parent 7ddb5365
Branches
No related tags found
No related merge requests found
File moved
This diff is collapsed.
This diff is collapsed.
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
import os
w3_path = os.path.join('..', 'world3.py')
output_path = os.path.join('..', 'data', 'world3-03_variables.json')
w3_72_vars_lists_dir = os.path.join('..', 'models', 'WRLD3-72')
```
%% Cell type:code id: tags:
``` python
def dependency_visitor(nc): def dependency_visitor(nc):
dependencies = [] dependencies = []
numeric_const = None numeric_const = None
for ncc in ast.walk(nc): for ncc in ast.walk(nc):
# Hypothèse sur le code généré par PySD : # Hypothèse sur le code généré par PySD :
# Toutes les variables du modèle sont des fonctions en Python # Toutes les variables du modèle sont des fonctions en Python
if isinstance(ncc, ast.Call) and isinstance(ncc.func, ast.Name): if isinstance(ncc, ast.Call) and isinstance(ncc.func, ast.Name):
dep_name = ncc.func.id dep_name = ncc.func.id
dependencies.append(dep_name) dependencies.append(dep_name)
elif isinstance(ncc, ast.Num): elif isinstance(ncc, ast.Num):
if numeric_const == None: if numeric_const == None:
numeric_const = ncc.n numeric_const = ncc.n
elif isinstance(ncc, ast.Call) and ncc.func.attr == 'lookup': elif isinstance(ncc, ast.Call) and ncc.func.attr == 'lookup':
numeric_const = [] numeric_const = []
for arg in ncc.args: for arg in ncc.args:
if isinstance(arg, ast.List): if isinstance(arg, ast.List):
numeric_const.append([n.n for n in arg.elts if isinstance(n, ast.Num)]) numeric_const.append([n.n for n in arg.elts if isinstance(n, ast.Num)])
return numeric_const, list(set(dependencies)) return numeric_const, list(set(dependencies))
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
import re, ast import re, ast
p_db = {'time': { p_db = {'time': {
'type' : 'other', 'type' : 'other',
'dependencies': None, 'dependencies': None,
'code': None, 'code': None,
'in72': None, 'in72': None,
'abbr': None, 'abbr': None,
'name': None, 'name': None,
'description': None 'description': None
}} }}
t = ast.parse(open('world3.py').read()) t = ast.parse(open(w3_path).read())
for n in t.body: for n in t.body:
if isinstance(n, ast.FunctionDef): # Fonctions définies avec un "def" if isinstance(n, ast.FunctionDef): # Fonctions définies avec un "def"
func_body = n.body func_body = n.body
name = n.name name = n.name
p_db[name] = {'in72': None} p_db[name] = {'in72': None}
for nc in func_body: for nc in func_body:
if isinstance(nc, ast.Return): if isinstance(nc, ast.Return):
value, dependencies = dependency_visitor(nc) value, dependencies = dependency_visitor(nc)
if len(dependencies) == 0: if len(dependencies) == 0:
p_db[name]['value'] = value p_db[name]['value'] = value
p_db[name]['dependencies'] = None p_db[name]['dependencies'] = None
else: else:
p_db[name]['value'] = None p_db[name]['value'] = None
p_db[name]['dependencies'] = dependencies p_db[name]['dependencies'] = dependencies
if isinstance(nc, ast.Expr): if isinstance(nc, ast.Expr):
comment = list(map(lambda s: s.strip(), nc.value.s.strip().split('\n\n'))) comment = list(map(lambda s: s.strip(), nc.value.s.strip().split('\n\n')))
p_db[name]['name'] = comment[0] p_db[name]['name'] = comment[0]
p_db[name]['type'] = comment[4] p_db[name]['type'] = comment[4]
p_db[name]['description'] = p_db[name]['abbr'] = p_db[name]['code'] = None p_db[name]['description'] = p_db[name]['abbr'] = p_db[name]['code'] = None
if len(comment) >= 6: if len(comment) >= 6:
description = re.sub('\s+', ' ', comment[5]) description = re.sub('\s+', ' ', comment[5])
p_db[name]['description'] = description p_db[name]['description'] = description
code_search = re.search(r'\((.*)\)', description) code_search = re.search(r'\((.*)\)', description)
if code_search != None and len(code_search[1].split('#')) >= 2: if code_search != None and len(code_search[1].split('#')) >= 2:
p_db[name]['abbr'], p_db[name]['code'] = code_search[1].split('#')[:2] p_db[name]['abbr'], p_db[name]['code'] = code_search[1].split('#')[:2]
if isinstance(n, ast.Assign): # Fonctions définies avec un "=" (fonctions "séparées") : FONCTIONS D'ÉTAT if isinstance(n, ast.Assign): # Fonctions définies avec un "=" (fonctions "séparées") : FONCTIONS D'ÉTAT
target = n.targets[0] target = n.targets[0]
name = target.id name = target.id
_, dependencies = dependency_visitor(n) _, dependencies = dependency_visitor(n)
result = {k: v for k, v in p_db.items() if v['dependencies'] and name in v['dependencies']} result = {k: v for k, v in p_db.items() if v['dependencies'] and name in v['dependencies']}
for r in result: for r in result:
p_db[r]['dependencies'].remove(name) p_db[r]['dependencies'].remove(name)
p_db[r]['dependencies'].extend(dependencies) p_db[r]['dependencies'].extend(dependencies)
p_db[r]['type'] = 'stateful' p_db[r]['type'] = 'stateful'
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
def import_w3_72_list(filename): def import_w3_72_list(filename):
''' '''
Importe une liste de variables de W3-72 : Importe une liste de variables de W3-72 :
sur chaque ligne, l'acronyme de la variable et son identifiant numérique séparés d'un espace sur chaque ligne, l'acronyme de la variable et son identifiant numérique séparés d'un espace
retourne la liste des identifiants numériques retourne la liste des identifiants numériques
''' '''
w3_72_list_file = open(filename) w3_72_list_file = open(filename)
w3_72_abbr = [] w3_72_abbr = []
w3_72_code = [] w3_72_code = []
for l in w3_72_list_file.read().split('\n'): for l in w3_72_list_file.read().split('\n'):
try: try:
abbr, code = l.split(' ') abbr, code = l.split(' ')
w3_72_abbr.append(abbr) w3_72_abbr.append(abbr)
w3_72_code.append(code) w3_72_code.append(code)
except: except:
pass pass
w3_72_list_file.close() w3_72_list_file.close()
return w3_72_abbr, w3_72_code return w3_72_abbr, w3_72_code
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
types_72 = ['parameter', 'table', 'state'] types_72 = ['parameter', 'table', 'state']
types_03 = ['constant', 'lookup', 'stateful'] types_03 = ['constant', 'lookup', 'stateful']
types = dict(zip(types_72, types_03)) types = dict(zip(types_72, types_03))
from IPython.display import Markdown, HTML from IPython.display import Markdown, HTML
import tabulate import tabulate
for t72, t03 in types.items(): for t72, t03 in types.items():
display(Markdown('# ' + t72)) display(Markdown('# ' + t72))
abbrs, codes = import_w3_72_list('w3-72_' + t72 + '.txt') abbrs, codes = import_w3_72_list(os.path.join(w3_72_vars_lists_dir, 'w3-72_' + t72 + '.txt'))
for i in range(len(codes)): for i in range(len(codes)):
result = [k for k, v in p_db.items() if v['code'] != None and v['code'] == codes[i]] result = [k for k, v in p_db.items() if v['code'] != None and v['code'] == codes[i]]
if(len(result) == 0): if(len(result) == 0):
print(f'{abbrs[i]}#{codes[i]} not found in 2003 version') print(f'{abbrs[i]}#{codes[i]} not found in 2003 version')
elif len(result) > 1: elif len(result) > 1:
for r in result: for r in result:
p_db[r]['in72'] = t72 p_db[r]['in72'] = t72
print(f'{abbrs[i]}#{codes[i]} several variables found in 2003 version') print(f'{abbrs[i]}#{codes[i]} several variables found in 2003 version')
elif len(result) == 1: elif len(result) == 1:
p_db[result[0]]['in72'] = t72 p_db[result[0]]['in72'] = t72
lists = {'New': {}, 'Not in 2003': {}, 'In both': {}} lists = {'New': {}, 'Not in 2003': {}, 'In both': {}}
for c_id in p_db: for c_id in p_db:
correspond_in03 = ( correspond_in03 = (
p_db[c_id]['type'] == t03 p_db[c_id]['type'] == t03
) )
correspond_in72 = p_db[c_id]['in72'] == t72 correspond_in72 = p_db[c_id]['in72'] == t72
if correspond_in03 and not correspond_in72: if correspond_in03 and not correspond_in72:
lists['New'][c_id] = p_db[c_id] lists['New'][c_id] = p_db[c_id]
elif not correspond_in03 and correspond_in72: elif not correspond_in03 and correspond_in72:
lists['Not in 2003'][c_id] = p_db[c_id] lists['Not in 2003'][c_id] = p_db[c_id]
elif correspond_in03 and correspond_in72: elif correspond_in03 and correspond_in72:
lists['In both'][c_id] = p_db[c_id] lists['In both'][c_id] = p_db[c_id]
for l in lists: for l in lists:
display(Markdown(f'## {l}')) display(Markdown(f'## {l}'))
table = [] table = []
for c_id in sorted(lists[l]): for c_id in sorted(lists[l]):
table.append([p_db[c_id]["abbr"], p_db[c_id]["code"], p_db[c_id]['name']]) table.append([p_db[c_id]["abbr"], p_db[c_id]["code"], p_db[c_id]['name']])
print(tabulate.tabulate(table, tablefmt='plain')) print(tabulate.tabulate(table, tablefmt='plain'))
``` ```
%% Output %% Output
# parameter # parameter
## New ## New
ARPTM -- air pollution policy implementation time ARPTM -- air pollution policy implementation time
AHL70 146.1 assimilation half life in 1970 AHL70 146.1 assimilation half life in 1970
ALAI1 100.1 average life of agricultural inputs 1 ALAI1 100.1 average life of agricultural inputs 1
ALAI2 100.2 average life of agricultural inputs 2 ALAI2 100.2 average life of agricultural inputs 2
ALIC1 54.1 average life of industrial capital 1 ALIC1 54.1 average life of industrial capital 1
ALIC2 54.2 average life of industrial capital 2 ALIC2 54.2 average life of industrial capital 2
ALSC1 69.1 average life of service capital 1 ALSC1 69.1 average life of service capital 1
ALSC2 69.2 average life of service capital 2 ALSC2 69.2 average life of service capital 2
DFR -- desired food ratio DFR -- desired food ratio
DPOLX -- desired persistent pollution index DPOLX -- desired persistent pollution index
DNRUR -- desired resource use rate DNRUR -- desired resource use rate
FCEST 45.1 fertility control effectiveness time FCEST 45.1 fertility control effectiveness time
FINAL TIME FINAL TIME
FCAORTM -- fraction of industrial capital allocated to obtaining resources switch time FCAORTM -- fraction of industrial capital allocated to obtaining resources switch time
FIOAC1 58.1 fraction of industrial output allocated to consumption constant 1 FIOAC1 58.1 fraction of industrial output allocated to consumption constant 1
FIOAC2 58.2 fraction of industrial output allocated to consumption constant 2 FIOAC2 58.2 fraction of industrial output allocated to consumption constant 2
GDP pc unit GDP pc unit
ha per Gha ha per Gha
ha per unit of pollution ha per unit of pollution
ICOR1 51.1 industrial capital output ratio 1 ICOR1 51.1 industrial capital output ratio 1
IET 57.1 industrial equilibrium time IET 57.1 industrial equilibrium time
ALI 85.2 initial arable land ALI 85.2 initial arable land
ICI 52.1 initial industrial capital ICI 52.1 initial industrial capital
LFERTI 121.2 initial land fertility LFERTI 121.2 initial land fertility
NRI 129.2 initial nonrenewable resources NRI 129.2 initial nonrenewable resources
PPOLI 142.2 initial persistent pollution PPOLI 142.2 initial persistent pollution
P1I 2.2 initial population 0 to 14 P1I 2.2 initial population 0 to 14
P2I 6.2 initial population 15 to 44 P2I 6.2 initial population 15 to 44
P3I 10.2 initial population 54 to 64 P3I 10.2 initial population 54 to 64
P4I 14.2 initial population 65 plus P4I 14.2 initial population 65 plus
PALI 86.2 initial potentially arable land PALI 86.2 initial potentially arable land
SCI 67.2 initial service capital SCI 67.2 initial service capital
INITIAL TIME INITIAL TIME
UILI 120.1 initial urban and industrial land UILI 120.1 initial urban and industrial land
LLMYTM -- land life policy implementation time LLMYTM -- land life policy implementation time
LYF1 104.1 land yield factor 1 LYF1 104.1 land yield factor 1
one year one year
PPGF1 138.1 persistent pollution generation factor 1 PPGF1 138.1 persistent pollution generation factor 1
PYEAR 150.1 POLICY YEAR PYEAR 150.1 POLICY YEAR
PET 30.2 population equilibrium time PET 30.2 population equilibrium time
PRICE OF FOOD PRICE OF FOOD
Ref Hi GDP Ref Hi GDP
Ref Lo GDP Ref Lo GDP
NRUF1 131.1 resource use factor 1 NRUF1 131.1 resource use factor 1
SCOR1 72.1 service capital output ratio 1 SCOR1 72.1 service capital output ratio 1
SCOR2 72.2 service capital output ratio 2 SCOR2 72.2 service capital output ratio 2
TDD -- technology development delay TDD -- technology development delay
THOUSAND THOUSAND
TIME STEP TIME STEP
Total Land Total Land
unit agricultural input unit agricultural input
unit population unit population
ZPGT 38.1 zero population growth time ZPGT 38.1 zero population growth time
## Not in 2003 ## Not in 2003
AHL 146 assimilation half life AHL 146 assimilation half life
ALAI 100 average life agricultural inputs ALAI 100 average life agricultural inputs
ALSC 69 average life of service capital ALSC 69 average life of service capital
FIOAC 57 fraction of industrial output allocated to consumption FIOAC 57 fraction of industrial output allocated to consumption
ICOR 51 industrial capital output ratio ICOR 51 industrial capital output ratio
LYF 104 land yield multiplier from technology LYF 104 land yield multiplier from technology
PPGF 138 persistent pollution generation factor PPGF 138 persistent pollution generation factor
NRUF 131 resource use factor NRUF 131 resource use factor
SCOR 72 service capital output ratio SCOR 72 service capital output ratio
## In both ## In both
AMTI 140.2 agricultural material toxicity index AMTI 140.2 agricultural material toxicity index
ALLN 112.1 average life of land normal ALLN 112.1 average life of land normal
DCFSN 38.2 desired completed family size normal DCFSN 38.2 desired completed family size normal
FSPD 128.2 food shortage perception delay FSPD 128.2 food shortage perception delay
FIPM 140.1 fraction of agricultural inputs from persistent materials FIPM 140.1 fraction of agricultural inputs from persistent materials
FRPM 139.1 fraction of resources from persistent materials FRPM 139.1 fraction of resources from persistent materials
HSID 22.1 health services impact delay HSID 22.1 health services impact delay
IEAT 43.1 income expectation averaging time IEAT 43.1 income expectation averaging time
IO70 107.2 IND OUT IN 1970 IO70 107.2 IND OUT IN 1970
IMEF 139.2 industrial material emissions factor IMEF 139.2 industrial material emissions factor
IMTI 139.3 industrial material toxicity index IMTI 139.3 industrial material toxicity index
IOPCD 59.2 industrial output per capita desired IOPCD 59.2 industrial output per capita desired
ILF 124.1 inherent land fertility ILF 124.1 inherent land fertility
LFPF 80.1 labor force participation fraction LFPF 80.1 labor force participation fraction
LUFDT 82.1 labor utilization fraction delay time LUFDT 82.1 labor utilization fraction delay time
LFH 87.1 land fraction harvested LFH 87.1 land fraction harvested
LEN 19.1 life expectancy normal LEN 19.1 life expectancy normal
LPD 37.1 lifetime perception delay LPD 37.1 lifetime perception delay
MTFN 33.1 maximum total fertility normal MTFN 33.1 maximum total fertility normal
PPOL70 143.1 persistent pollution in 1970 PPOL70 143.1 persistent pollution in 1970
PPTD 141.1 persistent pollution transmission delay PPTD 141.1 persistent pollution transmission delay
PALT 84.1 potentially arable land total PALT 84.1 potentially arable land total
PL 87.2 processing loss PL 87.2 processing loss
RLT 30.1 reproductive lifetime RLT 30.1 reproductive lifetime
SAD 40.1 social adjustment delay SAD 40.1 social adjustment delay
SD 109.1 social discount SD 109.1 social discount
SFPC 127.1 subsistence food per capita SFPC 127.1 subsistence food per capita
UILDT 119.1 urban and industrial land development time UILDT 119.1 urban and industrial land development time
# table # table
## New ## New
AHLMT 145.1 assimilation half life mult table AHLMT 145.1 assimilation half life mult table
CUFT 83.2 capacity utilization fraction table CUFT 83.2 capacity utilization fraction table
CMPLET 36.1 completed multiplier from perceived lifetime table CMPLET 36.1 completed multiplier from perceived lifetime table
CMIT 27.1 crowding multiplier from industry table CMIT 27.1 crowding multiplier from industry table
DCPHT 97.1 development cost per hectare table DCPHT 97.1 development cost per hectare table
Education Index LOOKUP Education Index LOOKUP
FRSNT 41.1 family response to social norm table FRSNT 41.1 family response to social norm table
FMT 34.1 fecundity multiplier table FMT 34.1 fecundity multiplier table
FCET 45.2 fertility control effectiveness table FCET 45.2 fertility control effectiveness table
FIOAA1T 94.1 fraction industrial output allocated to agriculture table 1 FIOAA1T 94.1 fraction industrial output allocated to agriculture table 1
FIOAA2T 95.1 fraction industrial output allocated to agriculture table 2 FIOAA2T 95.1 fraction industrial output allocated to agriculture table 2
FIALDT 108.1 fraction of agricultural inputs allocated to land development table FIALDT 108.1 fraction of agricultural inputs allocated to land development table
FALMT 126.1 fraction of agricultural inputs for land maintenance table FALMT 126.1 fraction of agricultural inputs for land maintenance table
FCAOR1T 135.1 fraction of capital allocated to obtaining resources 1 table FCAOR1T 135.1 fraction of capital allocated to obtaining resources 1 table
FCAOR2T 136.1 fraction of capital allocated to obtaining resources 2 table FCAOR2T 136.1 fraction of capital allocated to obtaining resources 2 table
FIOACVT 59.1 fraction of industrial output allocated to consumption variable table FIOACVT 59.1 fraction of industrial output allocated to consumption variable table
FIOAS1T 64.1 fraction of industrial output allocated to services table 1 FIOAS1T 64.1 fraction of industrial output allocated to services table 1
FIOAS2T 65.1 fraction of industrial output allocated to services table 2 FIOAS2T 65.1 fraction of industrial output allocated to services table 2
FPUT 26.1 fraction of population urban table FPUT 26.1 fraction of population urban table
FSAFCT 48.1 fraction services allocated to fertility control table FSAFCT 48.1 fraction services allocated to fertility control table
GDP per capita LOOKUP GDP per capita LOOKUP
HSAPCT 21.1 health services per capita table HSAPCT 21.1 health services per capita table
IFPC1T 90.1 indicated food per capita table 1 IFPC1T 90.1 indicated food per capita table 1
IFPC2T 90.2 indicated food per capita table 2 IFPC2T 90.2 indicated food per capita table 2
ISOPC1T 61.1 indicated services output per capita table 1 ISOPC1T 61.1 indicated services output per capita table 1
ISOPC2T 62.2 indicated services output per capita table 2 ISOPC2T 62.2 indicated services output per capita table 2
COPMT -- industrial capital output ratio multiplier from pollution table COPMT -- industrial capital output ratio multiplier from pollution table
ICOR2TT -- industrial capital output ratio multiplier from resource table ICOR2TT -- industrial capital output ratio multiplier from resource table
COYMT -- industrial capital output ratio multiplier table COYMT -- industrial capital output ratio multiplier table
JPHT 79.1 jobs per hectare table JPHT 79.1 jobs per hectare table
JPICUT 75.1 jobs per industrial capital unit table JPICUT 75.1 jobs per industrial capital unit table
JPSCUT 77.1 jobs per service capital unit table JPSCUT 77.1 jobs per service capital unit table
LFDRT 122.1 land fertility degredation rate table LFDRT 122.1 land fertility degredation rate table
LFRTT 125.1 land fertility regeneration time table LFRTT 125.1 land fertility regeneration time table
LLMY1T 114.1 land life multiplier from land yield table 1 LLMY1T 114.1 land life multiplier from land yield table 1
LLMY2T 115.1 land life multiplier from land yield table 2 LLMY2T 115.1 land life multiplier from land yield table 2
LYMAP1T 106.1 land yield multipler from air pollution table 1 LYMAP1T 106.1 land yield multipler from air pollution table 1
LYMAP2T 107.1 land yield multipler from air pollution table 2 LYMAP2T 107.1 land yield multipler from air pollution table 2
LYMCT 102.1 land yield multiplier from capital table LYMCT 102.1 land yield multiplier from capital table
LYCMT -- land yield technology change rate multiplier table LYCMT -- land yield technology change rate multiplier table
Life Expectancy Index LOOKUP Life Expectancy Index LOOKUP
LMFT 20.1 lifetime multiplier from food table LMFT 20.1 lifetime multiplier from food table
LMHS1T 24.1 lifetime multiplier from health services 1 table LMHS1T 24.1 lifetime multiplier from health services 1 table
LMHS2T 25.1 lifetime multiplier from health services 2 table LMHS2T 25.1 lifetime multiplier from health services 2 table
LMPT 29.1 lifetime multiplier from persistent pollution table LMPT 29.1 lifetime multiplier from persistent pollution table
MLYMCT 111.1 marginal land yield multiplier from capital table MLYMCT 111.1 marginal land yield multiplier from capital table
M1T 4.1 mortality 0 to 14 table M1T 4.1 mortality 0 to 14 table
M2T 8.1 mortality 15 to 44 table M2T 8.1 mortality 15 to 44 table
M2T 12.1 mortality 45 to 64 table M2T 12.1 mortality 45 to 64 table
M4T 16.1 mortality 65 plus table M4T 16.1 mortality 65 plus table
PCRUMT 132.1 per capita resource use mult table PCRUMT 132.1 per capita resource use mult table
POLGFMT -- persistent pollution technology change mult table POLGFMT -- persistent pollution technology change mult table
NRCMT -- resource technology change mult table NRCMT -- resource technology change mult table
SFNT 39.1 social family size normal table SFNT 39.1 social family size normal table
UILPCT 117.1 urban and industrial land required per capita table UILPCT 117.1 urban and industrial land required per capita table
## Not in 2003 ## Not in 2003
AHLM 145 assimilation half life multiplier AHLM 145 assimilation half life multiplier
CUF 83 capacity utilization fraction CUF 83 capacity utilization fraction
CMPLE 36 completed multiplier from perceived lifetime CMPLE 36 completed multiplier from perceived lifetime
CMI 27 crowding multiplier from industry CMI 27 crowding multiplier from industry
DCPH 97 development cost per hectare DCPH 97 development cost per hectare
FRSN 41 family response to social norm FRSN 41 family response to social norm
FM 34 fecundity multiplier FM 34 fecundity multiplier
FCE 45 fertility control effectiveness FCE 45 fertility control effectiveness
FIALD 108 fraction of agricultural inputs allocated to land development FIALD 108 fraction of agricultural inputs allocated to land development
FALM 126 fraction of agricultural inputs for land maintenance FALM 126 fraction of agricultural inputs for land maintenance
FCAOR 134 fraction of industrial capital allocated to obtaining resources FCAOR 134 fraction of industrial capital allocated to obtaining resources
FIOAA 93 fraction of industrial output allocated to agriculture FIOAA 93 fraction of industrial output allocated to agriculture
FIOAS 63 fraction of industrial output allocated to services FIOAS 63 fraction of industrial output allocated to services
FPU 26 fraction of population urban FPU 26 fraction of population urban
FSAFC 48 fraction services allocated to fertility control FSAFC 48 fraction services allocated to fertility control
HSAPC 21 health services per capita HSAPC 21 health services per capita
IFPC 89 indicated food per capita IFPC 89 indicated food per capita
ISOPC 60 indicated services output per capita ISOPC 60 indicated services output per capita
JPH 79 jobs per hectare JPH 79 jobs per hectare
JPICU 75 jobs per industrial capital unit JPICU 75 jobs per industrial capital unit
JPSCU 77 jobs per service capital unit JPSCU 77 jobs per service capital unit
LFDR 122 land fertility degredation rate LFDR 122 land fertility degredation rate
LFRT 125 land fertility regeneration time LFRT 125 land fertility regeneration time
LLMY 113 land life multiplier from land yield LLMY 113 land life multiplier from land yield
LYMAP 105 land yield multiplier from air pollution LYMAP 105 land yield multiplier from air pollution
LYMC 102 land yield multiplier from capital LYMC 102 land yield multiplier from capital
LMF 20 lifetime multiplier from food LMF 20 lifetime multiplier from food
LMHS 23 lifetime multiplier from health services LMHS 23 lifetime multiplier from health services
LMP 29 lifetime multiplier from persistent pollution LMP 29 lifetime multiplier from persistent pollution
MLYMC 111 marginal land yield multiplier from capital MLYMC 111 marginal land yield multiplier from capital
M1 4 mortality 0 to 14 M1 4 mortality 0 to 14
M2 8 mortality 15 to 44 M2 8 mortality 15 to 44
M3 12 mortality 45 to 64 M3 12 mortality 45 to 64
M4 16 mortality 65 plus M4 16 mortality 65 plus
PCRUM 132 per capita resource use multiplier PCRUM 132 per capita resource use multiplier
SFN 39 social family size normal SFN 39 social family size normal
UILPC 117 urban and industrial land required per capita UILPC 117 urban and industrial land required per capita
## In both ## In both
# state # state
LV1#0 not found in 2003 version LV1#0 not found in 2003 version
LV2#0 not found in 2003 version LV2#0 not found in 2003 version
LV3#0 not found in 2003 version LV3#0 not found in 2003 version
LV4#0 not found in 2003 version LV4#0 not found in 2003 version
LV5#0 not found in 2003 version LV5#0 not found in 2003 version
LV6#0 not found in 2003 version LV6#0 not found in 2003 version
LV7#0 not found in 2003 version LV7#0 not found in 2003 version
LV8#0 not found in 2003 version LV8#0 not found in 2003 version
LV9#0 not found in 2003 version LV9#0 not found in 2003 version
## New ## New
LYF2 104.2 land yield factor 2 LYF2 104.2 land yield factor 2
LYTD -- Land Yield Technology LYTD -- Land Yield Technology
PPAPR 141 persistent pollution appearance rate PPAPR 141 persistent pollution appearance rate
PPGF2 138.2 persistent pollution generation factor 2 PPGF2 138.2 persistent pollution generation factor 2
PTD -- Persistent Pollution Technology PTD -- Persistent Pollution Technology
NRTD -- Resource Conservation Technology NRTD -- Resource Conservation Technology
NRUF2 131.2 resource use fact 2 NRUF2 131.2 resource use fact 2
## Not in 2003 ## Not in 2003
## In both ## In both
AI 99 Agricultural Inputs AI 99 Agricultural Inputs
AL 85 Arable Land AL 85 Arable Land
AIOPC 43 average industrial output per capita AIOPC 43 average industrial output per capita
DIOPC 40 delayed industrial output per capita DIOPC 40 delayed industrial output per capita
LUFD 82 Delayed Labor Utilization Fraction LUFD 82 Delayed Labor Utilization Fraction
EHSPC 22 effective health services per capita EHSPC 22 effective health services per capita
FCFPC 46 fertility control facilities per capita FCFPC 46 fertility control facilities per capita
IC 52 Industrial Capital IC 52 Industrial Capital
LFERT 121 Land Fertility LFERT 121 Land Fertility
NR 129 Nonrenewable Resources NR 129 Nonrenewable Resources
PFR 128 Perceived Food Ratio PFR 128 Perceived Food Ratio
PLE 37 perceived life expectancy PLE 37 perceived life expectancy
PPOL 142 Persistent Pollution PPOL 142 Persistent Pollution
P1 2 Population 0 To 14 P1 2 Population 0 To 14
P2 6 Population 15 To 44 P2 6 Population 15 To 44
P3 10 Population 45 To 64 P3 10 Population 45 To 64
P4 14 Population 65 Plus P4 14 Population 65 Plus
PAL 86 Potentially Arable Land PAL 86 Potentially Arable Land
SC 67 Service Capital SC 67 Service Capital
UIL 120 Urban and Industrial Land UIL 120 Urban and Industrial Land
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
display(Markdown('## Constant dependencies (or dependencies without dependencies) or components')) display(Markdown('## Constant dependencies (or dependencies without dependencies) or components'))
table = [] table = []
key_table = [] key_table = []
for k in sorted([k for k, v in p_db.items() for k in sorted([k for k, v in p_db.items()
if v['type'] == 'component']): if v['type'] == 'component']):
for c_id in p_db[k]['dependencies']: for c_id in p_db[k]['dependencies']:
if p_db[c_id]['type'] == 'constant' or p_db[c_id]['dependencies'] == None or len(p_db[c_id]['dependencies']) == 0: if p_db[c_id]['type'] == 'constant' or p_db[c_id]['dependencies'] == None or len(p_db[c_id]['dependencies']) == 0:
key_table.append(c_id) key_table.append(c_id)
key_table = set(key_table) key_table = set(key_table)
for c_id in sorted(key_table): for c_id in sorted(key_table):
table.append([p_db[c_id]["abbr"], p_db[c_id]["code"], p_db[c_id]['name']]) table.append([p_db[c_id]["abbr"], p_db[c_id]["code"], p_db[c_id]['name']])
print(tabulate.tabulate(list(table), tablefmt='plain')) print(tabulate.tabulate(list(table), tablefmt='plain'))
``` ```
%% Output %% Output
## Constant dependencies (or dependencies without dependencies) or components ## Constant dependencies (or dependencies without dependencies) or components
AMTI 140.2 agricultural material toxicity index AMTI 140.2 agricultural material toxicity index
ARPTM -- air pollution policy implementation time ARPTM -- air pollution policy implementation time
AHL70 146.1 assimilation half life in 1970 AHL70 146.1 assimilation half life in 1970
AHLMT 145.1 assimilation half life mult table AHLMT 145.1 assimilation half life mult table
ALAI1 100.1 average life of agricultural inputs 1 ALAI1 100.1 average life of agricultural inputs 1
ALAI2 100.2 average life of agricultural inputs 2 ALAI2 100.2 average life of agricultural inputs 2
ALIC1 54.1 average life of industrial capital 1 ALIC1 54.1 average life of industrial capital 1
ALIC2 54.2 average life of industrial capital 2 ALIC2 54.2 average life of industrial capital 2
ALLN 112.1 average life of land normal ALLN 112.1 average life of land normal
ALSC1 69.1 average life of service capital 1 ALSC1 69.1 average life of service capital 1
ALSC2 69.2 average life of service capital 2 ALSC2 69.2 average life of service capital 2
CUFT 83.2 capacity utilization fraction table CUFT 83.2 capacity utilization fraction table
CMPLET 36.1 completed multiplier from perceived lifetime table CMPLET 36.1 completed multiplier from perceived lifetime table
CMIT 27.1 crowding multiplier from industry table CMIT 27.1 crowding multiplier from industry table
DCFSN 38.2 desired completed family size normal DCFSN 38.2 desired completed family size normal
DFR -- desired food ratio DFR -- desired food ratio
DPOLX -- desired persistent pollution index DPOLX -- desired persistent pollution index
DNRUR -- desired resource use rate DNRUR -- desired resource use rate
DCPHT 97.1 development cost per hectare table DCPHT 97.1 development cost per hectare table
Education Index LOOKUP Education Index LOOKUP
FRSNT 41.1 family response to social norm table FRSNT 41.1 family response to social norm table
FMT 34.1 fecundity multiplier table FMT 34.1 fecundity multiplier table
FCET 45.2 fertility control effectiveness table FCET 45.2 fertility control effectiveness table
FCEST 45.1 fertility control effectiveness time FCEST 45.1 fertility control effectiveness time
FIOAA1T 94.1 fraction industrial output allocated to agriculture table 1 FIOAA1T 94.1 fraction industrial output allocated to agriculture table 1
FIOAA2T 95.1 fraction industrial output allocated to agriculture table 2 FIOAA2T 95.1 fraction industrial output allocated to agriculture table 2
FIALDT 108.1 fraction of agricultural inputs allocated to land development table FIALDT 108.1 fraction of agricultural inputs allocated to land development table
FALMT 126.1 fraction of agricultural inputs for land maintenance table FALMT 126.1 fraction of agricultural inputs for land maintenance table
FIPM 140.1 fraction of agricultural inputs from persistent materials FIPM 140.1 fraction of agricultural inputs from persistent materials
FCAOR1T 135.1 fraction of capital allocated to obtaining resources 1 table FCAOR1T 135.1 fraction of capital allocated to obtaining resources 1 table
FCAOR2T 136.1 fraction of capital allocated to obtaining resources 2 table FCAOR2T 136.1 fraction of capital allocated to obtaining resources 2 table
FCAORTM -- fraction of industrial capital allocated to obtaining resources switch time FCAORTM -- fraction of industrial capital allocated to obtaining resources switch time
FIOAC1 58.1 fraction of industrial output allocated to consumption constant 1 FIOAC1 58.1 fraction of industrial output allocated to consumption constant 1
FIOAC2 58.2 fraction of industrial output allocated to consumption constant 2 FIOAC2 58.2 fraction of industrial output allocated to consumption constant 2
FIOACVT 59.1 fraction of industrial output allocated to consumption variable table FIOACVT 59.1 fraction of industrial output allocated to consumption variable table
FIOAS1T 64.1 fraction of industrial output allocated to services table 1 FIOAS1T 64.1 fraction of industrial output allocated to services table 1
FIOAS2T 65.1 fraction of industrial output allocated to services table 2 FIOAS2T 65.1 fraction of industrial output allocated to services table 2
FPUT 26.1 fraction of population urban table FPUT 26.1 fraction of population urban table
FRPM 139.1 fraction of resources from persistent materials FRPM 139.1 fraction of resources from persistent materials
FSAFCT 48.1 fraction services allocated to fertility control table FSAFCT 48.1 fraction services allocated to fertility control table
GDP pc unit GDP pc unit
GDP per capita LOOKUP GDP per capita LOOKUP
ha per Gha ha per Gha
ha per unit of pollution ha per unit of pollution
HSAPCT 21.1 health services per capita table HSAPCT 21.1 health services per capita table
IO70 107.2 IND OUT IN 1970 IO70 107.2 IND OUT IN 1970
IFPC1T 90.1 indicated food per capita table 1 IFPC1T 90.1 indicated food per capita table 1
IFPC2T 90.2 indicated food per capita table 2 IFPC2T 90.2 indicated food per capita table 2
ISOPC1T 61.1 indicated services output per capita table 1 ISOPC1T 61.1 indicated services output per capita table 1
ISOPC2T 62.2 indicated services output per capita table 2 ISOPC2T 62.2 indicated services output per capita table 2
ICOR1 51.1 industrial capital output ratio 1 ICOR1 51.1 industrial capital output ratio 1
COPMT -- industrial capital output ratio multiplier from pollution table COPMT -- industrial capital output ratio multiplier from pollution table
ICOR2TT -- industrial capital output ratio multiplier from resource table ICOR2TT -- industrial capital output ratio multiplier from resource table
COYMT -- industrial capital output ratio multiplier table COYMT -- industrial capital output ratio multiplier table
IET 57.1 industrial equilibrium time IET 57.1 industrial equilibrium time
IMEF 139.2 industrial material emissions factor IMEF 139.2 industrial material emissions factor
IMTI 139.3 industrial material toxicity index IMTI 139.3 industrial material toxicity index
IOPCD 59.2 industrial output per capita desired IOPCD 59.2 industrial output per capita desired
ILF 124.1 inherent land fertility ILF 124.1 inherent land fertility
NRI 129.2 initial nonrenewable resources NRI 129.2 initial nonrenewable resources
JPHT 79.1 jobs per hectare table JPHT 79.1 jobs per hectare table
JPICUT 75.1 jobs per industrial capital unit table JPICUT 75.1 jobs per industrial capital unit table
JPSCUT 77.1 jobs per service capital unit table JPSCUT 77.1 jobs per service capital unit table
LFPF 80.1 labor force participation fraction LFPF 80.1 labor force participation fraction
LFDRT 122.1 land fertility degredation rate table LFDRT 122.1 land fertility degredation rate table
LFRTT 125.1 land fertility regeneration time table LFRTT 125.1 land fertility regeneration time table
LFH 87.1 land fraction harvested LFH 87.1 land fraction harvested
LLMY1T 114.1 land life multiplier from land yield table 1 LLMY1T 114.1 land life multiplier from land yield table 1
LLMY2T 115.1 land life multiplier from land yield table 2 LLMY2T 115.1 land life multiplier from land yield table 2
LLMYTM -- land life policy implementation time LLMYTM -- land life policy implementation time
LYF1 104.1 land yield factor 1 LYF1 104.1 land yield factor 1
LYMAP1T 106.1 land yield multipler from air pollution table 1 LYMAP1T 106.1 land yield multipler from air pollution table 1
LYMAP2T 107.1 land yield multipler from air pollution table 2 LYMAP2T 107.1 land yield multipler from air pollution table 2
LYMCT 102.1 land yield multiplier from capital table LYMCT 102.1 land yield multiplier from capital table
LYCMT -- land yield technology change rate multiplier table LYCMT -- land yield technology change rate multiplier table
Life Expectancy Index LOOKUP Life Expectancy Index LOOKUP
LEN 19.1 life expectancy normal LEN 19.1 life expectancy normal
LMFT 20.1 lifetime multiplier from food table LMFT 20.1 lifetime multiplier from food table
LMHS1T 24.1 lifetime multiplier from health services 1 table LMHS1T 24.1 lifetime multiplier from health services 1 table
LMHS2T 25.1 lifetime multiplier from health services 2 table LMHS2T 25.1 lifetime multiplier from health services 2 table
LMPT 29.1 lifetime multiplier from persistent pollution table LMPT 29.1 lifetime multiplier from persistent pollution table
MLYMCT 111.1 marginal land yield multiplier from capital table MLYMCT 111.1 marginal land yield multiplier from capital table
MTFN 33.1 maximum total fertility normal MTFN 33.1 maximum total fertility normal
M1T 4.1 mortality 0 to 14 table M1T 4.1 mortality 0 to 14 table
M2T 8.1 mortality 15 to 44 table M2T 8.1 mortality 15 to 44 table
M2T 12.1 mortality 45 to 64 table M2T 12.1 mortality 45 to 64 table
M4T 16.1 mortality 65 plus table M4T 16.1 mortality 65 plus table
one year one year
PCRUMT 132.1 per capita resource use mult table PCRUMT 132.1 per capita resource use mult table
PPGF1 138.1 persistent pollution generation factor 1 PPGF1 138.1 persistent pollution generation factor 1
PPOL70 143.1 persistent pollution in 1970 PPOL70 143.1 persistent pollution in 1970
POLGFMT -- persistent pollution technology change mult table POLGFMT -- persistent pollution technology change mult table
PYEAR 150.1 POLICY YEAR PYEAR 150.1 POLICY YEAR
PET 30.2 population equilibrium time PET 30.2 population equilibrium time
PALT 84.1 potentially arable land total PALT 84.1 potentially arable land total
PRICE OF FOOD PRICE OF FOOD
PL 87.2 processing loss PL 87.2 processing loss
Ref Hi GDP Ref Hi GDP
Ref Lo GDP Ref Lo GDP
RLT 30.1 reproductive lifetime RLT 30.1 reproductive lifetime
NRCMT -- resource technology change mult table NRCMT -- resource technology change mult table
NRUF1 131.1 resource use factor 1 NRUF1 131.1 resource use factor 1
SCOR1 72.1 service capital output ratio 1 SCOR1 72.1 service capital output ratio 1
SCOR2 72.2 service capital output ratio 2 SCOR2 72.2 service capital output ratio 2
SD 109.1 social discount SD 109.1 social discount
SFNT 39.1 social family size normal table SFNT 39.1 social family size normal table
SFPC 127.1 subsistence food per capita SFPC 127.1 subsistence food per capita
THOUSAND THOUSAND
TIME STEP TIME STEP
Total Land Total Land
unit agricultural input unit agricultural input
unit population unit population
UILDT 119.1 urban and industrial land development time UILDT 119.1 urban and industrial land development time
UILPCT 117.1 urban and industrial land required per capita table UILPCT 117.1 urban and industrial land required per capita table
ZPGT 38.1 zero population growth time ZPGT 38.1 zero population growth time
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
import json import json
with open('world3-03_variables.json', 'w') as fp: with open(output_path, 'w') as fp:
json.dump(p_db, fp, indent = 4, sort_keys = True) json.dump(p_db, fp, indent = 4, sort_keys = True)
``` ```
......
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
import os
xmile_file_path = os.path.join('..', 'models', 'WRLD3-03', 'world3.stmx')
w3_72_vars_lists_dir = os.path.join('..', 'models', 'WRLD3-72')
```
%% Cell type:code id: tags:
``` python
from xml.dom import minidom from xml.dom import minidom
import re import re
from functools import reduce from functools import reduce
def disp(text): def disp(text):
''' '''
Affiche du texte à partir de la source Markdown Affiche du texte à partir de la source Markdown
''' '''
from IPython.display import Markdown from IPython.display import Markdown
return display(Markdown(text)) return display(Markdown(text))
def getVariablesByIdFrom(names_list, var_id): def getVariablesByIdFrom(names_list, var_id):
return filter(lambda a: a.endswith('_' + var_id), names_list) return filter(lambda a: a.endswith('_' + var_id), names_list)
def getDependenciesOfVarByIdFrom(p): def getDependenciesOfVarByIdFrom(p):
global aux_items global aux_items
eqn = [ eqn = [
i.getElementsByTagName('eqn')[0].childNodes[0].nodeValue i.getElementsByTagName('eqn')[0].childNodes[0].nodeValue
for i in aux_items for i in aux_items
if i.attributes['name'].value.endswith('_' + p) if i.attributes['name'].value.endswith('_' + p)
][0] ]
return re.sub(r'\W', ' ', eqn).split(' ') if len(eqn) > 0:
return re.sub(r'\W', ' ', eqn[0]).split(' ')
else:
return 'no equation'
def not_in_list(w3_03_names, w3_72_nos): def not_in_list(w3_03_names, w3_72_nos):
''' '''
Retourne deux listes : les paramètres effectivement non trouvés, et une liste de tuples contenant Retourne deux listes : les paramètres effectivement non trouvés, et une liste de tuples contenant
le numéro des paramètres non trouvés en première position et une liste de ses dépendances en le numéro des paramètres non trouvés en première position et une liste de ses dépendances en
deuxième position SI les dépendances se trouvent dans la liste de W3 2003 deuxième position SI les dépendances se trouvent dans la liste de W3 2003
''' '''
not_found = [] not_found = []
has_dep = [] has_dep = []
found = list( found = list(
map( map(
lambda a: a.split('_')[-1], lambda a: a.split('_')[-1],
w3_03_names w3_03_names
) )
) )
for p in w3_72_nos: for p in w3_72_nos:
if p not in found: if p not in found:
all_dependencies = getDependenciesOfVarByIdFrom(p) all_dependencies = getDependenciesOfVarByIdFrom(p)
deps = [_ for _ in all_dependencies if _ in w3_03_names] deps = [_ for _ in all_dependencies if _ in w3_03_names]
if len(deps): if len(deps):
has_dep.append((p, deps)) has_dep.append((p, deps))
else: else:
nf_name = ", ".join(getVariablesByIdFrom(all_names, p)) nf_name = ", ".join(getVariablesByIdFrom(all_names, p))
not_found.append(nf_name) not_found.append(nf_name)
return not_found, has_dep return not_found, has_dep
def item_list_to_names_values(item_list): def item_list_to_names_values(item_list):
items_names = list([e.attributes['name'].value for e in item_list]) items_names = list([e.attributes['name'].value for e in item_list])
items_values = list([e.getElementsByTagName('eqn')[0].childNodes[0].nodeValue for e in item_list]) items_values = list([e.getElementsByTagName('eqn')[0].childNodes[0].nodeValue for e in item_list])
return dict(zip(items_names, items_values)) return dict(zip(items_names, items_values))
def disp_item_list(var_dict, list_name = 'List', w3_72_nos = None): def disp_item_list(var_dict, list_name = 'List', w3_72_nos = None):
''' '''
Affiche une liste d'Element DOM avec un titre list_name Affiche une liste d'Element DOM avec un titre list_name
''' '''
items_names = var_dict.keys() items_names = var_dict.keys()
items_values = var_dict.values() items_values = var_dict.values()
disp('## ' + list_name + ' (' + str(len(items_names)) + ')') disp('## ' + list_name + ' (' + str(len(items_names)) + ')')
not_found = has_dep = None not_found = has_dep = None
if w3_72_nos != None: if w3_72_nos != None:
def color_w3_72(p): def color_w3_72(p):
''' '''
Coloration en bleu des paramètres nouveaux dans W3-03 et en rouge de ceux qui sont dépendant Coloration en bleu des paramètres nouveaux dans W3-03 et en rouge de ceux qui sont dépendant
de ceux sélectionnés dans l'AS de W3-72 de ceux sélectionnés dans l'AS de W3-72
''' '''
if w3_72_nos != None and p.split('_')[-1] in w3_72_nos: if w3_72_nos != None and p.split('_')[-1] in w3_72_nos:
return p return p
elif has_dep != None and p in deps: elif has_dep != None and p in deps:
return '<span style="color: red">' + p + '</span>' return '<span style="color: red">' + p + '</span>'
else: else:
return '<span style="color: blue">' + p + '</span>' return '<span style="color: blue">' + p + '</span>'
not_found, has_dep = not_in_list(items_names, w3_72_nos) not_found, has_dep = not_in_list(items_names, w3_72_nos)
deps = sum([d[1] for d in has_dep], []) deps = sum([d[1] for d in has_dep], [])
disp_items_names = map(color_w3_72, items_names) disp_items_names = map(color_w3_72, items_names)
else: else:
disp_items_names = items_names disp_items_names = items_names
disp_items_values = items_values disp_items_values = items_values
disp_items = list(zip(disp_items_names, disp_items_values)) disp_items = list(zip(disp_items_names, disp_items_values))
to_disp = reduce(lambda s, i: str(s) + '* ' + str(i[0]) + ' (' + str(i[1]) + ') \n', disp_items) to_disp = reduce(lambda s, i: str(s) + '* ' + str(i[0]) + ' (' + str(i[1]) + ') \n', disp_items)
disp(to_disp) disp(to_disp)
return items_names, not_found, has_dep return items_names, not_found, has_dep
def import_w3_72_list(filename): def import_w3_72_list(filename):
''' '''
Importe une liste de variables de W3-72 : Importe une liste de variables de W3-72 :
sur chaque ligne, l'acronyme de la variable et son identifiant numérique séparés d'un espace sur chaque ligne, l'acronyme de la variable et son identifiant numérique séparés d'un espace
retourne la liste des identifiants numériques retourne la liste des identifiants numériques
''' '''
w3_72_list_file = open(filename) w3_72_list_file = open(filename)
w3_72_list = list( w3_72_list = list(
map( map(
lambda a: a.split(" ")[1].split('.', 1)[0], lambda a: a.split(" ")[1].split('.', 1)[0],
filter( filter(
lambda a: a != '', lambda a: a != '',
w3_72_list_file.read().split('\n') w3_72_list_file.read().split('\n')
) )
) )
) )
w3_72_list_file.close() w3_72_list_file.close()
return w3_72_list return w3_72_list
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
xmldoc = minidom.parse('world3.stmx') xmldoc = minidom.parse(xmile_file_path)
aux_items = xmldoc.getElementsByTagName('aux') aux_items = xmldoc.getElementsByTagName('aux')
aux_vars_dict = item_list_to_names_values(aux_items) aux_vars_dict = item_list_to_names_values(aux_items)
aux_items_name = disp_item_list(aux_vars_dict) aux_items_name = disp_item_list(aux_vars_dict)
all_vars_dict = item_list_to_names_values(sum([xmldoc.getElementsByTagName('aux'), xmldoc.getElementsByTagName('stock'), xmldoc.getElementsByTagName('flow')], [])) all_vars_dict = item_list_to_names_values(sum([xmldoc.getElementsByTagName('aux'), xmldoc.getElementsByTagName('stock'), xmldoc.getElementsByTagName('flow')], []))
all_names = all_vars_dict.keys() all_names = all_vars_dict.keys()
#print(all_names) #print(all_names)
``` ```
%% Output %% Output
## List (192) ## List (192)
('deaths_17', 'deaths_0_to_14_3+deaths_15_to_44_7+deaths_45_to_64_11+deaths_65_plus_15')* death_rate_18 (1000*deaths_17/population_1) ('deaths_17', 'deaths_0_to_14_3+deaths_15_to_44_7+deaths_45_to_64_11+deaths_65_plus_15')* death_rate_18 (1000*deaths_17/population_1)
* labor_force_partic_80 (.75) * labor_force_partic_80 (.75)
* population_1 (pop_0_to_14_2+pop_15_to_44_6+pop_45_to_64_10+pop_65_plus_14) * population_1 (pop_0_to_14_2+pop_15_to_44_6+pop_45_to_64_10+pop_65_plus_14)
* labor_force_80 ((pop_15_to_44_6+pop_45_to_64_10)*labor_force_partic_80) * labor_force_80 ((pop_15_to_44_6+pop_45_to_64_10)*labor_force_partic_80)
* mortal_65_plus_16 (life_expectancy_19) * mortal_65_plus_16 (life_expectancy_19)
* mortal_45_to_64_12 (life_expectancy_19) * mortal_45_to_64_12 (life_expectancy_19)
* mortal_15_to_44_8 (life_expectancy_19) * mortal_15_to_44_8 (life_expectancy_19)
* mortal_0_to_14_4 (life_expectancy_19) * mortal_0_to_14_4 (life_expectancy_19)
* reproductive_lifetime_30 (30) * reproductive_lifetime_30 (30)
* birth_rt_31 (1000*births_30/population_1) * birth_rt_31 (1000*births_30/population_1)
* total_fertility_32 (MIN(max_tot_fert_33, (max_tot_fert_33*(1-fert_cont_eff_45)+des_tot_fert_35*fert_cont_eff_45))) * total_fertility_32 (MIN(max_tot_fert_33, (max_tot_fert_33*(1-fert_cont_eff_45)+des_tot_fert_35*fert_cont_eff_45)))
* life_expectancy_19 (life_expect_norm_19*lifet_mlt_food_20*lifet_mult_hlth_serv_23*lifet_mlt_ppoll_29*lifet_mlt_crowd_28) * life_expectancy_19 (life_expect_norm_19*lifet_mlt_food_20*lifet_mult_hlth_serv_23*lifet_mlt_ppoll_29*lifet_mlt_crowd_28)
* life_expect_norm_19 (28) * life_expect_norm_19 (28)
* lifet_mlt_ppoll_29 (ppoll_index_143) * lifet_mlt_ppoll_29 (ppoll_index_143)
* lifet_mult_hlth_serv_23 (IF (time > 1940) then lifet_mlt_hlth_serv_2_25 else lifet_mlt_hlth_serv_1_24) * lifet_mult_hlth_serv_23 (IF (time > 1940) then lifet_mlt_hlth_serv_2_25 else lifet_mlt_hlth_serv_1_24)
* ind_out_pc_des_59 (400) * ind_out_pc_des_59 (400)
* lifet_mlt_food_20 (food_pc__88/subsist_food_pc_127) * lifet_mlt_food_20 (food_pc__88/subsist_food_pc_127)
* lifet_mlt_crowd_28 (1-(crowd_mult_ind_27*fr_pop_urban_26)) * lifet_mlt_crowd_28 (1-(crowd_mult_ind_27*fr_pop_urban_26))
* eff_hlth_serv_pc_22 (SMTH1(hlth_serv_al_pc_21,hlth_serv_impact_del_22)) * eff_hlth_serv_pc_22 (SMTH1(hlth_serv_al_pc_21,hlth_serv_impact_del_22))
* hlth_serv_al_pc_21 (serv_out_pc_71) * hlth_serv_al_pc_21 (serv_out_pc_71)
* crowd_mult_ind_27 (ind_out_pc_49) * crowd_mult_ind_27 (ind_out_pc_49)
* fr_pop_urban_26 (population_1) * fr_pop_urban_26 (population_1)
* hlth_serv_impact_del_22 (20) * hlth_serv_impact_del_22 (20)
* fert_cont_eff_45 (if (time > t_fert_cont_eff_time_45) then 1 else fert_cont_eff_table_45) * fert_cont_eff_45 (if (time > t_fert_cont_eff_time_45) then 1 else fert_cont_eff_table_45)
* fert_cont_facil_pc_46 (SMTH3(fert_cont_al_pc_47,hlth_serv_impact_del_22)) * fert_cont_facil_pc_46 (SMTH3(fert_cont_al_pc_47,hlth_serv_impact_del_22))
* des_compl_fam_size_38 (if ( time > t_zero_pop_grow_time_38) then 2.0 else (des_compl_fam_size_norm_38*fam_resp_to_soc_norm_41*soc_fam_size_norm_39)) * des_compl_fam_size_38 (if ( time > t_zero_pop_grow_time_38) then 2.0 else (des_compl_fam_size_norm_38*fam_resp_to_soc_norm_41*soc_fam_size_norm_39))
* fert_cont_al_pc_47 (fr_serv_al_fert_cont_48*serv_out_pc_71) * fert_cont_al_pc_47 (fr_serv_al_fert_cont_48*serv_out_pc_71)
* fam_income_expect_42 ((ind_out_pc_49-avg_ind_out_pc_43)/avg_ind_out_pc_43) * fam_income_expect_42 ((ind_out_pc_49-avg_ind_out_pc_43)/avg_ind_out_pc_43)
* income_expect_avg_time_43 (3) * income_expect_avg_time_43 (3)
* avg_ind_out_pc_43 (SMTH1(ind_out_pc_49,income_expect_avg_time_43)) * avg_ind_out_pc_43 (SMTH1(ind_out_pc_49,income_expect_avg_time_43))
* fam_resp_to_soc_norm_41 (fam_income_expect_42) * fam_resp_to_soc_norm_41 (fam_income_expect_42)
* soc_fam_size_norm_39 (del_ind_out_pc_40) * soc_fam_size_norm_39 (del_ind_out_pc_40)
* social_adj_del_40 (20) * social_adj_del_40 (20)
* del_ind_out_pc_40 (SMTH3(ind_out_pc_49,social_adj_del_40)) * del_ind_out_pc_40 (SMTH3(ind_out_pc_49,social_adj_del_40))
* lifet_perc_del_37 (20) * lifet_perc_del_37 (20)
* perc_life_expectancy_37 (SMTH3(life_expectancy_19,lifet_perc_del_37)) * perc_life_expectancy_37 (SMTH3(life_expectancy_19,lifet_perc_del_37))
* compl_mlt_perc_lifet_36 (perc_life_expectancy_37) * compl_mlt_perc_lifet_36 (perc_life_expectancy_37)
* max_tot_fert_norm_33 (12) * max_tot_fert_norm_33 (12)
* fecundity_mult_34 (life_expectancy_19) * fecundity_mult_34 (life_expectancy_19)
* need_for_fert_cont_44 ((max_tot_fert_33/des_tot_fert_35)-1) * need_for_fert_cont_44 ((max_tot_fert_33/des_tot_fert_35)-1)
* fr_serv_al_fert_cont_48 (need_for_fert_cont_44) * fr_serv_al_fert_cont_48 (need_for_fert_cont_44)
* des_tot_fert_35 (des_compl_fam_size_38*compl_mlt_perc_lifet_36) * des_tot_fert_35 (des_compl_fam_size_38*compl_mlt_perc_lifet_36)
* max_tot_fert_33 (max_tot_fert_norm_33*fecundity_mult_34) * max_tot_fert_33 (max_tot_fert_norm_33*fecundity_mult_34)
* des_compl_fam_size_norm_38 (3.8) * des_compl_fam_size_norm_38 (3.8)
* s_avg_life_serv_cap_69 (if (time > t_policy_year_150) then p_avg_life_serv_cap_2_69 else p_avg_life_serv_cap_1_69) * s_avg_life_serv_cap_69 (if (time > t_policy_year_150) then p_avg_life_serv_cap_2_69 else p_avg_life_serv_cap_1_69)
* s_avg_life_ind_cap_54 (if (time > t_policy_year_150) then p_avg_life_ind_cap_2_54 else p_avg_life_ind_cap_1_54) * s_avg_life_ind_cap_54 (if (time > t_policy_year_150) then p_avg_life_ind_cap_2_54 else p_avg_life_ind_cap_1_54)
* s_fioa_serv_63 (if (time > t_policy_year_150) then p_fr_io_al_serv_2_65 else p_fr_io_al_serv_1_64) * s_fioa_serv_63 (if (time > t_policy_year_150) then p_fr_io_al_serv_2_65 else p_fr_io_al_serv_1_64)
* service_output_70 ((service_capital_67*capacity_util_fr_83)/s_serv_cap_out_ratio_72) * service_output_70 ((service_capital_67*capacity_util_fr_83)/s_serv_cap_out_ratio_72)
* s_serv_cap_out_ratio_72 (if (time > t_policy_year_150) then p_serv_cap_out_ratio_2_72 else p_serv_cap_out_ratio_1_72) * s_serv_cap_out_ratio_72 (if (time > t_policy_year_150) then p_serv_cap_out_ratio_2_72 else p_serv_cap_out_ratio_1_72)
* s_indic_serv_pc_60 (if (time > t_policy_year_150) then p_indic_serv_pc_2_62 else p_indic_serv_pc_1_61) * s_indic_serv_pc_60 (if (time > t_policy_year_150) then p_indic_serv_pc_2_62 else p_indic_serv_pc_1_61)
* fioa_ind_56 ((1-s_fioa_agr_93-s_fioa_serv_63-s_fioa_cons_57)) * fioa_ind_56 ((1-s_fioa_agr_93-s_fioa_serv_63-s_fioa_cons_57))
* s_fioa_cons_57 (if (time > t_ind_equil_time_57) then p_fioa_cons_var_59 else s_fioa_cons_const_58) * s_fioa_cons_57 (if (time > t_ind_equil_time_57) then p_fioa_cons_var_59 else s_fioa_cons_const_58)
* industrial_output_50 (industrial_capital_52*(1-s_fr_cap_al_obt_res_134)*capacity_util_fr_83/s_ind_cap_out_ratio_51) * industrial_output_50 (industrial_capital_52*(1-s_fr_cap_al_obt_res_134)*capacity_util_fr_83/s_ind_cap_out_ratio_51)
* s_ind_cap_out_ratio_51 (if (time > t_policy_year_150) then p_ind_cap_out_ratio_2_51 else p_ind_cap_out_ratio_1_51) * s_ind_cap_out_ratio_51 (if (time > t_policy_year_150) then p_ind_cap_out_ratio_2_51 else p_ind_cap_out_ratio_1_51)
* pot_jobs_ind_sector_74 (industrial_capital_52*jobs_per_ind_cap_unit_75) * pot_jobs_ind_sector_74 (industrial_capital_52*jobs_per_ind_cap_unit_75)
* jobs_per_ind_cap_unit_75 (ind_out_pc_49) * jobs_per_ind_cap_unit_75 (ind_out_pc_49)
* ind_out_pc_49 (industrial_output_50/population_1) * ind_out_pc_49 (industrial_output_50/population_1)
* capacity_util_fr_83 (labor_util_fr_del_82) * capacity_util_fr_83 (labor_util_fr_del_82)
* serv_out_pc_71 (service_output_70/population_1) * serv_out_pc_71 (service_output_70/population_1)
* jobs_per_serv_cap_unit_77 (serv_out_pc_71) * jobs_per_serv_cap_unit_77 (serv_out_pc_71)
* pot_jobs_in_serv_sector_76 (service_capital_67*jobs_per_serv_cap_unit_77) * pot_jobs_in_serv_sector_76 (service_capital_67*jobs_per_serv_cap_unit_77)
* jobs_73 (pot_jobs_ind_sector_74+pot_jobs_agr_sector_78+pot_jobs_in_serv_sector_76) * jobs_73 (pot_jobs_ind_sector_74+pot_jobs_agr_sector_78+pot_jobs_in_serv_sector_76)
* labor_util_fr_del_time_82 (2) * labor_util_fr_del_time_82 (2)
* labor_util_fr_81 (jobs_73/labor_force_80) * labor_util_fr_81 (jobs_73/labor_force_80)
* pot_jobs_agr_sector_78 (jobs_per_hect_79*arable_land_85) * pot_jobs_agr_sector_78 (jobs_per_hect_79*arable_land_85)
* jobs_per_hect_79 (agr_inp_per_hect_101) * jobs_per_hect_79 (agr_inp_per_hect_101)
* t_pop_equil_time_30 (4000) * t_pop_equil_time_30 (4000)
* lifet_mlt_hlth_serv_1_24 (eff_hlth_serv_pc_22) * lifet_mlt_hlth_serv_1_24 (eff_hlth_serv_pc_22)
* lifet_mlt_hlth_serv_2_25 (eff_hlth_serv_pc_22) * lifet_mlt_hlth_serv_2_25 (eff_hlth_serv_pc_22)
* fert_cont_eff_table_45 (fert_cont_facil_pc_46) * fert_cont_eff_table_45 (fert_cont_facil_pc_46)
* t_fert_cont_eff_time_45 (4000) * t_fert_cont_eff_time_45 (4000)
* t_zero_pop_grow_time_38 (4000) * t_zero_pop_grow_time_38 (4000)
* pc_res_use_mlt_132 (ind_out_pc_49) * pc_res_use_mlt_132 (ind_out_pc_49)
* s_nr_res_use_fact_131 (if (time > t_policy_year_150) then p_nr_res_use_fact_2_131 else p_nr_res_use_fact_1_131) * s_nr_res_use_fact_131 (if (time > t_policy_year_150) then p_nr_res_use_fact_2_131 else p_nr_res_use_fact_1_131)
* nr_res_fr_remain_133 (nr_resources_129/init(nr_resources_129)) * nr_res_fr_remain_133 (nr_resources_129/init(nr_resources_129))
* s_fr_cap_al_obt_res_134 (if (time > t_fcaor_time) then p_fr_cap_al_obt_res_2_136 else p_fr_cap_al_obt_res_1_135) * s_fr_cap_al_obt_res_134 (if (time > t_fcaor_time) then p_fr_cap_al_obt_res_2_136 else p_fr_cap_al_obt_res_1_135)
* s_ppoll_gen_fact_138 (if (time > t_policy_year_150) then p_ppoll_gen_fact_2_138 else p_ppoll_gen_fact_1_138) * s_ppoll_gen_fact_138 (if (time > t_policy_year_150) then p_ppoll_gen_fact_2_138 else p_ppoll_gen_fact_1_138)
* ppoll_gen_rt_137 ((ppoll_gen_ind_139+ppoll_gen_agr_140)*s_ppoll_gen_fact_138) * ppoll_gen_rt_137 ((ppoll_gen_ind_139+ppoll_gen_agr_140)*s_ppoll_gen_fact_138)
* ppoll_gen_ind_139 (pc_res_use_mlt_132*population_1*frac_res_pers_mtl_139*ind_mtl_emiss_fact_139*ind_mtl_toxic_index_139) * ppoll_gen_ind_139 (pc_res_use_mlt_132*population_1*frac_res_pers_mtl_139*ind_mtl_emiss_fact_139*ind_mtl_toxic_index_139)
* ind_mtl_emiss_fact_139 (.1) * ind_mtl_emiss_fact_139 (.1)
* ind_mtl_toxic_index_139 (10) * ind_mtl_toxic_index_139 (10)
* frac_res_pers_mtl_139 (.02) * frac_res_pers_mtl_139 (.02)
* fr_agr_inp_pers_mtl_140 (.001) * fr_agr_inp_pers_mtl_140 (.001)
* ppoll_gen_agr_140 (agr_inp_per_hect_101*arable_land_85*fr_agr_inp_pers_mtl_140*agr_mtl_toxic_index_140) * ppoll_gen_agr_140 (agr_inp_per_hect_101*arable_land_85*fr_agr_inp_pers_mtl_140*agr_mtl_toxic_index_140)
* agr_mtl_toxic_index_140 (1) * agr_mtl_toxic_index_140 (1)
* ppoll_trans_del_141 (20) * ppoll_trans_del_141 (20)
* assim_half_life_146 (assim_half_life_1970_146*assim_half_life_mlt_145) * assim_half_life_146 (assim_half_life_1970_146*assim_half_life_mlt_145)
* assim_half_life_mlt_145 (ppoll_index_143) * assim_half_life_mlt_145 (ppoll_index_143)
* ppoll_index_143 (pers_pollution_142/ppoll_in_1970_143) * ppoll_index_143 (pers_pollution_142/ppoll_in_1970_143)
* ppoll_in_1970_143 (1.36e8) * ppoll_in_1970_143 (1.36e8)
* assim_half_life_1970_146 (1.5) * assim_half_life_1970_146 (1.5)
* land_fert_degr_rt_122 (ppoll_index_143) * land_fert_degr_rt_122 (ppoll_index_143)
* inherent_land_fert_124 (600) * inherent_land_fert_124 (600)
* land_fert_regen_time_125 (p_fr_inp_for_land_maint_126) * land_fert_regen_time_125 (p_fr_inp_for_land_maint_126)
* p_fr_inp_for_land_maint_126 (perc_food_ratio_128) * p_fr_inp_for_land_maint_126 (perc_food_ratio_128)
* food_ratio_127 (food_pc__88/subsist_food_pc_127) * food_ratio_127 (food_pc__88/subsist_food_pc_127)
* subsist_food_pc_127 (230) * subsist_food_pc_127 (230)
* food_pc__88 (food_87/population_1) * food_pc__88 (food_87/population_1)
* food_87 (land_yield_103*arable_land_85*land_fr_harvested_87*(1-processing_loss_87)) * food_87 (land_yield_103*arable_land_85*land_fr_harvested_87*(1-processing_loss_87))
* land_fr_harvested_87 (.7) * land_fr_harvested_87 (.7)
* processing_loss_87 (.1) * processing_loss_87 (.1)
* agr_inp_per_hect_101 (agr_inp_99*(1-p_fr_inp_for_land_maint_126)/arable_land_85) * agr_inp_per_hect_101 (agr_inp_99*(1-p_fr_inp_for_land_maint_126)/arable_land_85)
* marg_land_yield_mlt_cap_111 (agr_inp_per_hect_101) * marg_land_yield_mlt_cap_111 (agr_inp_per_hect_101)
* land_yield_mlt_cap_102 (agr_inp_per_hect_101) * land_yield_mlt_cap_102 (agr_inp_per_hect_101)
* urb_ind_land_dev_time_119 (10) * urb_ind_land_dev_time_119 (10)
* avg_life_land_112 (avg_life_land_norm_112*s_land_life_mlt_yield_113) * avg_life_land_112 (avg_life_land_norm_112*s_land_life_mlt_yield_113)
* avg_life_land_norm_112 (1000) * avg_life_land_norm_112 (1000)
* s_land_life_mlt_yield_113 (if (time > t_land_life_time) then .95^(time-t_land_life_time)*p_land_life_mlt_yield_1_114 + (1-.95^(time-t_land_life_time))*p_land_life_mlt_yield_2_115 else p_land_life_mlt_yield_1_114) * s_land_life_mlt_yield_113 (if (time > t_land_life_time) then .95^(time-t_land_life_time)*p_land_life_mlt_yield_1_114 + (1-.95^(time-t_land_life_time))*p_land_life_mlt_yield_2_115 else p_land_life_mlt_yield_1_114)
* land_yield_103 (s_land_yield_fact_104*land_fertility_121*land_yield_mlt_cap_102*s_yield_mlt_air_poll_105) * land_yield_103 (s_land_yield_fact_104*land_fertility_121*land_yield_mlt_cap_102*s_yield_mlt_air_poll_105)
* s_land_yield_fact_104 (if (time > t_policy_year_150) then p_land_yield_fact_2_104 else p_land_yield_fact_1_104) * s_land_yield_fact_104 (if (time > t_policy_year_150) then p_land_yield_fact_2_104 else p_land_yield_fact_1_104)
* s_yield_mlt_air_poll_105 (if (time > t_air_poll_time) then p_yield_mlt_air_poll_2_107 else p_yield_mlt_air_poll_1_106) * s_yield_mlt_air_poll_105 (if (time > t_air_poll_time) then p_yield_mlt_air_poll_2_107 else p_yield_mlt_air_poll_1_106)
* urb_ind_land_req_118 (urb_ind_land_pc_117*population_1) * urb_ind_land_req_118 (urb_ind_land_pc_117*population_1)
* dev_cost_per_hect_97 (pot_arable_land_86/pot_arable_land_tot_84) * dev_cost_per_hect_97 (pot_arable_land_86/pot_arable_land_tot_84)
* pot_arable_land_tot_84 (3.2e9) * pot_arable_land_tot_84 (3.2e9)
* marg_prod_land_dev_109 (land_yield_103/(dev_cost_per_hect_97*social_discount_109)) * marg_prod_land_dev_109 (land_yield_103/(dev_cost_per_hect_97*social_discount_109))
* social_discount_109 (.07) * social_discount_109 (.07)
* land_fr_cult_84 (arable_land_85/pot_arable_land_tot_84) * land_fr_cult_84 (arable_land_85/pot_arable_land_tot_84)
* fr_inp_al_land_dev_108 (marg_prod_land_dev_109/marg_prod_agr_inp_110) * fr_inp_al_land_dev_108 (marg_prod_land_dev_109/marg_prod_agr_inp_110)
* marg_prod_agr_inp_110 (s_avg_life_agr_inp_100*land_yield_103*marg_land_yield_mlt_cap_111/land_yield_mlt_cap_102) * marg_prod_agr_inp_110 (s_avg_life_agr_inp_100*land_yield_103*marg_land_yield_mlt_cap_111/land_yield_mlt_cap_102)
* current_agr_inp_98 (tot_agric_invest_92*(1-fr_inp_al_land_dev_108)) * current_agr_inp_98 (tot_agric_invest_92*(1-fr_inp_al_land_dev_108))
* tot_agric_invest_92 (industrial_output_50*s_fioa_agr_93) * tot_agric_invest_92 (industrial_output_50*s_fioa_agr_93)
* s_avg_life_agr_inp_100 (if (time > t_policy_year_150) then p_avg_life_agr_inp_2_100 else p_avg_life_agr_inp_1_100) * s_avg_life_agr_inp_100 (if (time > t_policy_year_150) then p_avg_life_agr_inp_2_100 else p_avg_life_agr_inp_1_100)
* urb_ind_land_pc_117 (ind_out_pc_49) * urb_ind_land_pc_117 (ind_out_pc_49)
* s_indic_food_pc_89 (if (time > t_policy_year_150) then p_indic_food_pc_2_91 else p_indic_food_pc_1_90) * s_indic_food_pc_89 (if (time > t_policy_year_150) then p_indic_food_pc_2_91 else p_indic_food_pc_1_90)
* p_fr_io_al_agr_1_94 (food_pc__88/s_indic_food_pc_89) * p_fr_io_al_agr_1_94 (food_pc__88/s_indic_food_pc_89)
* food_short_perc_del_128 (2) * food_short_perc_del_128 (2)
* p_fr_io_al_agr_2_95 (food_pc__88/s_indic_food_pc_89) * p_fr_io_al_agr_2_95 (food_pc__88/s_indic_food_pc_89)
* s_fioa_agr_93 (if (time > t_policy_year_150) then p_fr_io_al_agr_2_95 else p_fr_io_al_agr_1_94) * s_fioa_agr_93 (if (time > t_policy_year_150) then p_fr_io_al_agr_2_95 else p_fr_io_al_agr_1_94)
* p_indic_food_pc_1_90 (ind_out_pc_49) * p_indic_food_pc_1_90 (ind_out_pc_49)
* p_indic_food_pc_2_91 (ind_out_pc_49) * p_indic_food_pc_2_91 (ind_out_pc_49)
* p_yield_mlt_air_poll_1_106 (industrial_output_50/ind_out_in_1970_107) * p_yield_mlt_air_poll_1_106 (industrial_output_50/ind_out_in_1970_107)
* p_yield_mlt_air_poll_2_107 (industrial_output_50/ind_out_in_1970_107) * p_yield_mlt_air_poll_2_107 (industrial_output_50/ind_out_in_1970_107)
* p_land_life_mlt_yield_1_114 (land_yield_103/inherent_land_fert_124) * p_land_life_mlt_yield_1_114 (land_yield_103/inherent_land_fert_124)
* p_land_life_mlt_yield_2_115 (land_yield_103/inherent_land_fert_124) * p_land_life_mlt_yield_2_115 (land_yield_103/inherent_land_fert_124)
* p_fr_cap_al_obt_res_1_135 (nr_res_fr_remain_133) * p_fr_cap_al_obt_res_1_135 (nr_res_fr_remain_133)
* p_fr_cap_al_obt_res_2_136 (nr_res_fr_remain_133) * p_fr_cap_al_obt_res_2_136 (nr_res_fr_remain_133)
* p_indic_serv_pc_1_61 (ind_out_pc_49) * p_indic_serv_pc_1_61 (ind_out_pc_49)
* p_indic_serv_pc_2_62 (ind_out_pc_49) * p_indic_serv_pc_2_62 (ind_out_pc_49)
* p_fr_io_al_serv_1_64 (serv_out_pc_71/s_indic_serv_pc_60) * p_fr_io_al_serv_1_64 (serv_out_pc_71/s_indic_serv_pc_60)
* p_fr_io_al_serv_2_65 (serv_out_pc_71/s_indic_serv_pc_60) * p_fr_io_al_serv_2_65 (serv_out_pc_71/s_indic_serv_pc_60)
* s_fioa_cons_const_58 (if (time > t_policy_year_150) then p_fioa_cons_const_2_58 else p_fioa_cons_const_1_58) * s_fioa_cons_const_58 (if (time > t_policy_year_150) then p_fioa_cons_const_2_58 else p_fioa_cons_const_1_58)
* p_fioa_cons_var_59 (ind_out_pc_49/ind_out_pc_des_59) * p_fioa_cons_var_59 (ind_out_pc_49/ind_out_pc_des_59)
* t_ind_equil_time_57 (4000) * t_ind_equil_time_57 (4000)
* p_ind_cap_out_ratio_1_51 (3) * p_ind_cap_out_ratio_1_51 (3)
* p_ind_cap_out_ratio_2_51 (ind_cap_out_ratio_2_ICOR2T*yield_tech_mult_icor_COYM*ppoll_tech_mult_icor_COPM) * p_ind_cap_out_ratio_2_51 (ind_cap_out_ratio_2_ICOR2T*yield_tech_mult_icor_COYM*ppoll_tech_mult_icor_COPM)
* t_policy_year_150 (4000) * t_policy_year_150 (4000)
* p_avg_life_ind_cap_1_54 (14) * p_avg_life_ind_cap_1_54 (14)
* p_avg_life_ind_cap_2_54 (14) * p_avg_life_ind_cap_2_54 (14)
* p_fioa_cons_const_1_58 (.43) * p_fioa_cons_const_1_58 (.43)
* p_fioa_cons_const_2_58 (.43) * p_fioa_cons_const_2_58 (.43)
* p_avg_life_serv_cap_2_69 (20) * p_avg_life_serv_cap_2_69 (20)
* p_avg_life_serv_cap_1_69 (20) * p_avg_life_serv_cap_1_69 (20)
* p_serv_cap_out_ratio_1_72 (1) * p_serv_cap_out_ratio_1_72 (1)
* p_serv_cap_out_ratio_2_72 (1) * p_serv_cap_out_ratio_2_72 (1)
* p_avg_life_agr_inp_1_100 (2) * p_avg_life_agr_inp_1_100 (2)
* p_avg_life_agr_inp_2_100 (2) * p_avg_life_agr_inp_2_100 (2)
* p_land_yield_fact_1_104 (1) * p_land_yield_fact_1_104 (1)
* p_land_yield_fact_2_104 (SMTH3(yield_tech_LYTD,tech_dev_del_TDD)) * p_land_yield_fact_2_104 (SMTH3(yield_tech_LYTD,tech_dev_del_TDD))
* p_nr_res_use_fact_1_131 (1) * p_nr_res_use_fact_1_131 (1)
* p_nr_res_use_fact_2_131 (SMTH3(res_tech_NRTD,tech_dev_del_TDD)) * p_nr_res_use_fact_2_131 (SMTH3(res_tech_NRTD,tech_dev_del_TDD))
* p_ppoll_gen_fact_1_138 (1) * p_ppoll_gen_fact_1_138 (1)
* p_ppoll_gen_fact_2_138 (SMTH3(ppoll_tech_PTD,tech_dev_del_TDD)) * p_ppoll_gen_fact_2_138 (SMTH3(ppoll_tech_PTD,tech_dev_del_TDD))
* tech_dev_del_TDD (20) * tech_dev_del_TDD (20)
* p_res_tech_chg_mlt_NRCM (1-nr_res_use_rate_130/des_res_use_rt_DNRUR) * p_res_tech_chg_mlt_NRCM (1-nr_res_use_rate_130/des_res_use_rt_DNRUR)
* des_res_use_rt_DNRUR (4.8e9) * des_res_use_rt_DNRUR (4.8e9)
* ind_cap_out_ratio_2_ICOR2T (s_nr_res_use_fact_131) * ind_cap_out_ratio_2_ICOR2T (s_nr_res_use_fact_131)
* ind_out_in_1970_107 (7.9e11) * ind_out_in_1970_107 (7.9e11)
* p_ppoll_tech_chg_mlt_POLGFM (1-ppoll_index_143/des_ppoll_index_DPOLX) * p_ppoll_tech_chg_mlt_POLGFM (1-ppoll_index_143/des_ppoll_index_DPOLX)
* des_ppoll_index_DPOLX (1.2) * des_ppoll_index_DPOLX (1.2)
* ppoll_tech_mult_icor_COPM (s_ppoll_gen_fact_138) * ppoll_tech_mult_icor_COPM (s_ppoll_gen_fact_138)
* p_yield_tech_chg_mlt_LYCM (des_food_ratio_DFR-food_ratio_127) * p_yield_tech_chg_mlt_LYCM (des_food_ratio_DFR-food_ratio_127)
* des_food_ratio_DFR (2) * des_food_ratio_DFR (2)
* yield_tech_mult_icor_COYM (s_land_yield_fact_104) * yield_tech_mult_icor_COYM (s_land_yield_fact_104)
* t_land_life_time (4000) * t_land_life_time (4000)
* t_air_poll_time (4000) * t_air_poll_time (4000)
* t_fcaor_time (4000) * t_fcaor_time (4000)
* res_intens (nr_res_use_rate_130/industrial_output_50) * res_intens (nr_res_use_rate_130/industrial_output_50)
* poll_intens_ind (ppoll_gen_ind_139*s_ppoll_gen_fact_138/industrial_output_50) * poll_intens_ind (ppoll_gen_ind_139*s_ppoll_gen_fact_138/industrial_output_50)
* cons_ind_out (industrial_output_50*s_fioa_cons_57) * cons_ind_out (industrial_output_50*s_fioa_cons_57)
* cons_ind_out_pc (cons_ind_out/population_1) * cons_ind_out_pc (cons_ind_out/population_1)
* Histpop (TIME) * Histpop (TIME)
* HWI_Human_Welfare_Index ((Life_Expectancy_Index+Education_Index+GDP_Index)/3) * HWI_Human_Welfare_Index ((Life_Expectancy_Index+Education_Index+GDP_Index)/3)
* Life_Expectancy_Index (life_expectancy_19) * Life_Expectancy_Index (life_expectancy_19)
* GDP_Index ((LOG10(GDP_per_capita_2)-LOG10(24))/(LOG10(9508)-LOG10(24))) * GDP_Index ((LOG10(GDP_per_capita_2)-LOG10(24))/(LOG10(9508)-LOG10(24)))
* GDP_per_capita_2 (ind_out_pc_49) * GDP_per_capita_2 (ind_out_pc_49)
* Education_Index (GDP_per_capita_2) * Education_Index (GDP_per_capita_2)
* Arable_Land_in_Gha (arable_land_85/1e9) * Arable_Land_in_Gha (arable_land_85/1e9)
* HEF_Human_Ecological_Footprint ((Arable_Land_in_Gha+Urban_Land_in_Gha+Absorption_Land_in_Gha)/1.91) * HEF_Human_Ecological_Footprint ((Arable_Land_in_Gha+Urban_Land_in_Gha+Absorption_Land_in_Gha)/1.91)
* Gha_per_unit_of_pollution (4/1e9) * Gha_per_unit_of_pollution (4/1e9)
* Absorption_Land_in_Gha (ppoll_gen_rt_137*Gha_per_unit_of_pollution) * Absorption_Land_in_Gha (ppoll_gen_rt_137*Gha_per_unit_of_pollution)
* Urban_Land_in_Gha (urban_ind_land_120/1e9) * Urban_Land_in_Gha (urban_ind_land_120/1e9)
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
w3_72_s = import_w3_72_list('w3-72_state.txt') w3_72_s = import_w3_72_list(os.path.join(w3_72_vars_lists_dir, 'w3-72_state.txt'))
disp('Nombre de paramètres dans w3 72 : ' + str(len(w3_72_s))) disp('Nombre de paramètres dans w3 72 : ' + str(len(w3_72_s)))
state_vars_dict = item_list_to_names_values(xmldoc.getElementsByTagName('stock')) state_vars_dict = item_list_to_names_values(xmldoc.getElementsByTagName('stock'))
# Affiche les lookup tables de W3-03 et colore en bleu les nouveaux par rapport à W3-72 # Affiche les lookup tables de W3-03 et colore en bleu les nouveaux par rapport à W3-72
state_names, s_not_found, s_has_dep = disp_item_list(state_vars_dict, 'State', w3_72_s) state_names, s_not_found, s_has_dep = disp_item_list(state_vars_dict, 'State', w3_72_s)
# Liste des paramètres présents dans W3 72 mais absents de W3 03 # Liste des paramètres présents dans W3 72 mais absents de W3 03
disp('## Not in new state variables') disp('## Not in new state variables')
if len(s_not_found): if len(s_not_found):
disp('\n'.join([('* ' + n + '\n') for n in s_not_found])) disp('\n'.join([('* ' + n + '\n') for n in s_not_found]))
else: else:
disp('Tout a été trouvé !') disp('Tout a été trouvé !')
``` ```
%% Output %% Output
Nombre de paramètres dans w3 72 : 29 Nombre de paramètres dans w3 72 : 29
## State (18) ## State (18)
('pop_0_to_14_2', '65E7')* pop_15_to_44_6 (70E7) ('pop_0_to_14_2', '65E7')* pop_15_to_44_6 (70E7)
* pop_45_to_64_10 (19E7) * pop_45_to_64_10 (19E7)
* pop_65_plus_14 (6E7) * pop_65_plus_14 (6E7)
* service_capital_67 (1.44E11) * service_capital_67 (1.44E11)
* industrial_capital_52 (2.1E11) * industrial_capital_52 (2.1E11)
* labor_util_fr_del_82 (1) * labor_util_fr_del_82 (1)
* nr_resources_129 (1e12) * nr_resources_129 (1e12)
* pers_pollution_142 (2.5e7) * pers_pollution_142 (2.5e7)
* land_fertility_121 (600) * land_fertility_121 (600)
* agr_inp_99 (5e9) * agr_inp_99 (5e9)
* arable_land_85 (.9e9) * arable_land_85 (.9e9)
* pot_arable_land_86 (2.3e9) * pot_arable_land_86 (2.3e9)
* urban_ind_land_120 (8.2e6) * urban_ind_land_120 (8.2e6)
* perc_food_ratio_128 (1) * perc_food_ratio_128 (1)
* <span style="color: blue">res_tech_NRTD</span> (1) * <span style="color: blue">res_tech_NRTD</span> (1)
* <span style="color: blue">ppoll_tech_PTD</span> (1) * <span style="color: blue">ppoll_tech_PTD</span> (1)
* <span style="color: blue">yield_tech_LYTD</span> (1) * <span style="color: blue">yield_tech_LYTD</span> (1)
## Not in new state variables ## Not in new state variables
* income_expect_avg_time_43, avg_ind_out_pc_43 * income_expect_avg_time_43, avg_ind_out_pc_43
* social_adj_del_40, del_ind_out_pc_40 * social_adj_del_40, del_ind_out_pc_40
* eff_hlth_serv_pc_22, hlth_serv_impact_del_22 * eff_hlth_serv_pc_22, hlth_serv_impact_del_22
* fert_cont_facil_pc_46 * fert_cont_facil_pc_46
*
*
*
*
*
*
*
*
*
* lifet_perc_del_37, perc_life_expectancy_37 * lifet_perc_del_37, perc_life_expectancy_37
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
w3_72_l = import_w3_72_list('w3-72_tables.txt') w3_72_l = import_w3_72_list(os.path.join(w3_72_vars_lists_dir, 'w3-72_table.txt'))
disp('Nombre de paramètres dans w3 72 : ' + str(len(w3_72_l))) disp('Nombre de paramètres dans w3 72 : ' + str(len(w3_72_l)))
lookup_vars_dict = item_list_to_names_values([e for e in aux_items if len(e.getElementsByTagName('gf'))]) lookup_vars_dict = item_list_to_names_values([e for e in aux_items if len(e.getElementsByTagName('gf'))])
# Affiche les lookup tables de W3-03 et colore en bleu les nouveaux par rapport à W3-72 # Affiche les lookup tables de W3-03 et colore en bleu les nouveaux par rapport à W3-72
lookup_names, l_not_found, l_has_dep = disp_item_list(lookup_vars_dict, 'Lookup', w3_72_l) lookup_names, l_not_found, l_has_dep = disp_item_list(lookup_vars_dict, 'Lookup', w3_72_l)
# Liste des paramètres présents dans W3 72 mais absents de W3 03 # Liste des paramètres présents dans W3 72 mais absents de W3 03
disp('# Not in new parameters') disp('# Not in new parameters')
if len(l_not_found): if len(l_not_found):
[disp('* ' + n + '\n') for n in l_not_found] [disp('* ' + n + '\n') for n in l_not_found]
else: else:
disp('Tout a été trouvé !') disp('Tout a été trouvé !')
``` ```
%% Output %% Output
Nombre de paramètres dans w3 72 : 37 Nombre de paramètres dans w3 72 : 37
## Lookup (56) ## Lookup (56)
('mortal_65_plus_16', 'life_expectancy_19')* mortal_45_to_64_12 (life_expectancy_19) ('mortal_65_plus_16', 'life_expectancy_19')* mortal_45_to_64_12 (life_expectancy_19)
* mortal_15_to_44_8 (life_expectancy_19) * mortal_15_to_44_8 (life_expectancy_19)
* mortal_0_to_14_4 (life_expectancy_19) * mortal_0_to_14_4 (life_expectancy_19)
* lifet_mlt_ppoll_29 (ppoll_index_143) * lifet_mlt_ppoll_29 (ppoll_index_143)
* lifet_mlt_food_20 (food_pc__88/subsist_food_pc_127) * lifet_mlt_food_20 (food_pc__88/subsist_food_pc_127)
* hlth_serv_al_pc_21 (serv_out_pc_71) * hlth_serv_al_pc_21 (serv_out_pc_71)
* crowd_mult_ind_27 (ind_out_pc_49) * crowd_mult_ind_27 (ind_out_pc_49)
* fr_pop_urban_26 (population_1) * fr_pop_urban_26 (population_1)
* fam_resp_to_soc_norm_41 (fam_income_expect_42) * fam_resp_to_soc_norm_41 (fam_income_expect_42)
* soc_fam_size_norm_39 (del_ind_out_pc_40) * soc_fam_size_norm_39 (del_ind_out_pc_40)
* compl_mlt_perc_lifet_36 (perc_life_expectancy_37) * compl_mlt_perc_lifet_36 (perc_life_expectancy_37)
* fecundity_mult_34 (life_expectancy_19) * fecundity_mult_34 (life_expectancy_19)
* fr_serv_al_fert_cont_48 (need_for_fert_cont_44) * fr_serv_al_fert_cont_48 (need_for_fert_cont_44)
* jobs_per_ind_cap_unit_75 (ind_out_pc_49) * jobs_per_ind_cap_unit_75 (ind_out_pc_49)
* capacity_util_fr_83 (labor_util_fr_del_82) * capacity_util_fr_83 (labor_util_fr_del_82)
* jobs_per_serv_cap_unit_77 (serv_out_pc_71) * jobs_per_serv_cap_unit_77 (serv_out_pc_71)
* jobs_per_hect_79 (agr_inp_per_hect_101) * jobs_per_hect_79 (agr_inp_per_hect_101)
* <span style="color: red">lifet_mlt_hlth_serv_1_24</span> (eff_hlth_serv_pc_22) * <span style="color: red">lifet_mlt_hlth_serv_1_24</span> (eff_hlth_serv_pc_22)
* <span style="color: red">lifet_mlt_hlth_serv_2_25</span> (eff_hlth_serv_pc_22) * <span style="color: red">lifet_mlt_hlth_serv_2_25</span> (eff_hlth_serv_pc_22)
* fert_cont_eff_table_45 (fert_cont_facil_pc_46) * fert_cont_eff_table_45 (fert_cont_facil_pc_46)
* pc_res_use_mlt_132 (ind_out_pc_49) * pc_res_use_mlt_132 (ind_out_pc_49)
* assim_half_life_mlt_145 (ppoll_index_143) * assim_half_life_mlt_145 (ppoll_index_143)
* land_fert_degr_rt_122 (ppoll_index_143) * land_fert_degr_rt_122 (ppoll_index_143)
* land_fert_regen_time_125 (p_fr_inp_for_land_maint_126) * land_fert_regen_time_125 (p_fr_inp_for_land_maint_126)
* p_fr_inp_for_land_maint_126 (perc_food_ratio_128) * p_fr_inp_for_land_maint_126 (perc_food_ratio_128)
* marg_land_yield_mlt_cap_111 (agr_inp_per_hect_101) * marg_land_yield_mlt_cap_111 (agr_inp_per_hect_101)
* land_yield_mlt_cap_102 (agr_inp_per_hect_101) * land_yield_mlt_cap_102 (agr_inp_per_hect_101)
* dev_cost_per_hect_97 (pot_arable_land_86/pot_arable_land_tot_84) * dev_cost_per_hect_97 (pot_arable_land_86/pot_arable_land_tot_84)
* fr_inp_al_land_dev_108 (marg_prod_land_dev_109/marg_prod_agr_inp_110) * fr_inp_al_land_dev_108 (marg_prod_land_dev_109/marg_prod_agr_inp_110)
* urb_ind_land_pc_117 (ind_out_pc_49) * urb_ind_land_pc_117 (ind_out_pc_49)
* <span style="color: red">p_fr_io_al_agr_1_94</span> (food_pc__88/s_indic_food_pc_89) * <span style="color: red">p_fr_io_al_agr_1_94</span> (food_pc__88/s_indic_food_pc_89)
* <span style="color: red">p_fr_io_al_agr_2_95</span> (food_pc__88/s_indic_food_pc_89) * <span style="color: red">p_fr_io_al_agr_2_95</span> (food_pc__88/s_indic_food_pc_89)
* <span style="color: red">p_indic_food_pc_1_90</span> (ind_out_pc_49) * <span style="color: red">p_indic_food_pc_1_90</span> (ind_out_pc_49)
* <span style="color: red">p_indic_food_pc_2_91</span> (ind_out_pc_49) * <span style="color: red">p_indic_food_pc_2_91</span> (ind_out_pc_49)
* <span style="color: red">p_yield_mlt_air_poll_1_106</span> (industrial_output_50/ind_out_in_1970_107) * <span style="color: red">p_yield_mlt_air_poll_1_106</span> (industrial_output_50/ind_out_in_1970_107)
* <span style="color: red">p_yield_mlt_air_poll_2_107</span> (industrial_output_50/ind_out_in_1970_107) * <span style="color: red">p_yield_mlt_air_poll_2_107</span> (industrial_output_50/ind_out_in_1970_107)
* <span style="color: red">p_land_life_mlt_yield_1_114</span> (land_yield_103/inherent_land_fert_124) * <span style="color: red">p_land_life_mlt_yield_1_114</span> (land_yield_103/inherent_land_fert_124)
* <span style="color: red">p_land_life_mlt_yield_2_115</span> (land_yield_103/inherent_land_fert_124) * <span style="color: red">p_land_life_mlt_yield_2_115</span> (land_yield_103/inherent_land_fert_124)
* <span style="color: red">p_fr_cap_al_obt_res_1_135</span> (nr_res_fr_remain_133) * <span style="color: red">p_fr_cap_al_obt_res_1_135</span> (nr_res_fr_remain_133)
* <span style="color: red">p_fr_cap_al_obt_res_2_136</span> (nr_res_fr_remain_133) * <span style="color: red">p_fr_cap_al_obt_res_2_136</span> (nr_res_fr_remain_133)
* <span style="color: red">p_indic_serv_pc_1_61</span> (ind_out_pc_49) * <span style="color: red">p_indic_serv_pc_1_61</span> (ind_out_pc_49)
* <span style="color: red">p_indic_serv_pc_2_62</span> (ind_out_pc_49) * <span style="color: red">p_indic_serv_pc_2_62</span> (ind_out_pc_49)
* <span style="color: red">p_fr_io_al_serv_1_64</span> (serv_out_pc_71/s_indic_serv_pc_60) * <span style="color: red">p_fr_io_al_serv_1_64</span> (serv_out_pc_71/s_indic_serv_pc_60)
* <span style="color: red">p_fr_io_al_serv_2_65</span> (serv_out_pc_71/s_indic_serv_pc_60) * <span style="color: red">p_fr_io_al_serv_2_65</span> (serv_out_pc_71/s_indic_serv_pc_60)
* <span style="color: blue">p_fioa_cons_var_59</span> (ind_out_pc_49/ind_out_pc_des_59) * <span style="color: blue">p_fioa_cons_var_59</span> (ind_out_pc_49/ind_out_pc_des_59)
* <span style="color: blue">p_res_tech_chg_mlt_NRCM</span> (1-nr_res_use_rate_130/des_res_use_rt_DNRUR) * <span style="color: blue">p_res_tech_chg_mlt_NRCM</span> (1-nr_res_use_rate_130/des_res_use_rt_DNRUR)
* <span style="color: blue">ind_cap_out_ratio_2_ICOR2T</span> (s_nr_res_use_fact_131) * <span style="color: blue">ind_cap_out_ratio_2_ICOR2T</span> (s_nr_res_use_fact_131)
* <span style="color: blue">p_ppoll_tech_chg_mlt_POLGFM</span> (1-ppoll_index_143/des_ppoll_index_DPOLX) * <span style="color: blue">p_ppoll_tech_chg_mlt_POLGFM</span> (1-ppoll_index_143/des_ppoll_index_DPOLX)
* <span style="color: blue">ppoll_tech_mult_icor_COPM</span> (s_ppoll_gen_fact_138) * <span style="color: blue">ppoll_tech_mult_icor_COPM</span> (s_ppoll_gen_fact_138)
* <span style="color: blue">p_yield_tech_chg_mlt_LYCM</span> (des_food_ratio_DFR-food_ratio_127) * <span style="color: blue">p_yield_tech_chg_mlt_LYCM</span> (des_food_ratio_DFR-food_ratio_127)
* <span style="color: blue">yield_tech_mult_icor_COYM</span> (s_land_yield_fact_104) * <span style="color: blue">yield_tech_mult_icor_COYM</span> (s_land_yield_fact_104)
* <span style="color: blue">Histpop</span> (TIME) * <span style="color: blue">Histpop</span> (TIME)
* <span style="color: blue">Life_Expectancy_Index</span> (life_expectancy_19) * <span style="color: blue">Life_Expectancy_Index</span> (life_expectancy_19)
* <span style="color: blue">GDP_per_capita_2</span> (ind_out_pc_49) * <span style="color: blue">GDP_per_capita_2</span> (ind_out_pc_49)
* <span style="color: blue">Education_Index</span> (GDP_per_capita_2) * <span style="color: blue">Education_Index</span> (GDP_per_capita_2)
# Not in new parameters # Not in new parameters
Tout a été trouvé ! Tout a été trouvé !
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
w3_72_p = import_w3_72_list('w3-72_parameters.txt') w3_72_p = import_w3_72_list(os.path.join(w3_72_vars_lists_dir, 'w3-72_parameter.txt'))
def isfloat(value): def isfloat(value):
''' '''
Renvoi vrai si une chaîne de caractère peut être identifiée comme un flottant Renvoi vrai si une chaîne de caractère peut être identifiée comme un flottant
Utile pour identifier les constantes dans le fichier de W3-03 Utile pour identifier les constantes dans le fichier de W3-03
''' '''
try: try:
float(value) float(value)
return True return True
except ValueError: except ValueError:
return False return False
parameters_items = [ parameters_items = [
e for e in aux_items e for e in aux_items
if len(e.getElementsByTagName('eqn')) if len(e.getElementsByTagName('eqn'))
and isfloat(e.getElementsByTagName('eqn')[0].childNodes[0].nodeValue) and isfloat(e.getElementsByTagName('eqn')[0].childNodes[0].nodeValue)
] ]
disp('Nombre de paramètres dans w3 72 : ' + str(len(w3_72_p))) disp('Nombre de paramètres dans w3 72 : ' + str(len(w3_72_p)))
parameters_vars = item_list_to_names_values(parameters_items) parameters_vars = item_list_to_names_values(parameters_items)
# Affiche les parameters tables de W3-03 et colore en bleu les nouveaux par rapport à W3-72 # Affiche les parameters tables de W3-03 et colore en bleu les nouveaux par rapport à W3-72
parameters_names, p_not_found, p_has_dep = disp_item_list(parameters_vars, 'Parameters', w3_72_p) parameters_names, p_not_found, p_has_dep = disp_item_list(parameters_vars, 'Parameters', w3_72_p)
# Liste des paramètres présents dans W3 72 mais absents de W3 03 # Liste des paramètres présents dans W3 72 mais absents de W3 03
disp('## Not in new parameters') disp('## Not in new parameters')
if len(l_not_found): if len(l_not_found):
[disp('* ' + n + '\n') for n in p_not_found] [disp('* ' + n + '\n') for n in p_not_found]
else: else:
disp('Tout a été trouvé !') disp('Tout a été trouvé !')
``` ```
%% Output %% Output
Nombre de paramètres dans w3 72 : 37 Nombre de paramètres dans w3 72 : 37
## Parameters (55) ## Parameters (55)
('labor_force_partic_80', '.75')* reproductive_lifetime_30 (30) ('labor_force_partic_80', '.75')* reproductive_lifetime_30 (30)
* life_expect_norm_19 (28) * life_expect_norm_19 (28)
* ind_out_pc_des_59 (400) * ind_out_pc_des_59 (400)
* hlth_serv_impact_del_22 (20) * hlth_serv_impact_del_22 (20)
* income_expect_avg_time_43 (3) * income_expect_avg_time_43 (3)
* social_adj_del_40 (20) * social_adj_del_40 (20)
* lifet_perc_del_37 (20) * lifet_perc_del_37 (20)
* max_tot_fert_norm_33 (12) * max_tot_fert_norm_33 (12)
* des_compl_fam_size_norm_38 (3.8) * des_compl_fam_size_norm_38 (3.8)
* labor_util_fr_del_time_82 (2) * labor_util_fr_del_time_82 (2)
* t_pop_equil_time_30 (4000) * t_pop_equil_time_30 (4000)
* <span style="color: blue">t_fert_cont_eff_time_45</span> (4000) * <span style="color: blue">t_fert_cont_eff_time_45</span> (4000)
* t_zero_pop_grow_time_38 (4000) * t_zero_pop_grow_time_38 (4000)
* ind_mtl_emiss_fact_139 (.1) * ind_mtl_emiss_fact_139 (.1)
* ind_mtl_toxic_index_139 (10) * ind_mtl_toxic_index_139 (10)
* frac_res_pers_mtl_139 (.02) * frac_res_pers_mtl_139 (.02)
* fr_agr_inp_pers_mtl_140 (.001) * fr_agr_inp_pers_mtl_140 (.001)
* agr_mtl_toxic_index_140 (1) * agr_mtl_toxic_index_140 (1)
* ppoll_trans_del_141 (20) * ppoll_trans_del_141 (20)
* ppoll_in_1970_143 (1.36e8) * ppoll_in_1970_143 (1.36e8)
* assim_half_life_1970_146 (1.5) * assim_half_life_1970_146 (1.5)
* inherent_land_fert_124 (600) * inherent_land_fert_124 (600)
* subsist_food_pc_127 (230) * subsist_food_pc_127 (230)
* land_fr_harvested_87 (.7) * land_fr_harvested_87 (.7)
* processing_loss_87 (.1) * processing_loss_87 (.1)
* urb_ind_land_dev_time_119 (10) * urb_ind_land_dev_time_119 (10)
* avg_life_land_norm_112 (1000) * avg_life_land_norm_112 (1000)
* pot_arable_land_tot_84 (3.2e9) * pot_arable_land_tot_84 (3.2e9)
* social_discount_109 (.07) * social_discount_109 (.07)
* food_short_perc_del_128 (2) * food_short_perc_del_128 (2)
* t_ind_equil_time_57 (4000) * t_ind_equil_time_57 (4000)
* p_ind_cap_out_ratio_1_51 (3) * p_ind_cap_out_ratio_1_51 (3)
* <span style="color: blue">t_policy_year_150</span> (4000) * <span style="color: blue">t_policy_year_150</span> (4000)
* <span style="color: blue">p_avg_life_ind_cap_1_54</span> (14) * <span style="color: blue">p_avg_life_ind_cap_1_54</span> (14)
* <span style="color: blue">p_avg_life_ind_cap_2_54</span> (14) * <span style="color: blue">p_avg_life_ind_cap_2_54</span> (14)
* <span style="color: blue">p_fioa_cons_const_1_58</span> (.43) * <span style="color: blue">p_fioa_cons_const_1_58</span> (.43)
* <span style="color: blue">p_fioa_cons_const_2_58</span> (.43) * <span style="color: blue">p_fioa_cons_const_2_58</span> (.43)
* p_avg_life_serv_cap_2_69 (20) * p_avg_life_serv_cap_2_69 (20)
* p_avg_life_serv_cap_1_69 (20) * p_avg_life_serv_cap_1_69 (20)
* p_serv_cap_out_ratio_1_72 (1) * p_serv_cap_out_ratio_1_72 (1)
* p_serv_cap_out_ratio_2_72 (1) * p_serv_cap_out_ratio_2_72 (1)
* p_avg_life_agr_inp_1_100 (2) * p_avg_life_agr_inp_1_100 (2)
* p_avg_life_agr_inp_2_100 (2) * p_avg_life_agr_inp_2_100 (2)
* p_land_yield_fact_1_104 (1) * p_land_yield_fact_1_104 (1)
* p_nr_res_use_fact_1_131 (1) * p_nr_res_use_fact_1_131 (1)
* p_ppoll_gen_fact_1_138 (1) * p_ppoll_gen_fact_1_138 (1)
* <span style="color: blue">tech_dev_del_TDD</span> (20) * <span style="color: blue">tech_dev_del_TDD</span> (20)
* <span style="color: blue">des_res_use_rt_DNRUR</span> (4.8e9) * <span style="color: blue">des_res_use_rt_DNRUR</span> (4.8e9)
* ind_out_in_1970_107 (7.9e11) * ind_out_in_1970_107 (7.9e11)
* <span style="color: blue">des_ppoll_index_DPOLX</span> (1.2) * <span style="color: blue">des_ppoll_index_DPOLX</span> (1.2)
* <span style="color: blue">des_food_ratio_DFR</span> (2) * <span style="color: blue">des_food_ratio_DFR</span> (2)
* <span style="color: blue">t_land_life_time</span> (4000) * <span style="color: blue">t_land_life_time</span> (4000)
* <span style="color: blue">t_air_poll_time</span> (4000) * <span style="color: blue">t_air_poll_time</span> (4000)
* <span style="color: blue">t_fcaor_time</span> (4000) * <span style="color: blue">t_fcaor_time</span> (4000)
## Not in new parameters ## Not in new parameters
Tout a été trouvé ! Tout a été trouvé !
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment