`Python program used to simulate the nonrenewable resource sector:  #!/usr/bin/env python  import math from dynamo import *   #levels nr = ``nr`` #Nonrenewable resources ic = ``ic`` #Industrial Captial nrtd = ``nrtd`` #Nonrenewable resource technology initiated #nruf2_l1 = ``nruf2_l1`` #Nonrenewable resource usage rate delay level #nruf2_l2 = ``nruf2_l2`` #Nonrenewable resource usage rate delay level #nruf2_l3 = ``nruf2_l3`` #Nonrenewable resource usage rate delay level   #rates nrur = ``nrur`` #Nonrenewabel resource usage rate icir = ``icir`` #Industrial capital investment rate icdr = ``icdr`` #Industrial capital depreciation rate #nruf2_r1 = ``nruf2_r1`` #Nonrenewable resource usage rate delay rate #nruf2_r2 = ``nruf2_r2`` #Nonrenewable resource usage rate delay rate #nruf2_r3 = ``nruf2_r3`` #Nonrenewable resource usage rate delay rate nrate = ``nrate`` #Nonrenewable resource technology improvement rate    #axillaries nruf = ``nruf`` #Nonrenewable resource usage factor pcrum = ``pcrum`` #Per capita resource use multiplier nrfr = ``nrfr`` #Nonrenewable resource fraction remaining fcaor =``fcaor`` #Fraction of capital allocated to obtaining resources fcaor1 = ``fcaor1`` #Normal fcaor fcaor2 = ``fcaor2`` #Alternative fcaor pop = ``pop`` #Population pop1 = ``pop1`` #Exponentially growing pop io = ``io`` #Industrial output iopc = ``iopc`` #Industrial output percapita nruf2 = ``nruf2`` #Nonrenewable resource usage factor after recycle year nrcm = ``nrcm`` #Resource technological change multiplier icor = ``icor`` #Industrial capital output ratio   #constants nri = 1e12 #Nonrenewable resources initial nruf1 = 1 #Nonrenewable resource usage factor 1 popi = 1.65e9 #Initial population in 1900 gc = 0.012 #Population growth constant zpgt = 2500 #Zero population growth time pop2 = popi*math.exp(gc*(zpgt-1900)) #population at zpgt ici = 2.1e11 #Industrial capital initial fioaa = 0.12 #Fraction of industrial output allocated to agriculture fioas = 0.12 #Fraction of industrial output allocated to services fioac = 0.43 #Fraction of industrial output allocated to consumption alic = 14.0 #Average life of industrial capital pyear = 1995 #Year to switch nruf tdd=10 #Technological development and implementation delay dnrur=2e9 #Desired nonrenewable resource usage rate  #parameters dt = 1.0 initial_time = 1900.0  #initial data i = {}  #Initial levels i[nr] = nri i[ic] = ici i[nrtd]=1.0 smooth3_init(i,nruf2,i[nrtd])  def calc_auxiliaries_and_rates(n,time):     #first the auxiliaries     n[nruf2] = smooth3_cur_value(n,nruf2)     n[nruf] = clip(n[nruf2],nruf1,time,pyear)     n[nrfr] = n[nr]/nri          n[fcaor1] = table_lookup(n[nrfr],0.0,1.0,0.1,[1.0, 0.9, 0.7, 0.5, 0.2, 0.1, 0.05, 0.05, 0.05, 0.05, 0.05])     n[fcaor2] = table_lookup(n[nrfr],0.0,1.0,0.1,[1.0, 0.9, 0.7, 0.5, 0.2, 0.1, 0.05, 0.05, 0.05, 0.05, 0.05])     n[fcaor] = clip(n[fcaor2],n[fcaor1],time,pyear)      n[pop1] = popi*math.exp(gc*(time-1900.0))     n[pop] = clip(pop2,n[pop1],time,zpgt)      n[icor] = table_lookup(n[nrtd],0.0,1.0,0.2,[6.0,3.3,3.1,3.06,3.02,3.0])     n[io] = n[ic]*(1.0 - n[fcaor])/n[icor]     n[iopc] = n[io]/n[pop]          n[pcrum] = table_lookup(n[iopc],0.0,1600.0,200.0,[0.0, 0.85, 2.6, 4.4, 5.4, 6.2, 6.8, 7.0, 7.0])       #then the rates     n[nrur] = n[pop]*n[pcrum]*n[nruf]     n[icir] = n[io]*(1.0-fioaa-fioas-fioac)     n[icdr] = n[ic]/alic     n[nrcm] = table_lookup(1.0-n[nrur]/dnrur,-1.0,0.0,1.0,[-0.05,0.0])     n[nrate] = clip(n[nrtd]*n[nrcm],0.0,time,pyear)      smooth3_next_rates(n, nruf2, n[nrtd], tdd)           calc_auxiliaries_and_rates(i,initial_time)  def get_next_time_step(j,time):     n = {}     #nextize levels     n[nr] = j[nr]+dt*(-j[nrur])     n[ic] = j[ic]+dt*(j[icir]-j[icdr])     n[nrtd] = j[nrtd]+dt*(j[nrate])      smooth3_next_levels(n,j,nruf2,dt)          calc_auxiliaries_and_rates(n,time)     return n  run_times(initial_time,dt,200,i,get_next_time_step)   Dynamo include:  import math  def print_sorted_keys(dict,width):     keys = dict.keys()     keys.sort()     f = ``%``+str(width)+``s``     for key in keys[:-1]:         print (f+``,``) % key,     print f % keys[-1]  def print_sorted_values(dict,width):     keys = dict.keys