├── screens └── ASG.png ├── doc └── sparse_grids_in_econ.pdf ├── Analytical_example ├── GridPoints_SGvsASG.png ├── AnalyticalExample_SGvsASG.png ├── resultsSparseGrids.txt ├── resultsAdaptiveSparseGrids.txt └── README.md ├── IRBC_model ├── data │ ├── data_smooth │ │ ├── ARC_policy.png │ │ ├── Cap_policy_0.png │ │ ├── Cap_policy_1.png │ │ ├── grid_final.txt │ │ ├── grid_iter_10.txt │ │ ├── grid_iter_20.txt │ │ ├── grid_iter_30.txt │ │ ├── grid_iter_40.txt │ │ ├── grid_iter_50.txt │ │ ├── grid_iter_60.txt │ │ ├── grid_iter_70.txt │ │ ├── grid_iter_80.txt │ │ ├── grid_iter_90.txt │ │ ├── grid_iter_100.txt │ │ ├── grid_iter_110.txt │ │ ├── grid_iter_120.txt │ │ ├── grid_iter_130.txt │ │ ├── grid_iter_140.txt │ │ ├── grid_iter_150.txt │ │ ├── ARC_policy.txt │ │ ├── Cap_policy_0.txt │ │ └── Cap_policy_1.txt │ └── data_nonsmooth │ │ ├── ARC_policy.png │ │ ├── IC_policy_0.png │ │ ├── IC_policy_1.png │ │ ├── grid_final.txt │ │ ├── Cap_policy_0.png │ │ ├── Cap_policy_1.png │ │ ├── grid_iter_10.txt │ │ ├── grid_iter_100.txt │ │ ├── grid_iter_110.txt │ │ ├── grid_iter_120.txt │ │ ├── grid_iter_130.txt │ │ ├── grid_iter_140.txt │ │ ├── grid_iter_20.txt │ │ ├── grid_iter_30.txt │ │ ├── grid_iter_40.txt │ │ ├── grid_iter_50.txt │ │ ├── grid_iter_60.txt │ │ ├── grid_iter_70.txt │ │ ├── grid_iter_80.txt │ │ ├── grid_iter_90.txt │ │ ├── ARC_policy.txt │ │ ├── Cap_policy_0.txt │ │ ├── Cap_policy_1.txt │ │ ├── IC_policy_0.txt │ │ └── IC_policy_1.txt ├── parameters.py ├── SOE.py ├── Expect_FOC.py ├── setup_num_int.py ├── aux_fcts.py ├── setup_asg.py ├── README.md ├── time_iteration.py └── mainASG.py ├── IRBC_model_mpi ├── data │ ├── data_smooth │ │ ├── ARC_policy.png │ │ ├── grid_final.txt │ │ ├── Cap_policy_0.png │ │ ├── Cap_policy_1.png │ │ ├── Cap_policy_2.png │ │ ├── ARC_policy.txt │ │ ├── Cap_policy_0.txt │ │ ├── Cap_policy_1.txt │ │ └── Cap_policy_2.txt │ └── data_nonsmooth │ │ ├── ARC_policy.png │ │ ├── grid_final.txt │ │ ├── Cap_policy_0.png │ │ ├── Cap_policy_1.png │ │ ├── Cap_policy_2.png │ │ ├── IC_policy_0.png │ │ ├── IC_policy_1.png │ │ ├── IC_policy_2.png │ │ ├── ARC_policy.txt │ │ ├── Cap_policy_0.txt │ │ ├── Cap_policy_1.txt │ │ ├── Cap_policy_2.txt │ │ └── IC_policy_0.txt ├── mpi.py ├── SOE.py ├── parameters.py ├── Expect_FOC.py ├── setup_num_int.py ├── aux_fcts.py ├── setup_asg.py ├── README.md ├── mainASG.py └── time_iteration.py └── README.md /screens/ASG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/screens/ASG.png -------------------------------------------------------------------------------- /doc/sparse_grids_in_econ.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/doc/sparse_grids_in_econ.pdf -------------------------------------------------------------------------------- /Analytical_example/GridPoints_SGvsASG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/Analytical_example/GridPoints_SGvsASG.png -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/ARC_policy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/ARC_policy.png -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/Cap_policy_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/Cap_policy_0.png -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/Cap_policy_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/Cap_policy_1.png -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/grid_final.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/grid_final.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/grid_iter_10.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/grid_iter_10.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/grid_iter_20.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/grid_iter_20.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/grid_iter_30.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/grid_iter_30.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/grid_iter_40.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/grid_iter_40.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/grid_iter_50.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/grid_iter_50.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/grid_iter_60.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/grid_iter_60.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/grid_iter_70.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/grid_iter_70.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/grid_iter_80.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/grid_iter_80.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/grid_iter_90.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/grid_iter_90.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/ARC_policy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/ARC_policy.png -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/IC_policy_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/IC_policy_0.png -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/IC_policy_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/IC_policy_1.png -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/grid_final.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/grid_final.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/grid_iter_100.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/grid_iter_100.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/grid_iter_110.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/grid_iter_110.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/grid_iter_120.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/grid_iter_120.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/grid_iter_130.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/grid_iter_130.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/grid_iter_140.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/grid_iter_140.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/grid_iter_150.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_smooth/grid_iter_150.txt -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_smooth/ARC_policy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model_mpi/data/data_smooth/ARC_policy.png -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_smooth/grid_final.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model_mpi/data/data_smooth/grid_final.txt -------------------------------------------------------------------------------- /Analytical_example/AnalyticalExample_SGvsASG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/Analytical_example/AnalyticalExample_SGvsASG.png -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/Cap_policy_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/Cap_policy_0.png -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/Cap_policy_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/Cap_policy_1.png -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/grid_iter_10.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/grid_iter_10.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/grid_iter_100.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/grid_iter_100.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/grid_iter_110.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/grid_iter_110.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/grid_iter_120.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/grid_iter_120.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/grid_iter_130.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/grid_iter_130.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/grid_iter_140.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/grid_iter_140.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/grid_iter_20.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/grid_iter_20.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/grid_iter_30.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/grid_iter_30.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/grid_iter_40.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/grid_iter_40.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/grid_iter_50.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/grid_iter_50.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/grid_iter_60.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/grid_iter_60.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/grid_iter_70.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/grid_iter_70.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/grid_iter_80.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/grid_iter_80.txt -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/grid_iter_90.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model/data/data_nonsmooth/grid_iter_90.txt -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_nonsmooth/ARC_policy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model_mpi/data/data_nonsmooth/ARC_policy.png -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_nonsmooth/grid_final.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model_mpi/data/data_nonsmooth/grid_final.txt -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_smooth/Cap_policy_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model_mpi/data/data_smooth/Cap_policy_0.png -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_smooth/Cap_policy_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model_mpi/data/data_smooth/Cap_policy_1.png -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_smooth/Cap_policy_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model_mpi/data/data_smooth/Cap_policy_2.png -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_nonsmooth/Cap_policy_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model_mpi/data/data_nonsmooth/Cap_policy_0.png -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_nonsmooth/Cap_policy_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model_mpi/data/data_nonsmooth/Cap_policy_1.png -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_nonsmooth/Cap_policy_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model_mpi/data/data_nonsmooth/Cap_policy_2.png -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_nonsmooth/IC_policy_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model_mpi/data/data_nonsmooth/IC_policy_0.png -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_nonsmooth/IC_policy_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model_mpi/data/data_nonsmooth/IC_policy_1.png -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_nonsmooth/IC_policy_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/HEAD/IRBC_model_mpi/data/data_nonsmooth/IC_policy_2.png -------------------------------------------------------------------------------- /Analytical_example/resultsSparseGrids.txt: -------------------------------------------------------------------------------- 1 | # Points, l1Error, lInfError 2 | 1.450000000000000000e+02 2.837563616733942539e-03 2.675956333925207098e-02 3 | 3.210000000000000000e+02 9.463592656135751038e-04 1.219928520079942812e-02 4 | 7.050000000000000000e+02 6.414519084742426871e-04 1.267748525811857041e-02 5 | 1.537000000000000000e+03 2.652171805939143806e-04 7.400045388639217223e-03 6 | 3.329000000000000000e+03 1.526449436553386412e-04 6.188447929141409343e-03 7 | 7.169000000000000000e+03 8.134965802951291472e-05 3.947898340010706254e-03 8 | 1.536100000000000000e+04 4.038506758961443418e-05 2.457112938928519147e-03 9 | 3.276900000000000000e+04 2.173619274137699676e-05 1.901651854326018428e-03 10 | 6.963300000000000000e+04 1.027405919367353446e-05 1.100736515734402829e-03 11 | 1.474570000000000000e+05 5.323593636234033874e-06 7.499430262059949334e-04 12 | 3.112970000000000000e+05 2.794142265497010944e-06 4.372420842813024358e-04 13 | -------------------------------------------------------------------------------- /Analytical_example/resultsAdaptiveSparseGrids.txt: -------------------------------------------------------------------------------- 1 | # Points, l1Error, lInfError 2 | 1.410000000000000000e+02 2.837563616733942539e-03 2.675956333925207098e-02 3 | 3.050000000000000000e+02 9.463592656135751038e-04 1.219928520079942812e-02 4 | 6.550000000000000000e+02 6.414519084742426871e-04 1.267748525811857041e-02 5 | 1.407000000000000000e+03 2.652171805939146517e-04 7.400045388639217223e-03 6 | 2.975000000000000000e+03 1.526521291453762793e-04 6.188447929141298320e-03 7 | 5.417000000000000000e+03 8.141294358138494159e-05 3.947872482136225748e-03 8 | 8.011000000000000000e+03 4.049638310912871718e-05 2.457101981591287149e-03 9 | 1.049400000000000000e+04 2.187053128693912095e-05 1.901603201672536717e-03 10 | 1.283600000000000000e+04 1.042241284848662844e-05 1.100648028588625468e-03 11 | 1.524000000000000000e+04 5.479127198383437801e-06 7.499120477341613897e-04 12 | 1.768800000000000000e+04 2.953003175336804985e-06 4.371731239339810351e-04 13 | -------------------------------------------------------------------------------- /IRBC_model_mpi/mpi.py: -------------------------------------------------------------------------------- 1 | import math 2 | import numpy as np 3 | from mpi4py import MPI 4 | 5 | comm = MPI.COMM_WORLD 6 | rank = comm.Get_rank() 7 | 8 | def pad(arrayToPad): 9 | """Takes an input array and pads it across the first axis such that it is 10 | divisible by the number of points per worker. 11 | 12 | Keyword arguments: 13 | arrayToPad -- numpy array of inputs to pad 14 | """ 15 | pointsPerWorker = math.ceil(arrayToPad.shape[0] / comm.Get_size()) 16 | 17 | return np.pad( 18 | arrayToPad, 19 | ( 20 | ( 21 | 0, 22 | pointsPerWorker * comm.Get_size() - arrayToPad.shape[0], 23 | ), 24 | (0, 0), 25 | ), 26 | mode="constant", 27 | ) 28 | 29 | def scatter(arrayToScatter): 30 | """Takes an input array and scatters it across workers. 31 | 32 | Keyword arguments: 33 | arrayToScatter -- numpy array of inputs to scatter 34 | """ 35 | pointsPerWorker = math.ceil(arrayToScatter.shape[0] / comm.Get_size()) 36 | sendbuf = pad(arrayToScatter) 37 | recvbuf = np.empty((pointsPerWorker, arrayToScatter.shape[1])) 38 | comm.Scatter(sendbuf, recvbuf, root=0) 39 | 40 | return recvbuf -------------------------------------------------------------------------------- /IRBC_model/parameters.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file sets the economic parameters as well as the technical parameters that 3 | govern the time iteration and the error computation process. 4 | 5 | """ 6 | 7 | import numpy as np 8 | 9 | ## Economic parameters 10 | 11 | 12 | # Type of IRBC model ({'smooth','non-smooth'}) 13 | typeIRBC = 'non-smooth' 14 | # Type of numerical integration: ({'GH-quadrature','monomials_2d','monomials_power'}) 15 | typeInt = 'monomials_power' 16 | 17 | # Number of countries 18 | nCountries = 2 19 | # Number of shocks (Country-specific shocks + aggregate shock) 20 | nShocks = nCountries+1 21 | # Number of policies (nCountries+1 for smooth IRBC, nCountries*2+1 for nonsmooth) 22 | if typeIRBC=='non-smooth': 23 | nPols = nCountries*2+1 24 | elif typeIRBC=='smooth': 25 | nPols = nCountries+1 26 | else: 27 | print('Error in determining the type of IRBC') 28 | exit() 29 | 30 | # Intertemporal elasticity of substitution 31 | a_eis = 0.25 32 | b_eis = 1.0 33 | gamma = np.zeros(nCountries) 34 | for j1 in range(nCountries): 35 | gamma[j1] = a_eis+j1*(b_eis-a_eis)/(nCountries-1) 36 | # Discount factor 37 | betta = 0.99 38 | # Capital share of income 39 | zeta = 0.36 40 | # Depreciation rate 41 | delta = 0.01 42 | # Persistence of TFP shocks 43 | rhoZ = 0.95 44 | # Standard deviation of TFP shocks 45 | sigE = 0.01 46 | # Intensity of capital adjustment costs 47 | kappa = 0.5 48 | # Steady state for capital 49 | k_ss = 1.0 50 | # Aggregate productivity 51 | A_tfp = (1.0-betta*(1.0-delta))/(zeta*betta) 52 | # Welfare weight 53 | pareto = A_tfp**(1.0/gamma) 54 | 55 | 56 | # Lower bound for capital 57 | kMin = 0.8 58 | # Upper bound for capital 59 | kMax = 1.2 60 | # Lower bound for TFP 61 | aMin = -0.8*sigE/(1.0-rhoZ) 62 | # Upper bound for TFP 63 | aMax = 0.8*sigE/(1.0-rhoZ) 64 | 65 | 66 | ## Technical parameters 67 | 68 | # Iteration to start at (start from scratch -- numstart =0; restart: numstart >0) 69 | numstart = 0 70 | # Maximum number of iterations 71 | maxiter = 300 72 | # Iteration at which the refinement starts 73 | iterRefStart = 25 74 | # Convergence criterion in time iteration 75 | tol_ti = 1e-4 76 | # Number of random draws for the error computation 77 | TT = 10000 78 | # Number of burn-in periods for SIMULATION 79 | burnin = 1000 80 | # Location where data is stored 81 | data_location_nonsmooth = "data/data_nonsmooth/" 82 | data_location_smooth = "data/data_smooth/" 83 | # Frequency of saving grid 84 | savefreq = 10 85 | -------------------------------------------------------------------------------- /IRBC_model/SOE.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file computes the residuals of the system of equilibrium conditions. 3 | 4 | Inputs: 5 | 1) x -- array that contains the (guessed) values for all policies 6 | 2) state -- array that contains the values of the state variables 7 | 3) grid -- grid structure that contains the function values for interpolation 8 | 9 | Outputs: 10 | 1) res -- array of size [nCountries*2+1] that contains the residuals of the 11 | system of equilibrium conditions. 12 | 13 | """ 14 | 15 | import numpy as np 16 | from Expect_FOC import * 17 | from aux_fcts import * 18 | 19 | 20 | def sysOfEqs(x,state,grid): 21 | 22 | # State variables 23 | capStates = state[0:nCountries] 24 | tfpStates = state[nCountries:] 25 | 26 | # Policy values 27 | capPolicies = x[0:nCountries] 28 | lamb = x[nCountries] 29 | 30 | if typeIRBC=='non-smooth': 31 | 32 | gzAlphas = x[nCountries+1:] 33 | 34 | # Garcia-Zengwill transformation of the occasionally binding constraints 35 | gzAlphaPlus = np.maximum(0.0,gzAlphas) 36 | gzAlphaMinus = np.maximum(0.0,-gzAlphas) 37 | 38 | # Computation of integrands 39 | Integrands = ExpectFOC(capPolicies, state, grid) 40 | 41 | IntResult = np.empty(nCountries) 42 | 43 | for iint in range(nCountries): 44 | IntResult[iint] = np.dot(IntWeights,Integrands[:,iint]) 45 | 46 | res = np.zeros(nPols) 47 | 48 | # Computation of residuals of the equilibrium system of equations 49 | 50 | if typeIRBC=='non-smooth': 51 | 52 | # Euler equations & GZ alphas 53 | for ires in range(nCountries): 54 | res[ires] = (betta*IntResult[ires] + gzAlphaPlus[ires])\ 55 | /(1.0 + AdjCost_ktom(capStates[ires],capPolicies[ires])) - lamb 56 | res[nCountries+1+ires] = capPolicies[ires] - capStates[ires]*(1.0-delta) - gzAlphaMinus[ires] 57 | 58 | else: 59 | 60 | # Euler equations 61 | for ires in range(nCountries): 62 | res[ires] = betta*IntResult[ires]/(1.0 + AdjCost_ktom(capStates[ires],capPolicies[ires])) - lamb 63 | 64 | 65 | # Aggregate resource constraint 66 | for ires2 in range(nCountries): 67 | res[nCountries] += F(capStates[ires2],tfpStates[ires2]) + (1.0-delta)*capStates[ires2] - capPolicies[ires2]\ 68 | - AdjCost(capStates[ires2],capPolicies[ires2]) - (lamb/pareto[ires2])**(-gamma[ires2]) 69 | 70 | 71 | 72 | return res 73 | -------------------------------------------------------------------------------- /IRBC_model_mpi/SOE.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file computes the residuals of the system of equilibrium conditions. 3 | 4 | Inputs: 5 | 1) x -- array that contains the (guessed) values for all policies 6 | 2) state -- array that contains the values of the state variables 7 | 3) grid -- grid structure that contains the function values for interpolation 8 | 9 | Outputs: 10 | 1) res -- array of size [nCountries*2+1] that contains the residuals of the 11 | system of equilibrium conditions. 12 | 13 | """ 14 | 15 | import numpy as np 16 | from Expect_FOC import * 17 | from aux_fcts import * 18 | 19 | 20 | def sysOfEqs(x,state,grid): 21 | 22 | # State variables 23 | capStates = state[0:nCountries] 24 | tfpStates = state[nCountries:] 25 | 26 | # Policy values 27 | capPolicies = x[0:nCountries] 28 | lamb = x[nCountries] 29 | 30 | if typeIRBC=='non-smooth': 31 | 32 | gzAlphas = x[nCountries+1:] 33 | 34 | # Garcia-Zengwill transformation of the occasionally binding constraints 35 | gzAlphaPlus = np.maximum(0.0,gzAlphas) 36 | gzAlphaMinus = np.maximum(0.0,-gzAlphas) 37 | 38 | # Computation of integrands 39 | Integrands = ExpectFOC(capPolicies, state, grid) 40 | 41 | IntResult = np.empty(nCountries) 42 | 43 | for iint in range(nCountries): 44 | IntResult[iint] = np.dot(IntWeights,Integrands[:,iint]) 45 | 46 | res = np.zeros(nPols) 47 | 48 | # Computation of residuals of the equilibrium system of equations 49 | 50 | if typeIRBC=='non-smooth': 51 | 52 | # Euler equations & GZ alphas 53 | for ires in range(nCountries): 54 | res[ires] = (betta*IntResult[ires] + gzAlphaPlus[ires])\ 55 | /(1.0 + AdjCost_ktom(capStates[ires],capPolicies[ires])) - lamb 56 | res[nCountries+1+ires] = capPolicies[ires] - capStates[ires]*(1.0-delta) - gzAlphaMinus[ires] 57 | 58 | else: 59 | 60 | # Euler equations 61 | for ires in range(nCountries): 62 | res[ires] = betta*IntResult[ires]/(1.0 + AdjCost_ktom(capStates[ires],capPolicies[ires])) - lamb 63 | 64 | 65 | # Aggregate resource constraint 66 | for ires2 in range(nCountries): 67 | res[nCountries] += F(capStates[ires2],tfpStates[ires2]) + (1.0-delta)*capStates[ires2] - capPolicies[ires2]\ 68 | - AdjCost(capStates[ires2],capPolicies[ires2]) - (lamb/pareto[ires2])**(-gamma[ires2]) 69 | 70 | 71 | 72 | return res 73 | -------------------------------------------------------------------------------- /IRBC_model_mpi/parameters.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file sets the economic parameters as well as the technical parameters that 3 | govern the time iteration and the error computation process. 4 | 5 | """ 6 | 7 | import numpy as np 8 | 9 | ## Economic parameters 10 | 11 | 12 | # Type of IRBC model ({'smooth','non-smooth'}) 13 | typeIRBC = 'non-smooth' 14 | # Type of numerical integration: ({'GH-quadrature','monomials_2d','monomials_power'}) 15 | typeInt = 'monomials_power' 16 | 17 | # Number of countries 18 | nCountries = 3 19 | # Number of shocks (Country-specific shocks + aggregate shock) 20 | nShocks = nCountries+1 21 | # Number of policies (nCountries+1 for smooth IRBC, nCountries*2+1 for nonsmooth) 22 | if typeIRBC=='non-smooth': 23 | nPols = nCountries*2+1 24 | elif typeIRBC=='smooth': 25 | nPols = nCountries+1 26 | else: 27 | print('Error in determining the type of IRBC') 28 | exit() 29 | 30 | # Intertemporal elasticity of substitution 31 | a_eis = 0.25 32 | b_eis = 1.0 33 | gamma = np.zeros(nCountries) 34 | for j1 in range(nCountries): 35 | gamma[j1] = a_eis+j1*(b_eis-a_eis)/(nCountries-1) 36 | # Discount factor 37 | betta = 0.99 38 | # Capital share of income 39 | zeta = 0.36 40 | # Depreciation rate 41 | delta = 0.01 42 | # Persistence of TFP shocks 43 | rhoZ = 0.95 44 | # Standard deviation of TFP shocks 45 | sigE = 0.01 46 | # Intensity of capital adjustment costs 47 | kappa = 0.5 48 | # Steady state for capital 49 | k_ss = 1.0 50 | # Aggregate productivity 51 | A_tfp = (1.0-betta*(1.0-delta))/(zeta*betta) 52 | # Welfare weight 53 | pareto = A_tfp**(1.0/gamma) 54 | 55 | 56 | # Lower bound for capital 57 | kMin = 0.8 58 | # Upper bound for capital 59 | kMax = 1.2 60 | # Lower bound for TFP 61 | aMin = -0.8*sigE/(1.0-rhoZ) 62 | # Upper bound for TFP 63 | aMax = 0.8*sigE/(1.0-rhoZ) 64 | 65 | 66 | ## Technical parameters 67 | 68 | # Iteration to start at (start from scratch -- numstart =0; restart: numstart >0) 69 | numstart = 0 70 | # Maximum number of iterations 71 | maxiter = 30 72 | # Iteration at which the refinement starts 73 | iterRefStart = 25 74 | # Convergence criterion in time iteration 75 | tol_ti = 1e-4 76 | # Number of random draws for the error computation 77 | TT = 10000 78 | # Number of burn-in periods for SIMULATION 79 | burnin = 1000 80 | 81 | # Location where data is stored 82 | if typeIRBC == "non-smooth": 83 | data_location = "data/data_nonsmooth/" 84 | else: 85 | data_location = "data/data_smooth/" 86 | # Frequency of saving grid 87 | savefreq = 100 88 | -------------------------------------------------------------------------------- /IRBC_model/Expect_FOC.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file computes the expectation terms in the Euler equations of each country. 3 | 4 | Inputs: 5 | 1) ktemp -- array that contains the (guessed) values for the capital policies 6 | 2) state -- array that contains the values of the state variables 7 | 3) grid -- grid structure that contains the function values for interpolation 8 | 9 | Outputs: 10 | 1) ExpectFOC -- array of size [int_depth^(nCountries+1)]x[nCountries] that contains 11 | the expectation terms for each country in each possible state tomorrow 12 | 13 | """ 14 | 15 | 16 | import numpy as np 17 | from parameters import * 18 | from setup_num_int import * 19 | from aux_fcts import * 20 | 21 | 22 | def ExpectFOC(ktemp, state, grid): 23 | 24 | # 1) Determine next period's tfp states 25 | 26 | newstate = np.zeros((numNodes,nCountries)) 27 | 28 | for itfp in range(nCountries): 29 | newstate[:,itfp] = rhoZ*state[nCountries+itfp] + (IntNodes[:,itfp] + IntNodes[:,nShocks-1]) 30 | newstate[:,itfp] = np.where(newstate[:,itfp] > aMin, newstate[:,itfp], aMin) 31 | newstate[:,itfp] = np.where(newstate[:,itfp] < aMax, newstate[:,itfp], aMax) 32 | 33 | # 2) Determine next period's state variables 34 | 35 | evalPt = np.zeros((numNodes,nCountries*2)) 36 | 37 | evalPt[:,0:nCountries] = ktemp 38 | evalPt[:,nCountries:] = newstate 39 | 40 | 41 | # 3) Determine relevant variables within the expectations operator 42 | 43 | capPrPr = grid.evaluateBatch(evalPt)[:,0:nCountries] 44 | lambPr = grid.evaluateBatch(evalPt)[:,nCountries] 45 | 46 | if typeIRBC=='non-smooth': 47 | gzAlphaPr = grid.evaluateBatch(evalPt)[:,nCountries+1:] 48 | gzAplusPr = np.maximum(0.0,gzAlphaPr) 49 | 50 | # Compute tomorrow's marginal productivity of capital 51 | MPKtom = np.zeros((numNodes,nCountries)) 52 | for impk in range(nCountries): 53 | MPKtom[:,impk] = 1.0 - delta + Fk(ktemp[impk],newstate[:,impk]) - AdjCost_k(ktemp[impk],capPrPr[:,impk]) 54 | 55 | 56 | #Compute Density 57 | if typeInt=='GH-quadrature': 58 | density = np.pi**(-(nCountries+1) * 0.5) 59 | else: 60 | density = 1.0 61 | 62 | #Specify Integrand 63 | ExpectFOC = np.zeros((numNodes,nCountries)) 64 | 65 | if typeIRBC=='non-smooth': 66 | 67 | for iexp in range(nCountries): 68 | ExpectFOC[:,iexp] = (MPKtom[:,iexp]*lambPr - (1.0-delta)*gzAplusPr[:,iexp]) * density 69 | 70 | else: 71 | 72 | for iexp in range(nCountries): 73 | ExpectFOC[:,iexp] = MPKtom[:,iexp]*lambPr * density 74 | 75 | 76 | return ExpectFOC 77 | -------------------------------------------------------------------------------- /IRBC_model_mpi/Expect_FOC.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file computes the expectation terms in the Euler equations of each country. 3 | 4 | Inputs: 5 | 1) ktemp -- array that contains the (guessed) values for the capital policies 6 | 2) state -- array that contains the values of the state variables 7 | 3) grid -- grid structure that contains the function values for interpolation 8 | 9 | Outputs: 10 | 1) ExpectFOC -- array of size [int_depth^(nCountries+1)]x[nCountries] that contains 11 | the expectation terms for each country in each possible state tomorrow 12 | 13 | """ 14 | 15 | 16 | import numpy as np 17 | from parameters import * 18 | from setup_num_int import * 19 | from aux_fcts import * 20 | 21 | 22 | def ExpectFOC(ktemp, state, grid): 23 | 24 | # 1) Determine next period's tfp states 25 | 26 | newstate = np.zeros((numNodes,nCountries)) 27 | 28 | for itfp in range(nCountries): 29 | newstate[:,itfp] = rhoZ*state[nCountries+itfp] + (IntNodes[:,itfp] + IntNodes[:,nShocks-1]) 30 | newstate[:,itfp] = np.where(newstate[:,itfp] > aMin, newstate[:,itfp], aMin) 31 | newstate[:,itfp] = np.where(newstate[:,itfp] < aMax, newstate[:,itfp], aMax) 32 | 33 | # 2) Determine next period's state variables 34 | 35 | evalPt = np.zeros((numNodes,nCountries*2)) 36 | 37 | evalPt[:,0:nCountries] = ktemp 38 | evalPt[:,nCountries:] = newstate 39 | 40 | 41 | # 3) Determine relevant variables within the expectations operator 42 | 43 | capPrPr = grid.evaluateBatch(evalPt)[:,0:nCountries] 44 | lambPr = grid.evaluateBatch(evalPt)[:,nCountries] 45 | 46 | if typeIRBC=='non-smooth': 47 | gzAlphaPr = grid.evaluateBatch(evalPt)[:,nCountries+1:] 48 | gzAplusPr = np.maximum(0.0,gzAlphaPr) 49 | 50 | # Compute tomorrow's marginal productivity of capital 51 | MPKtom = np.zeros((numNodes,nCountries)) 52 | for impk in range(nCountries): 53 | MPKtom[:,impk] = 1.0 - delta + Fk(ktemp[impk],newstate[:,impk]) - AdjCost_k(ktemp[impk],capPrPr[:,impk]) 54 | 55 | 56 | #Compute Density 57 | if typeInt=='GH-quadrature': 58 | density = np.pi**(-(nCountries+1) * 0.5) 59 | else: 60 | density = 1.0 61 | 62 | #Specify Integrand 63 | ExpectFOC = np.zeros((numNodes,nCountries)) 64 | 65 | if typeIRBC=='non-smooth': 66 | 67 | for iexp in range(nCountries): 68 | ExpectFOC[:,iexp] = (MPKtom[:,iexp]*lambPr - (1.0-delta)*gzAplusPr[:,iexp]) * density 69 | 70 | else: 71 | 72 | for iexp in range(nCountries): 73 | ExpectFOC[:,iexp] = MPKtom[:,iexp]*lambPr * density 74 | 75 | 76 | return ExpectFOC 77 | -------------------------------------------------------------------------------- /Analytical_example/README.md: -------------------------------------------------------------------------------- 1 | # (Adaptive) Sparse Grid - analytic example 2 | 3 | To illustrate how (adaptive) sparse grids can be used, we provide an example in plain python and a Jupyter notebook, which approximates the following function: 4 | 5 | 6 | ![\begin{align*} 7 | f_d(\vec{x}) = \max(0,1-e^{\frac{1}{2}-(\prod_{i=1}^d(x_i+\frac{1}{5}))^{\frac{1}{d}}}),\;\,\text{with}\,\vec{x}=\{x_1,\dots,x_d\}\in[0,1]^d 8 | \end{align*} 9 | ](https://render.githubusercontent.com/render/math?math=%5CLarge+%5Cdisplaystyle+%5Cbegin%7Balign%2A%7D%0Af_d%28%5Cvec%7Bx%7D%29+%3D+%5Cmax%280%2C1-e%5E%7B%5Cfrac%7B1%7D%7B2%7D-%28%5Cprod_%7Bi%3D1%7D%5Ed%28x_i%2B%5Cfrac%7B1%7D%7B5%7D%29%29%5E%7B%5Cfrac%7B1%7D%7Bd%7D%7D%7D%29%2C%5C%3B%5C%2C%5Ctext%7Bwith%7D%5C%2C%5Cvec%7Bx%7D%3D%5C%7Bx_1%2C%5Cdots%2Cx_d%5C%7D%5Cin%5B0%2C1%5D%5Ed%0A%5Cend%7Balign%2A%7D%0A) 10 | 11 | as described in [Section 2.4](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3979412). We generate sparse grid as well as adaptive sparse grid approximations to the function and measure their accuracy as follows: We randomly generate 10,000 uniformly distributed test points, and compute the maximum error and the L2-error. 12 | 13 | The code is organized as follows: 14 | 15 | 1. Computation of errors for (non-adaptive) sparse grids from level 6 to 16 (including the respective output files). 16 | 17 | 2. Computation of errors for adaptive sparse grids, starting from level 3 and allowing for 18 | refinement steps from level 6 to level 16 (including the respective output files). 19 | 3. Visualization of grid points from a (non-adaptive) sparse grid of level 6 compared to 20 | the grid points from an adaptive sparse grid that is refined up to level 16. 21 | 22 | 4. Visualization of the performance in steps 1. and 2. 23 | 24 | Alternative test functions to measure the performance of function approximators were discribed for instance by [Genz (1984)](https://dl.acm.org/doi/10.5555/2837.2842), and available 25 | [here](https://www.sfu.ca/~ssurjano/integration.html). 26 | 27 | 28 | ### Prerequisites / Installation 29 | 30 | To run the code for either the analytical example or the international real business cycle (IRBC) model, follow the instructions below. 31 | 32 | **TASMANIAN 7.7** 33 | 34 | Tasmanian is included in the Python Pip index: https://pypi.org/project/Tasmanian/ 35 | 36 | ```shell 37 | $ python3 -m pip install scikit-build packaging numpy --user (required dependencies) 38 | $ python3 -m pip install Tasmanian --user (user installation) 39 | $ python3 -m pip install Tasmanian (virtual env installation) 40 | ``` 41 | 42 | ## Usage 43 | Launch the python code with 44 | ```shell 45 | $ cd /SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/Analytical_example 46 | $ python 2D_example.py 47 | ``` 48 | or alternatively (Jupyter notebook) 49 | 50 | ```shell 51 | $ cd /SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/Analytical_example 52 | $ jupyter-notebook 2D_example.ipynb 53 | ``` 54 | -------------------------------------------------------------------------------- /IRBC_model/setup_num_int.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file sets the relevant parameters for the numerical integration and constructs 3 | nodes and weights that are used to compute expextations. 4 | 5 | """ 6 | 7 | import numpy as np 8 | import Tasmanian 9 | from parameters import * 10 | 11 | 12 | if typeInt=='GH-quadrature': 13 | 14 | # Number of dimensions (One shock per country and the aggregate shock) 15 | int_dim = nCountries+1 16 | # Number of outputs 17 | int_out = 1 18 | # Level of integration grid (Number of points in each dimension; starts at 0) 19 | int_depth = 2 20 | # Tensor selection strategy 21 | int_type = "tensor" 22 | # Integration rule 23 | int_rule = "gauss-hermite" 24 | 25 | # Generate the grid structure 26 | int_grid = Tasmanian.makeGlobalGrid(int_dim, int_out, int_depth, int_type, int_rule) 27 | # Transform the nodes accordingly 28 | IntNodes = np.sqrt(2)*sigE*int_grid.getNeededPoints() 29 | # Get the corresponding quadrature weights 30 | IntWeights = int_grid.getQuadratureWeights() 31 | # Number of integration nodes 32 | numNodes = len(IntNodes) 33 | 34 | 35 | elif typeInt=='monomials_2d': 36 | 37 | # Number of integration nodes 38 | numNodes = 2*nShocks 39 | # Pre-allocate nodes array 40 | z1 = np.zeros((numNodes,nShocks)) 41 | # Fill nodes array with [1.0;-1.0] 42 | for i1 in range(nShocks): 43 | z1[i1*2,i1] = 1.0 44 | z1[i1*2+1,i1] = -1.0 45 | # Compute integration nodes 46 | IntNodes = z1*np.sqrt(nShocks)*sigE 47 | # Compute integration weights 48 | IntWeights = np.ones(numNodes)*1.0/numNodes 49 | 50 | 51 | elif typeInt=='monomials_power': 52 | 53 | # Number of integration nodes 54 | numNodes = 2*nShocks**2 + 1 55 | 56 | z0 = np.zeros((numNodes,nShocks)) 57 | 58 | # Deviations in one dimension (note that the origin is row zero) 59 | for i1 in range(nShocks): 60 | z0[i1*2+1,i1] = 1.0 61 | z0[i1*2+2,i1] = -1.0 62 | 63 | i0 = 0 64 | # Deviations in two dimensions 65 | for i1 in range(nShocks): 66 | for i2 in range(i1+1,nShocks): 67 | z0[2*nShocks+1+i0*4,i1] = 1.0 68 | z0[2*nShocks+2+i0*4,i1] = 1.0 69 | z0[2*nShocks+3+i0*4,i1] = -1.0 70 | z0[2*nShocks+4+i0*4,i1] = -1.0 71 | z0[2*nShocks+1+i0*4,i2] = 1.0 72 | z0[2*nShocks+2+i0*4,i2] = -1.0 73 | z0[2*nShocks+3+i0*4,i2] = 1.0 74 | z0[2*nShocks+4+i0*4,i2] = -1.0 75 | i0 += 1 76 | 77 | # Nodes 78 | IntNodes = np.zeros((numNodes,nShocks)) 79 | IntNodes[1:nShocks*2+1,:] = z0[1:nShocks*2+1,:]*np.sqrt(2.0+nShocks)*sigE 80 | IntNodes[nShocks*2+1:] = z0[nShocks*2+1:]*np.sqrt((2.0+nShocks)/2.0)*sigE 81 | 82 | # Weights 83 | IntWeights = np.zeros(numNodes) 84 | 85 | IntWeights[0] = 2.0/(2.0+nShocks) 86 | IntWeights[1:nShocks*2+1] = (4-nShocks)/(2*(2+nShocks)**2) 87 | IntWeights[nShocks*2+1:] = 1.0/(nShocks+2)**2 88 | 89 | 90 | else: 91 | 92 | print('Error in determining the type of numerical integration') 93 | exit() 94 | -------------------------------------------------------------------------------- /IRBC_model_mpi/setup_num_int.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file sets the relevant parameters for the numerical integration and constructs 3 | nodes and weights that are used to compute expextations. 4 | 5 | """ 6 | 7 | import numpy as np 8 | import Tasmanian 9 | from parameters import * 10 | 11 | 12 | if typeInt=='GH-quadrature': 13 | 14 | # Number of dimensions (One shock per country and the aggregate shock) 15 | int_dim = nCountries+1 16 | # Number of outputs 17 | int_out = 1 18 | # Level of integration grid (Number of points in each dimension; starts at 0) 19 | int_depth = 2 20 | # Tensor selection strategy 21 | int_type = "tensor" 22 | # Integration rule 23 | int_rule = "gauss-hermite" 24 | 25 | # Generate the grid structure 26 | int_grid = Tasmanian.makeGlobalGrid(int_dim, int_out, int_depth, int_type, int_rule) 27 | # Transform the nodes accordingly 28 | IntNodes = np.sqrt(2)*sigE*int_grid.getNeededPoints() 29 | # Get the corresponding quadrature weights 30 | IntWeights = int_grid.getQuadratureWeights() 31 | # Number of integration nodes 32 | numNodes = len(IntNodes) 33 | 34 | 35 | elif typeInt=='monomials_2d': 36 | 37 | # Number of integration nodes 38 | numNodes = 2*nShocks 39 | # Pre-allocate nodes array 40 | z1 = np.zeros((numNodes,nShocks)) 41 | # Fill nodes array with [1.0;-1.0] 42 | for i1 in range(nShocks): 43 | z1[i1*2,i1] = 1.0 44 | z1[i1*2+1,i1] = -1.0 45 | # Compute integration nodes 46 | IntNodes = z1*np.sqrt(nShocks)*sigE 47 | # Compute integration weights 48 | IntWeights = np.ones(numNodes)*1.0/numNodes 49 | 50 | 51 | elif typeInt=='monomials_power': 52 | 53 | # Number of integration nodes 54 | numNodes = 2*nShocks**2 + 1 55 | 56 | z0 = np.zeros((numNodes,nShocks)) 57 | 58 | # Deviations in one dimension (note that the origin is row zero) 59 | for i1 in range(nShocks): 60 | z0[i1*2+1,i1] = 1.0 61 | z0[i1*2+2,i1] = -1.0 62 | 63 | i0 = 0 64 | # Deviations in two dimensions 65 | for i1 in range(nShocks): 66 | for i2 in range(i1+1,nShocks): 67 | z0[2*nShocks+1+i0*4,i1] = 1.0 68 | z0[2*nShocks+2+i0*4,i1] = 1.0 69 | z0[2*nShocks+3+i0*4,i1] = -1.0 70 | z0[2*nShocks+4+i0*4,i1] = -1.0 71 | z0[2*nShocks+1+i0*4,i2] = 1.0 72 | z0[2*nShocks+2+i0*4,i2] = -1.0 73 | z0[2*nShocks+3+i0*4,i2] = 1.0 74 | z0[2*nShocks+4+i0*4,i2] = -1.0 75 | i0 += 1 76 | 77 | # Nodes 78 | IntNodes = np.zeros((numNodes,nShocks)) 79 | IntNodes[1:nShocks*2+1,:] = z0[1:nShocks*2+1,:]*np.sqrt(2.0+nShocks)*sigE 80 | IntNodes[nShocks*2+1:] = z0[nShocks*2+1:]*np.sqrt((2.0+nShocks)/2.0)*sigE 81 | 82 | # Weights 83 | IntWeights = np.zeros(numNodes) 84 | 85 | IntWeights[0] = 2.0/(2.0+nShocks) 86 | IntWeights[1:nShocks*2+1] = (4-nShocks)/(2*(2+nShocks)**2) 87 | IntWeights[nShocks*2+1:] = 1.0/(nShocks+2)**2 88 | 89 | 90 | else: 91 | 92 | print('Error in determining the type of numerical integration') 93 | exit() 94 | -------------------------------------------------------------------------------- /IRBC_model/aux_fcts.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file contains auxilliary functions that are used within the code. 3 | 4 | """ 5 | 6 | 7 | from parameters import * 8 | import numpy as np 9 | 10 | 11 | ################################################################################ 12 | # Production function # 13 | ################################################################################ 14 | 15 | def F(capital,sh): 16 | 17 | FF = A_tfp * np.exp(sh)*np.maximum(capital,1e-6)**zeta 18 | 19 | return FF 20 | 21 | 22 | ################################################################################ 23 | # Marginal product of capital # 24 | ################################################################################ 25 | 26 | def Fk(capital,sh): 27 | 28 | F_k = A_tfp * zeta*np.exp(sh)*np.maximum(capital,1e-6)**(zeta-1.0) 29 | 30 | return F_k 31 | 32 | 33 | ################################################################################ 34 | # Capital adjustment cost # 35 | ################################################################################ 36 | 37 | def AdjCost(ktod,ktom): 38 | 39 | captod = np.maximum(ktod,1e-6) 40 | captom = np.maximum(ktom,1e-6) 41 | 42 | j = captom/captod - 1.0 43 | Adj_cost = 0.5 * kappa * j * j * captod 44 | 45 | return Adj_cost 46 | 47 | 48 | ################################################################################ 49 | # Derivative of capital adjustment cost w.r.t today's cap stock # 50 | ################################################################################ 51 | 52 | def AdjCost_k(ktod,ktom): 53 | 54 | captod = np.maximum(ktod,1e-6) 55 | captom = np.maximum(ktom,1e-6) 56 | 57 | j = captom/captod - 1.0 58 | j1 = captom/captod + 1.0 59 | AdjCostk = (-0.5)*kappa*j*j1 60 | 61 | return AdjCostk 62 | 63 | 64 | ################################################################################ 65 | # Derivative of capital adjustment cost w.r.t tomorrows's cap stock # 66 | ################################################################################ 67 | 68 | def AdjCost_ktom(ktod,ktom): 69 | 70 | captod = np.maximum(ktod,1e-6) 71 | captom = np.maximum(ktom,1e-6) 72 | 73 | j = captom/captod - 1.0 74 | AdjCostktom = kappa * j 75 | 76 | 77 | return AdjCostktom 78 | 79 | 80 | ################################################################################ 81 | # Residual of aggregate resource constraint # 82 | ################################################################################ 83 | 84 | # This function is used to compute an initial guess for the ARC multiplier 85 | # It computes the residual of the aggregate resource constraint given a 86 | # guess for lambda and a grid point 87 | 88 | def ARC_zero(lam_gues,gridPt): 89 | 90 | res = 0.0 91 | 92 | for i1 in range(nCountries): 93 | res += np.exp(gridPt[nCountries+i1])*A_tfp*gridPt[i1]**zeta - (-delta*kappa/2.0)**2 - (lam_gues/pareto[i1])**(-gamma[i1]) 94 | 95 | return res 96 | -------------------------------------------------------------------------------- /IRBC_model_mpi/aux_fcts.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file contains auxilliary functions that are used within the code. 3 | 4 | """ 5 | 6 | 7 | from parameters import * 8 | import numpy as np 9 | 10 | 11 | ################################################################################ 12 | # Production function # 13 | ################################################################################ 14 | 15 | def F(capital,sh): 16 | 17 | FF = A_tfp * np.exp(sh)*np.maximum(capital,1e-6)**zeta 18 | 19 | return FF 20 | 21 | 22 | ################################################################################ 23 | # Marginal product of capital # 24 | ################################################################################ 25 | 26 | def Fk(capital,sh): 27 | 28 | F_k = A_tfp * zeta*np.exp(sh)*np.maximum(capital,1e-6)**(zeta-1.0) 29 | 30 | return F_k 31 | 32 | 33 | ################################################################################ 34 | # Capital adjustment cost # 35 | ################################################################################ 36 | 37 | def AdjCost(ktod,ktom): 38 | 39 | captod = np.maximum(ktod,1e-6) 40 | captom = np.maximum(ktom,1e-6) 41 | 42 | j = captom/captod - 1.0 43 | Adj_cost = 0.5 * kappa * j * j * captod 44 | 45 | return Adj_cost 46 | 47 | 48 | ################################################################################ 49 | # Derivative of capital adjustment cost w.r.t today's cap stock # 50 | ################################################################################ 51 | 52 | def AdjCost_k(ktod,ktom): 53 | 54 | captod = np.maximum(ktod,1e-6) 55 | captom = np.maximum(ktom,1e-6) 56 | 57 | j = captom/captod - 1.0 58 | j1 = captom/captod + 1.0 59 | AdjCostk = (-0.5)*kappa*j*j1 60 | 61 | return AdjCostk 62 | 63 | 64 | ################################################################################ 65 | # Derivative of capital adjustment cost w.r.t tomorrows's cap stock # 66 | ################################################################################ 67 | 68 | def AdjCost_ktom(ktod,ktom): 69 | 70 | captod = np.maximum(ktod,1e-6) 71 | captom = np.maximum(ktom,1e-6) 72 | 73 | j = captom/captod - 1.0 74 | AdjCostktom = kappa * j 75 | 76 | 77 | return AdjCostktom 78 | 79 | 80 | ################################################################################ 81 | # Residual of aggregate resource constraint # 82 | ################################################################################ 83 | 84 | # This function is used to compute an initial guess for the ARC multiplier 85 | # It computes the residual of the aggregate resource constraint given a 86 | # guess for lambda and a grid point 87 | 88 | def ARC_zero(lam_gues,gridPt): 89 | 90 | res = 0.0 91 | 92 | for i1 in range(nCountries): 93 | res += np.exp(gridPt[nCountries+i1])*A_tfp*gridPt[i1]**zeta - (-delta*kappa/2.0)**2 - (lam_gues/pareto[i1])**(-gamma[i1]) 94 | 95 | return res 96 | -------------------------------------------------------------------------------- /IRBC_model/setup_asg.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file sets the relevant parameters for the adaptive sparse grid and initializes 3 | the grid structure that is used in the main file. It also includes parameters that 4 | govern the adaptivity process. 5 | 6 | """ 7 | 8 | import numpy as np 9 | import Tasmanian 10 | from parameters import * 11 | from scipy import optimize 12 | from aux_fcts import ARC_zero 13 | 14 | 15 | ################################################################################ 16 | # Grid construction # 17 | ################################################################################ 18 | 19 | # Number of dimensions (capital stock and tfp for each country) 20 | gridDim = nCountries*2 21 | # Number of outputs (capital policy & multiplier for each country + ARC multiplier) 22 | gridOut = nPols 23 | # Grid level (we start with a sparse grid of level 3) 24 | gridDepth = 2 25 | # 1=linear, 2=quadratic, 3=cubic 26 | gridOrder = 1 27 | # Type of base functions 28 | gridRule = "localp" 29 | 30 | # Set the grid domain to [kmin,kmax]^n x [amin,amax]^n 31 | gridDomain = np.zeros((gridDim,2)) 32 | 33 | gridDomain[0:nCountries,0] = kMin 34 | gridDomain[0:nCountries,1] = kMax 35 | gridDomain[nCountries:,0] = aMin 36 | gridDomain[nCountries:,1] = aMax 37 | 38 | # Generate the grid structure 39 | grid0 = Tasmanian.makeLocalPolynomialGrid(gridDim,gridOut,gridDepth,gridOrder,gridRule) 40 | # Transform the domain 41 | grid0.setDomainTransform(gridDomain) 42 | # Get the points that require function values 43 | aPoints = grid0.getPoints() 44 | # Get the number of points that require function values 45 | aNum = grid0.getNumPoints() 46 | 47 | 48 | ################################################################################ 49 | # Adaptivity parameters # 50 | ################################################################################ 51 | 52 | # Surplus threshold 53 | surplThreshold = 1e-3 54 | # Number of maximum refinements 55 | maxRef = 1 56 | # Maximum Level of ASG 57 | maxRefLevel = gridDepth + maxRef 58 | # Outputs that are considered in the refinement process (-1 implies that all outputs are considered) 59 | dimRef = -1 60 | # Type of grid refinements 61 | typeRefinement = 'classic' 62 | # Scale correction in the refinement process: 63 | # We only let the capital policies of each country determine the addition of grid points 64 | scaleCorr = np.zeros(nPols) 65 | scaleCorr[0:nCountries] = 1 66 | 67 | 68 | ################################################################################ 69 | # Initialization # 70 | ################################################################################ 71 | 72 | # Our time iteration algorithm requires the initialization of policy functions, 73 | # as these are necessary to interpolate for next period's policies. We make an 74 | # educated guess here, assuming that capital choices are equal to the respective 75 | # non-depreciated capital stock. This implies for the non-smooth model that the 76 | # irreversibility constraint is binding everywhere. 77 | 78 | polGuess = np.zeros((aNum,nPols)) 79 | 80 | # Guesses for the capital policies and investment constraint multipliers: 81 | 82 | for i0 in range(nCountries): 83 | polGuess[:,i0] = aPoints[:,i0]*(1.0-delta) 84 | 85 | if typeIRBC=='non-smooth': 86 | polGuess[:,nCountries+1+i0] = -delta*aPoints[:,i0] 87 | 88 | # Guess for the aggregate ressource constraint multiplier: 89 | # 90 | # We use a nonlinear equation solver to find the ARC multipliers that are consistent 91 | # with the guesses for the capital policies and investment constraint multipliers. 92 | 93 | for i0 in range(aNum): 94 | root = optimize.root(ARC_zero, 0.1, method='lm', args=(aPoints[i0,:])) 95 | polGuess[i0,nCountries] = root.x 96 | # Print the status in case the solver did not find the root 97 | if root.success!= 1: 98 | print(root.message) 99 | 100 | 101 | # Load function values into grid structure 102 | grid0.loadNeededPoints(polGuess) 103 | -------------------------------------------------------------------------------- /IRBC_model_mpi/setup_asg.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file sets the relevant parameters for the adaptive sparse grid and initializes 3 | the grid structure that is used in the main file. It also includes parameters that 4 | govern the adaptivity process. 5 | 6 | """ 7 | 8 | import numpy as np 9 | import Tasmanian 10 | from parameters import * 11 | from scipy import optimize 12 | from aux_fcts import ARC_zero 13 | 14 | 15 | ################################################################################ 16 | # Grid construction # 17 | ################################################################################ 18 | 19 | # Number of dimensions (capital stock and tfp for each country) 20 | gridDim = nCountries*2 21 | # Number of outputs (capital policy & multiplier for each country + ARC multiplier) 22 | gridOut = nPols 23 | # Grid level (we start with a sparse grid of level 4) 24 | gridDepth = 3 25 | # 1=linear, 2=quadratic, 3=cubic 26 | gridOrder = 1 27 | # Type of base functions 28 | gridRule = "localp" 29 | 30 | # Set the grid domain to [kmin,kmax]^n x [amin,amax]^n 31 | gridDomain = np.zeros((gridDim,2)) 32 | 33 | gridDomain[0:nCountries,0] = kMin 34 | gridDomain[0:nCountries,1] = kMax 35 | gridDomain[nCountries:,0] = aMin 36 | gridDomain[nCountries:,1] = aMax 37 | 38 | # Generate the grid structure 39 | grid0 = Tasmanian.makeLocalPolynomialGrid(gridDim,gridOut,gridDepth,gridOrder,gridRule) 40 | # Transform the domain 41 | grid0.setDomainTransform(gridDomain) 42 | # Get the points that require function values 43 | aPoints = grid0.getPoints() 44 | # Get the number of points that require function values 45 | aNum = grid0.getNumPoints() 46 | 47 | 48 | ################################################################################ 49 | # Adaptivity parameters # 50 | ################################################################################ 51 | 52 | # Surplus threshold 53 | surplThreshold = 1e-3 54 | # Number of maximum refinements 55 | maxRef = 1 56 | # Maximum Level of ASG 57 | maxRefLevel = gridDepth + maxRef 58 | # Outputs that are considered in the refinement process (-1 implies that all outputs are considered) 59 | dimRef = -1 60 | # Type of grid refinements 61 | typeRefinement = 'classic' 62 | # Scale correction in the refinement process: 63 | # We only let the capital policies of each country determine the addition of grid points 64 | scaleCorr = np.zeros(nPols) 65 | scaleCorr[0:nCountries] = 1 66 | 67 | 68 | ################################################################################ 69 | # Initialization # 70 | ################################################################################ 71 | 72 | # Our time iteration algorithm requires the initialization of policy functions, 73 | # as these are necessary to interpolate for next period's policies. We make an 74 | # educated guess here, assuming that capital choices are equal to the respective 75 | # non-depreciated capital stock. This implies for the non-smooth model that the 76 | # irreversibility constraint is binding everywhere. 77 | 78 | polGuess = np.zeros((aNum,nPols)) 79 | 80 | # Guesses for the capital policies and investment constraint multipliers: 81 | 82 | for i0 in range(nCountries): 83 | polGuess[:,i0] = aPoints[:,i0]*(1.0-delta) 84 | 85 | if typeIRBC=='non-smooth': 86 | polGuess[:,nCountries+1+i0] = -delta*aPoints[:,i0] 87 | 88 | # Guess for the aggregate ressource constraint multiplier: 89 | # 90 | # We use a nonlinear equation solver to find the ARC multipliers that are consistent 91 | # with the guesses for the capital policies and investment constraint multipliers. 92 | 93 | for i0 in range(aNum): 94 | root = optimize.root(ARC_zero, 0.1, method='lm', args=(aPoints[i0,:])) 95 | polGuess[i0,nCountries] = root.x 96 | # Print the status in case the solver did not find the root 97 | if root.success!= 1: 98 | print(root.message) 99 | 100 | 101 | # Load function values into grid structure 102 | grid0.loadNeededPoints(polGuess) 103 | -------------------------------------------------------------------------------- /IRBC_model/README.md: -------------------------------------------------------------------------------- 1 | # The IRBC Benchmark Model 2 | 3 | This script provides the code used to model and solve the benchmark model in section 3 of the review article paper by [Brumm, Krause, Schaab, & Scheidegger (2021)](TBA). 4 | 5 | ### Prerequisites / Installation 6 | 7 | To run the benchmark IRBC model, it is necessary that Tasmanian is installed. Tasmanian is included in the 8 | Python Pip index: https://pypi.org/project/Tasmanian/ 9 | 10 | ```shell 11 | $ python3 -m pip install scikit-build packaging numpy --user (required dependencies) 12 | $ python3 -m pip install Tasmanian --user (user installation) 13 | $ python3 -m pip install Tasmanian (virtual env installation) 14 | ``` 15 | Further information on alternative installation procedures can be found here: https://tasmanian.ornl.gov/documentation/md_Doxygen_Installation.html 16 | 17 | ## Usage 18 | There are two modes to run this code: 19 | 20 | 1. start the time iteration process from scratch (or restart from a predetermined iteration), 21 | 2. inspect the final results without computing the model solution. 22 | 23 | We have simplified the code such that the only user input is the desired running mode. To run, follow 24 | these instructions. 25 | 26 | Access this folder in the terminal: 27 | 28 | ```shell 29 | $ cd /SparseGrids_in_econ_handbook/IRBC_model 30 | ``` 31 | 32 | ### Mode 1: Start from scratch (or restart from a predetermined iteration) 33 | If you want to start the time iteration from scratch or restart from a predetermined iteration, use the 34 | following command in the terminal: 35 | 36 | ```shell 37 | $ python mainASG.py 38 | ``` 39 | In parameters.py, there are two parameters that are relevant here: 40 | 41 | a) `numstart` determines at which iteration the main loop starts 42 | 43 | b) `savefreq` determines the frequency at which the grid structure is stored 44 | 45 | The default setting for savefreq is 10 such that the grid structure from every 10th iteration is stored. 46 | We provide these in `./data`. A list of .py-files that are involved in the iterative process can be found below. 47 | 48 | ### Mode 2: Postprocessing only 49 | If you want to run the postprocessing without computing the model solution, you can use the following 50 | command in the terminal: 51 | 52 | ```shell 53 | $ python mainASG.py --final_grid 54 | ``` 55 | The grid structure after the last time iteration step can be found in `./data` and will be loaded directly. 56 | 57 | 58 | ## Model Versions 59 | 60 | This code solves the IRBC model both with and without irreversible investment. In parameters.py, there is the 61 | variable `typeIRBC` which can take the values `non-smooth` and `smooth`, indicating the respective model version. 62 | 63 | There are two folders in `./data` containing plots and .txt-files of policy functions as well as stored grid 64 | structures in .txt-files for both model versions. 65 | 66 | 67 | ## Code Organisation 68 | 69 | The code on the IRBC model consists of the following files: 70 | 71 | - mainASG.py -- the main iterative loop; executes the postprocessing 72 | 73 | - time_iteration.py -- contains time iteration step as well as the grid refinement process 74 | 75 | - postprocessing.py -- contains postprocessing functions such as error measures and storage of results 76 | 77 | - parameters.py -- contains economic and technical parameters 78 | 79 | - setup_asg.py -- contains parameters and construction of the adaptive sparse grid structure 80 | 81 | - setup_num_int.py -- constructs nodes and weights for numerical integration 82 | 83 | - ExpectFOC.py -- constructs the integrands for the system of equations 84 | 85 | - SOE.py -- contains the system of equations 86 | 87 | - aux_fcts.py -- contains auxilliary functions 88 | 89 | 90 | ## Postprocessing 91 | 92 | After convergence of the time iteration, the following postprocessing steps are executed: 93 | 94 | - Computation of average and maximum errors along the simulation path 95 | 96 | - Computation of average and maximum errors in the state space 97 | 98 | - Plotting the policy functions in 1D 99 | 100 | - Storing the policy functions 101 | 102 | 103 | -------------------------------------------------------------------------------- /IRBC_model_mpi/README.md: -------------------------------------------------------------------------------- 1 | # The IRBC Benchmark Model 2 | 3 | This script provides code, parallelized with [MPI4PY](https://mpi4py.readthedocs.io/en/stable/), to solve the benchmark model in section 3 of the review article paper by [Brumm, Krause, Schaab, & Scheidegger (2022)](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3979412). The simple parallelization approach we follow here adopts ideas from [Brumm & Scheidegger (2017), Section 4](https://onlinelibrary.wiley.com/doi/abs/10.3982/ECTA12216), and can, in the case of large sparse grids, speed up the time-to-solution by orders of magnitude. 4 | 5 | ### Prerequisites / Installation 6 | 7 | To run the benchmark IRBC model in parallel, it is necessary that Tasmanian as well as mpi4py is installed. Tasmanian is included in the 8 | Python Pip index: https://pypi.org/project/Tasmanian/ 9 | 10 | ```shell 11 | $ python3 -m pip install scikit-build packaging numpy --user (required dependencies) 12 | $ python3 -m pip install Tasmanian --user (user installation) 13 | $ python3 -m pip install Tasmanian (virtual env installation) 14 | $ python3 -m pip install pip install mpi4py 15 | ``` 16 | Further information on alternative installation procedures can be found here: https://tasmanian.ornl.gov/documentation/md_Doxygen_Installation.html 17 | 18 | ## Usage 19 | There are two modes to run this code: 20 | 21 | 1. start the time iteration process from scratch (or restart from a predetermined iteration), 22 | 2. inspect the final results without computing the model solution. 23 | 24 | We have simplified the code such that the only user input is the desired running mode. To run, follow 25 | these instructions. 26 | 27 | Access this folder in the terminal: 28 | 29 | ```shell 30 | $ cd /SparseGrids_in_econ_handbook/IRBC_model 31 | ``` 32 | 33 | ### Mode 1: Start from scratch (or restart from a predetermined iteration) 34 | If you want to start the time iteration from scratch or restart from a predetermined iteration, use the 35 | following command in the terminal: 36 | 37 | ```shell 38 | $ python mainASG.py 39 | ``` 40 | In parameters.py, there are two parameters that are relevant here: 41 | 42 | a) `numstart` determines at which iteration the main loop starts 43 | 44 | b) `savefreq` determines the frequency at which the grid structure is stored 45 | 46 | The default setting for savefreq is 10 such that the grid structure from every 10th iteration is stored. 47 | We provide these in `./data`. A list of .py-files that are involved in the iterative process can be found below. 48 | 49 | 50 | #### MPI 51 | 52 | The solutions during time-iteration can be embarassingly parallelized via MPI. To use this, 53 | make sure mpi4py is set up, `export OMP_NUM_THREADS=1`, and then run (e.g. with 4 phyiscal cores): 54 | 55 | ``` 56 | mpirun -np 4 python mainASG.py 57 | ``` 58 | 59 | Depending on the particular installation of MPI, one sometimes has to slightly alter the run command as follows to avoid performance bottlenecks: 60 | ``` 61 | mpirun --bind-to core -np 4 python mainASG.py 62 | ``` 63 | The flag [--bind-to core](https://www.open-mpi.org/doc/v3.0/man1/mpirun.1.php) binds processes to cores. 64 | 65 | 66 | ### Mode 2: Postprocessing only 67 | If you want to run the postprocessing without computing the model solution, you can use the following 68 | command in the terminal: 69 | 70 | ```shell 71 | $ python mainASG.py --final_grid 72 | ``` 73 | The grid structure after the last time iteration step can be found in `./data` and will be loaded directly. 74 | 75 | 76 | ## Model Versions 77 | 78 | This code solves the IRBC model both with and without irreversible investment. In parameters.py, there is the 79 | variable `typeIRBC` which can take the values `non-smooth` and `smooth`, indicating the respective model version. 80 | 81 | There are two folders in `./data` containing plots and .txt-files of policy functions as well as stored grid 82 | structures in .txt-files for both model versions. 83 | 84 | 85 | ## Code Organisation 86 | 87 | The code on the IRBC model consists of the following files: 88 | 89 | - mainASG.py -- the main iterative loop; executes the postprocessing 90 | 91 | - time_iteration.py -- contains time iteration step as well as the grid refinement process 92 | 93 | - postprocessing.py -- contains postprocessing functions such as error measures and storage of results 94 | 95 | - parameters.py -- contains economic and technical parameters 96 | 97 | - setup_asg.py -- contains parameters and construction of the adaptive sparse grid structure 98 | 99 | - setup_num_int.py -- constructs nodes and weights for numerical integration 100 | 101 | - ExpectFOC.py -- constructs the integrands for the system of equations 102 | 103 | - SOE.py -- contains the system of equations 104 | 105 | - aux_fcts.py -- contains auxilliary functions 106 | 107 | 108 | ## Postprocessing 109 | 110 | After convergence of the time iteration, the following postprocessing steps are executed: 111 | 112 | - Computation of average and maximum errors along the simulation path 113 | 114 | - Computation of average and maximum errors in the state space 115 | 116 | - Plotting the policy functions in 1D 117 | 118 | - Storing the policy functions 119 | 120 | 121 | -------------------------------------------------------------------------------- /IRBC_model/time_iteration.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file contains routines that are used within the time iteration procedure. 3 | In particular, it consists of: 4 | 5 | - the time iteration step at the beginning of each iteration 6 | - the grid refinement process 7 | - the construction of a new grid 8 | - the calculation of the convergence criterion 9 | - the storage of the grid structure 10 | 11 | """ 12 | 13 | 14 | 15 | ################################################################################ 16 | # Load necessary libraries # 17 | ################################################################################ 18 | 19 | import numpy as np 20 | import Tasmanian 21 | 22 | from parameters import * 23 | from scipy import optimize 24 | from Expect_FOC import * 25 | from SOE import * 26 | from setup_asg import * 27 | 28 | 29 | ################################################################################ 30 | # Time iteration step # 31 | ################################################################################ 32 | 33 | def ti_step(grid,pol_guess,gridZero): 34 | 35 | # Get the points that require function values 36 | aPoints1 = grid.getNeededPoints() 37 | # Get the number of points that require function values 38 | aNumAdd = grid.getNumNeeded() 39 | 40 | # Array for intermediate update step 41 | polInt = np.zeros((aNumAdd,nPols)) 42 | 43 | # Time Iteration step 44 | for ii1 in range(aNumAdd): 45 | 46 | state = aPoints1[ii1] 47 | pol = pol_guess[ii1,:] 48 | root = optimize.root(sysOfEqs, pol, args=(state,gridZero), method='hybr') 49 | polInt[ii1,:] = root.x 50 | 51 | # Add the new function values to grid1 52 | grid.loadNeededPoints(polInt) 53 | 54 | 55 | return grid 56 | 57 | 58 | 59 | ################################################################################ 60 | # Grid refinement # 61 | ################################################################################ 62 | 63 | def refine(grid): 64 | 65 | # Get the points that require function values 66 | aNumLoad = grid.getNumLoaded() 67 | # Scaling to only allow for those policies that are supposed to 68 | # determine the refinement process (in this case only the capital policies) 69 | scaleCorrMat = np.zeros((aNumLoad,nPols)) 70 | scaleCorrMat[:,0:nPols+1] = scaleCorr 71 | 72 | # Refine the grid based on the surplus coefficients 73 | grid.setSurplusRefinement(surplThreshold, dimRef, typeRefinement, [], scaleCorrMat) 74 | 75 | if (grid.getNumNeeded()>0): 76 | 77 | # Get the new points and the number of points 78 | nwpts = grid.getNeededPoints() 79 | aNumNew = grid.getNumNeeded() 80 | 81 | # We assign (for now) function values through interpolation# 82 | pol_guess = np.zeros((aNumNew,nPols)) 83 | pol_guess = grid.evaluateBatch(nwpts) 84 | 85 | else: 86 | 87 | pol_guess = [] 88 | 89 | 90 | return grid, pol_guess 91 | 92 | 93 | 94 | ################################################################################ 95 | # New grid construction # 96 | ################################################################################ 97 | 98 | def fresh_grid(): 99 | 100 | # Generate the grid structure 101 | grid = Tasmanian.makeLocalPolynomialGrid(gridDim,gridOut,gridDepth,gridOrder,gridRule) 102 | # Transform the domain 103 | grid.setDomainTransform(gridDomain) 104 | 105 | return grid 106 | 107 | 108 | 109 | ################################################################################ 110 | # Checking convergence and updating policies # 111 | ################################################################################ 112 | 113 | def policy_update(gridOld,gridNew): 114 | 115 | # Get the points and the number of points from grid1 116 | aPoints2 = gridNew.getPoints() 117 | aNumTot = gridNew.getNumPoints() 118 | 119 | # Evaluate the grid points on both grid structures 120 | polGuessTr1 = gridNew.evaluateBatch(aPoints2) 121 | polGuessTr0 = gridOld.evaluateBatch(aPoints2) 122 | 123 | # 1) Compute the Sup-Norm 124 | 125 | metricAux = np.zeros(nPols) 126 | 127 | for imet in range(nPols): 128 | metricAux[imet] = np.amax(np.abs(polGuessTr0[:,imet]-polGuessTr1[:,imet])) 129 | 130 | metricSup = np.amax(metricAux) 131 | 132 | # 2) Compute the L2-Norm 133 | 134 | metricL2 = 0.0 135 | 136 | for imetL2 in range(nPols): 137 | metricL2 += np.sum((np.abs(polGuessTr0[:,imetL2]-polGuessTr1[:,imetL2]))**2) 138 | 139 | metricL2 = (metricL2/(aNumTot*nPols))**0.5 140 | 141 | metric = np.minimum(metricL2,metricSup) 142 | 143 | # Now update pol_guess and grid 144 | 145 | polGuess = np.zeros((aNumTot,nPols)) 146 | 147 | for iupd in range(nPols): 148 | polGuess[:,iupd] = 0.5*polGuessTr0[:,iupd] + 0.5*polGuessTr1[:,iupd] 149 | 150 | gridOld = Tasmanian.copyGrid(gridNew) 151 | 152 | 153 | return metric, polGuess, gridOld 154 | 155 | 156 | ################################################################################ 157 | # Grid storage # 158 | ################################################################################ 159 | 160 | def save_grid(grid,iter): 161 | 162 | if typeIRBC=='non-smooth': 163 | grid.write(data_location_nonsmooth + "grid_iter_" + str(iter+1) + ".txt") 164 | else: 165 | grid.write(data_location_smooth + "grid_iter_" + str(iter+1) + ".txt") 166 | 167 | 168 | return 169 | -------------------------------------------------------------------------------- /IRBC_model_mpi/mainASG.py: -------------------------------------------------------------------------------- 1 | """ 2 | 3 | This Python code accompanies the review article by Brumm, Krause, Schaab, & Scheidegger (2021) 4 | and corresponds to the International Real Business Cycle (IRBC) model with irreversible invest- 5 | ment, as presented in section 3.2. 6 | 7 | We demonstrate the capabilities of adaptive sparse grids as these occasionally binding constraints 8 | induce non-differentiabilities in policy functions, a challenge for approximation that adaptivity is 9 | able to address. 10 | 11 | Then, we generate a sparse grid as well as adaptive sparse grid approximations to the function 12 | and measure their accuracy as follows: We randomly generate 10,000 uniformly distributed test 13 | points, and compute the maximum error and the L1-error. 14 | 15 | To do so, we use TASMANIAN library to showcase the general workflow of setting up a sparse grid 16 | and approximate a multivariate function. 17 | 18 | -------------------------------------------------------------------------------------------------- 19 | 20 | The parameters that govern the adaptivity of grid points are located in setup_asg.py. In particular, 21 | the following parameters can be set: 22 | 23 | - surplThreshold is the threshold that determines whether new grid points are added. 24 | 25 | - maxRef is the number of maximum refinements of the sparse grid. A value of 0 corresponds to an 26 | ordinary grid without any refinement. 27 | 28 | - dimRef determines the model outputs that are considered in the refinement process. A value of -1 29 | implies that all outputs are used. 30 | 31 | - typeRefinement corresponds to the refinement strategy. The following options are available: 32 | 33 | ['classic', 'parents', 'direction', 'fds', 'stable'] (see TASMANIAN documentation for details) 34 | 35 | - scaleCorr is a scale correction applied before the grid refinement. This implies that model outputs 36 | can be weighted in their contribution to the grid refinement. Note that this has to be applied to 37 | all existing points in the grid such that scaleCorr has to be an array of the same size as the grid. 38 | A value of 0 then implies that a given model output is ignored in the refinement process. 39 | 40 | -------------------------------------------------------------------------------------------------- 41 | 42 | The code is organized as follows: 43 | 44 | 1) Solution of the IRBC model with irreversible investment, using either an ordinary or an 45 | adaptive sparse grid (given the parametrization in setup_asg). 46 | 47 | 2) Computation of max- and L1-errors along the simulation path. 48 | 49 | 3) Computation of max- and L1-errors for 10,000 points in the state space. 50 | 51 | 52 | """ 53 | 54 | ################################################################################ 55 | # Load necessary libraries # 56 | ################################################################################ 57 | 58 | import numpy as np 59 | from scipy import optimize 60 | import copy 61 | 62 | from parameters import * 63 | from setup_num_int import * 64 | from setup_asg import * 65 | import time_iteration as time_iter 66 | import postprocessing as post 67 | 68 | import Tasmanian 69 | 70 | import argparse 71 | 72 | # Parser settings for terminal calls 73 | parser = argparse.ArgumentParser(description="Run the IRBC model.") 74 | parser.add_argument( 75 | "--final_grid", dest="load_flag", action="store_true", help="Postprocessing only" 76 | ) 77 | 78 | args = parser.parse_args() 79 | load_flag = args.load_flag 80 | 81 | 82 | ################################################################################ 83 | # Main Loop # 84 | ################################################################################ 85 | 86 | if args.load_flag: 87 | 88 | print("Postprocessing only.") 89 | 90 | # Construct the grid structure 91 | gridFinal = Tasmanian.TasmanianSparseGrid() 92 | # Read the properties from grid_final.txt 93 | gridFinal.read(data_location + "grid_final.txt") 94 | # Set as interpolation grid 95 | grid1 = Tasmanian.copyGrid(gridFinal) 96 | 97 | else: 98 | 99 | print("Start time iteration from iter = ", numstart) 100 | 101 | # If numstart==0 => start from scratch; numstart>0 => Restart from given iteration 102 | 103 | if numstart > 0: 104 | 105 | # Construct a new grid structure 106 | gridRestart = Tasmanian.TasmanianSparseGrid() 107 | # Read properties from file for restart 108 | gridRestart.read(data_location + "grid_iter_" + str(numstart) + ".txt") 109 | # Set as interpolation grid 110 | grid0 = Tasmanian.copyGrid(gridRestart) 111 | 112 | for iter0 in range(numstart, maxiter + 1): 113 | 114 | grid1 = time_iter.fresh_grid() 115 | 116 | polGuess1 = copy.copy(polGuess[:grid1.getNumNeeded(),:]) 117 | 118 | # Index of current grid level to control the number of refinements 119 | ilev = gridDepth 120 | 121 | while (grid1.getNumNeeded() > 0) and (ilev <= maxRefLevel): 122 | grid1 = time_iter.ti_step(grid1, polGuess1, grid0) 123 | 124 | # We start the refinement process after a given number of iterations 125 | if iter0 > iterRefStart: 126 | grid1, polGuess1 = time_iter.refine(grid1) 127 | # grid1 = time_iter.refine(grid1) 128 | 129 | # Track the grid level 130 | ilev += 1 131 | 132 | ## Calculate (approximate) errors on tomorrow's policy grid 133 | metric, polGuess, grid0 = time_iter.policy_update(grid0, grid1) 134 | 135 | print( 136 | "Iteration: %2d, Grid pts: %2d, Level: %2d, Metric: %.4E" 137 | % (iter0, grid0.getNumPoints(), ilev, metric) 138 | ) 139 | 140 | if np.mod(iter0 + 1, savefreq) == 0: 141 | time_iter.save_grid(grid0, iter0) 142 | 143 | if metric < tol_ti: 144 | break 145 | 146 | grid1.write(data_location + "grid_final.txt") 147 | 148 | error_sim = post.errors_sim(grid1) 149 | errors_ss = post.errors_ss(grid1) 150 | 151 | 152 | post.plot_policies(1, grid1) 153 | -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/ARC_policy.txt: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 8.000000000000000444e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.603146234407170079e-01 2 | 1.000000000000000000e+00 8.081632653061224802e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.584965489990753928e-01 3 | 1.000000000000000000e+00 8.163265306122449161e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.566784745574338888e-01 4 | 1.000000000000000000e+00 8.244897959183673519e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.548604001157922738e-01 5 | 1.000000000000000000e+00 8.326530612244897878e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.530423256741506588e-01 6 | 1.000000000000000000e+00 8.408163265306123346e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.512242512325090438e-01 7 | 1.000000000000000000e+00 8.489795918367347705e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.494061767908675398e-01 8 | 1.000000000000000000e+00 8.571428571428572063e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.475881023492259247e-01 9 | 1.000000000000000000e+00 8.653061224489796421e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.457700279075843097e-01 10 | 1.000000000000000000e+00 8.734693877551020780e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.439519534659428057e-01 11 | 1.000000000000000000e+00 8.816326530612245138e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.421338790243010797e-01 12 | 1.000000000000000000e+00 8.897959183673469497e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.403158045826595757e-01 13 | 1.000000000000000000e+00 8.979591836734693855e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.384977301410179606e-01 14 | 1.000000000000000000e+00 9.061224489795918213e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.367775360036096455e-01 15 | 1.000000000000000000e+00 9.142857142857143682e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.350899686342792450e-01 16 | 1.000000000000000000e+00 9.224489795918368040e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.334024012649488444e-01 17 | 1.000000000000000000e+00 9.306122448979592399e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.317148338956183329e-01 18 | 1.000000000000000000e+00 9.387755102040816757e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.300272665262879324e-01 19 | 1.000000000000000000e+00 9.469387755102041115e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.283396991569575318e-01 20 | 1.000000000000000000e+00 9.551020408163265474e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.266521317876271313e-01 21 | 1.000000000000000000e+00 9.632653061224489832e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.249645644182966198e-01 22 | 1.000000000000000000e+00 9.714285714285714191e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.232769970489662192e-01 23 | 1.000000000000000000e+00 9.795918367346938549e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.215894296796358187e-01 24 | 1.000000000000000000e+00 9.877551020408164018e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.199018623103053072e-01 25 | 1.000000000000000000e+00 9.959183673469387266e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.182142949409749066e-01 26 | 1.000000000000000000e+00 1.004081632653061273e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.166241687039495378e-01 27 | 1.000000000000000000e+00 1.012244897959183598e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.151314835992293117e-01 28 | 1.000000000000000000e+00 1.020408163265306145e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.136387984945088636e-01 29 | 1.000000000000000000e+00 1.028571428571428470e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.121461133897886375e-01 30 | 1.000000000000000000e+00 1.036734693877551017e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.106534282850684114e-01 31 | 1.000000000000000000e+00 1.044897959183673564e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.091607431803480743e-01 32 | 1.000000000000000000e+00 1.053061224489795888e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.076680580756278482e-01 33 | 1.000000000000000000e+00 1.061224489795918435e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.061753729709074001e-01 34 | 1.000000000000000000e+00 1.069387755102040760e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.046826878661871740e-01 35 | 1.000000000000000000e+00 1.077551020408163307e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.031900027614668369e-01 36 | 1.000000000000000000e+00 1.085714285714285854e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.016973176567466108e-01 37 | 1.000000000000000000e+00 1.093877551020408179e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.002046325520263848e-01 38 | 1.000000000000000000e+00 1.102040816326530503e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.987370984463560308e-01 39 | 1.000000000000000000e+00 1.110204081632653050e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.973450173378357375e-01 40 | 1.000000000000000000e+00 1.118367346938775597e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.959529362293153332e-01 41 | 1.000000000000000000e+00 1.126530612244897922e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.945608551207950399e-01 42 | 1.000000000000000000e+00 1.134693877551020469e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.931687740122746355e-01 43 | 1.000000000000000000e+00 1.142857142857142794e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.917766929037544532e-01 44 | 1.000000000000000000e+00 1.151020408163265341e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.903846117952340489e-01 45 | 1.000000000000000000e+00 1.159183673469387887e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.889925306867137555e-01 46 | 1.000000000000000000e+00 1.167346938775510212e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.876004495781934622e-01 47 | 1.000000000000000000e+00 1.175510204081632537e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.862083684696730579e-01 48 | 1.000000000000000000e+00 1.183673469387755084e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.848162873611528756e-01 49 | 1.000000000000000000e+00 1.191836734693877631e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.834242062526324712e-01 50 | 1.000000000000000000e+00 1.199999999999999956e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.820321251441121779e-01 51 | -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/ARC_policy.txt: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 8.000000000000000444e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.623325852432495608e-01 2 | 1.000000000000000000e+00 8.081632653061224802e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.604507197121431972e-01 3 | 1.000000000000000000e+00 8.163265306122449161e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.585688541810367225e-01 4 | 1.000000000000000000e+00 8.244897959183673519e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.566869886499302478e-01 5 | 1.000000000000000000e+00 8.326530612244897878e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.548051231188237731e-01 6 | 1.000000000000000000e+00 8.408163265306123346e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.529232575877174094e-01 7 | 1.000000000000000000e+00 8.489795918367347705e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.510413920566110457e-01 8 | 1.000000000000000000e+00 8.571428571428572063e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.491595265255044600e-01 9 | 1.000000000000000000e+00 8.653061224489796421e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.472776609943980963e-01 10 | 1.000000000000000000e+00 8.734693877551020780e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.453957954632917327e-01 11 | 1.000000000000000000e+00 8.816326530612245138e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.435139299321852580e-01 12 | 1.000000000000000000e+00 8.897959183673469497e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.416320644010788943e-01 13 | 1.000000000000000000e+00 8.979591836734693855e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.397501988699723086e-01 14 | 1.000000000000000000e+00 9.061224489795918213e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.380259300267232536e-01 15 | 1.000000000000000000e+00 9.142857142857143682e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.363541934127597832e-01 16 | 1.000000000000000000e+00 9.224489795918368040e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.346824567987964238e-01 17 | 1.000000000000000000e+00 9.306122448979592399e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.330107201848331755e-01 18 | 1.000000000000000000e+00 9.387755102040816757e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.313389835708697051e-01 19 | 1.000000000000000000e+00 9.469387755102041115e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.296672469569063457e-01 20 | 1.000000000000000000e+00 9.551020408163265474e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.279955103429428753e-01 21 | 1.000000000000000000e+00 9.632653061224489832e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.263237737289795160e-01 22 | 1.000000000000000000e+00 9.714285714285714191e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.246520371150162676e-01 23 | 1.000000000000000000e+00 9.795918367346938549e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.229803005010527972e-01 24 | 1.000000000000000000e+00 9.877551020408164018e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.213085638870894378e-01 25 | 1.000000000000000000e+00 9.959183673469387266e-01 0.000000000000000000e+00 0.000000000000000000e+00 6.196368272731260785e-01 26 | 1.000000000000000000e+00 1.004081632653061273e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.180771557523273563e-01 27 | 1.000000000000000000e+00 1.012244897959183598e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.166295493246932713e-01 28 | 1.000000000000000000e+00 1.020408163265306145e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.151819428970592973e-01 29 | 1.000000000000000000e+00 1.028571428571428470e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.137343364694252124e-01 30 | 1.000000000000000000e+00 1.036734693877551017e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.122867300417911274e-01 31 | 1.000000000000000000e+00 1.044897959183673564e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.108391236141570424e-01 32 | 1.000000000000000000e+00 1.053061224489795888e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.093915171865230684e-01 33 | 1.000000000000000000e+00 1.061224489795918435e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.079439107588889835e-01 34 | 1.000000000000000000e+00 1.069387755102040760e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.064963043312548985e-01 35 | 1.000000000000000000e+00 1.077551020408163307e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.050486979036208135e-01 36 | 1.000000000000000000e+00 1.085714285714285854e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.036010914759867285e-01 37 | 1.000000000000000000e+00 1.093877551020408179e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.021534850483527546e-01 38 | 1.000000000000000000e+00 1.102040816326530503e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.007465358649705101e-01 39 | 1.000000000000000000e+00 1.110204081632653050e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.994615584143436759e-01 40 | 1.000000000000000000e+00 1.118367346938775597e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.981765809637167308e-01 41 | 1.000000000000000000e+00 1.126530612244897922e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.968916035130898967e-01 42 | 1.000000000000000000e+00 1.134693877551020469e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.956066260624629516e-01 43 | 1.000000000000000000e+00 1.142857142857142794e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.943216486118361175e-01 44 | 1.000000000000000000e+00 1.151020408163265341e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.930366711612092834e-01 45 | 1.000000000000000000e+00 1.159183673469387887e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.917516937105823382e-01 46 | 1.000000000000000000e+00 1.167346938775510212e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.904667162599555041e-01 47 | 1.000000000000000000e+00 1.175510204081632537e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.891817388093286700e-01 48 | 1.000000000000000000e+00 1.183673469387755084e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.878967613587018359e-01 49 | 1.000000000000000000e+00 1.191836734693877631e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.866117839080748908e-01 50 | 1.000000000000000000e+00 1.199999999999999956e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.853268064574480567e-01 51 | -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/Cap_policy_0.txt: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 8.000000000000000444e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.899999996179509321e-01 2 | 1.000000000000000000e+00 8.081632653061224802e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.904413756018054515e-01 3 | 1.000000000000000000e+00 8.163265306122449161e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.908827515856599710e-01 4 | 1.000000000000000000e+00 8.244897959183673519e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.913241275695144905e-01 5 | 1.000000000000000000e+00 8.326530612244897878e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.917655035533691210e-01 6 | 1.000000000000000000e+00 8.408163265306123346e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.922068795372236405e-01 7 | 1.000000000000000000e+00 8.489795918367347705e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.926482555210780490e-01 8 | 1.000000000000000000e+00 8.571428571428572063e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.930896315049326795e-01 9 | 1.000000000000000000e+00 8.653061224489796421e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.935310074887871989e-01 10 | 1.000000000000000000e+00 8.734693877551020780e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.939723834726417184e-01 11 | 1.000000000000000000e+00 8.816326530612245138e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.944137594564962379e-01 12 | 1.000000000000000000e+00 8.897959183673469497e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.948551354403507574e-01 13 | 1.000000000000000000e+00 8.979591836734693855e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.952965114242052769e-01 14 | 1.000000000000000000e+00 9.061224489795918213e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.957321262826503983e-01 15 | 1.000000000000000000e+00 9.142857142857143682e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.961658207659589426e-01 16 | 1.000000000000000000e+00 9.224489795918368040e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.965995152492674869e-01 17 | 1.000000000000000000e+00 9.306122448979592399e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.970332097325760312e-01 18 | 1.000000000000000000e+00 9.387755102040816757e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.974669042158846866e-01 19 | 1.000000000000000000e+00 9.469387755102041115e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.979005986991932309e-01 20 | 1.000000000000000000e+00 9.551020408163265474e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.983342931825017752e-01 21 | 1.000000000000000000e+00 9.632653061224489832e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.987679876658104305e-01 22 | 1.000000000000000000e+00 9.714285714285714191e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.992016821491189749e-01 23 | 1.000000000000000000e+00 9.795918367346938549e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.996353766324275192e-01 24 | 1.000000000000000000e+00 9.877551020408164018e-01 0.000000000000000000e+00 0.000000000000000000e+00 1.000069071115736064e+00 25 | 1.000000000000000000e+00 9.959183673469387266e-01 0.000000000000000000e+00 0.000000000000000000e+00 1.000502765599044608e+00 26 | 1.000000000000000000e+00 1.004081632653061273e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000932816636907807e+00 27 | 1.000000000000000000e+00 1.012244897959183598e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.001359224229325440e+00 28 | 1.000000000000000000e+00 1.020408163265306145e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.001785631821743072e+00 29 | 1.000000000000000000e+00 1.028571428571428470e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.002212039414160927e+00 30 | 1.000000000000000000e+00 1.036734693877551017e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.002638447006578337e+00 31 | 1.000000000000000000e+00 1.044897959183673564e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.003064854598996192e+00 32 | 1.000000000000000000e+00 1.053061224489795888e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.003491262191413602e+00 33 | 1.000000000000000000e+00 1.061224489795918435e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.003917669783831457e+00 34 | 1.000000000000000000e+00 1.069387755102040760e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.004344077376249089e+00 35 | 1.000000000000000000e+00 1.077551020408163307e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.004770484968666722e+00 36 | 1.000000000000000000e+00 1.085714285714285854e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.005196892561084354e+00 37 | 1.000000000000000000e+00 1.093877551020408179e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.005623300153501987e+00 38 | 1.000000000000000000e+00 1.102040816326530503e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.006026142725569450e+00 39 | 1.000000000000000000e+00 1.110204081632653050e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.006358290236585962e+00 40 | 1.000000000000000000e+00 1.118367346938775597e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.006690437747602918e+00 41 | 1.000000000000000000e+00 1.126530612244897922e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.007022585258619651e+00 42 | 1.000000000000000000e+00 1.134693877551020469e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.007354732769636385e+00 43 | 1.000000000000000000e+00 1.142857142857142794e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.007686880280653119e+00 44 | 1.000000000000000000e+00 1.151020408163265341e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.008019027791669853e+00 45 | 1.000000000000000000e+00 1.159183673469387887e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.008351175302686586e+00 46 | 1.000000000000000000e+00 1.167346938775510212e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.008683322813703542e+00 47 | 1.000000000000000000e+00 1.175510204081632537e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.009015470324720054e+00 48 | 1.000000000000000000e+00 1.183673469387755084e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.009347617835737010e+00 49 | 1.000000000000000000e+00 1.191836734693877631e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.009679765346753522e+00 50 | 1.000000000000000000e+00 1.199999999999999956e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.010011912857770477e+00 51 | -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/Cap_policy_1.txt: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 8.000000000000000444e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.149650460999116053e-01 2 | 1.000000000000000000e+00 8.081632653061224802e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.225452623531771534e-01 3 | 1.000000000000000000e+00 8.163265306122449161e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.301254786064427016e-01 4 | 1.000000000000000000e+00 8.244897959183673519e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.377056948597082497e-01 5 | 1.000000000000000000e+00 8.326530612244897878e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.452859111129739089e-01 6 | 1.000000000000000000e+00 8.408163265306123346e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.528661273662394571e-01 7 | 1.000000000000000000e+00 8.489795918367347705e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.604463436195050052e-01 8 | 1.000000000000000000e+00 8.571428571428572063e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.680265598727705534e-01 9 | 1.000000000000000000e+00 8.653061224489796421e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.756067761260361015e-01 10 | 1.000000000000000000e+00 8.734693877551020780e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.831869923793016497e-01 11 | 1.000000000000000000e+00 8.816326530612245138e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.907672086325673089e-01 12 | 1.000000000000000000e+00 8.897959183673469497e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.983474248858327460e-01 13 | 1.000000000000000000e+00 8.979591836734693855e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.059276411390981831e-01 14 | 1.000000000000000000e+00 9.061224489795918213e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.135102616007655385e-01 15 | 1.000000000000000000e+00 9.142857142857143682e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.210936834652332372e-01 16 | 1.000000000000000000e+00 9.224489795918368040e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.286771053297007139e-01 17 | 1.000000000000000000e+00 9.306122448979592399e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.362605271941684126e-01 18 | 1.000000000000000000e+00 9.387755102040816757e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.438439490586362224e-01 19 | 1.000000000000000000e+00 9.469387755102041115e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.514273709231036991e-01 20 | 1.000000000000000000e+00 9.551020408163265474e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.590107927875715088e-01 21 | 1.000000000000000000e+00 9.632653061224489832e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.665942146520390965e-01 22 | 1.000000000000000000e+00 9.714285714285714191e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.741776365165066842e-01 23 | 1.000000000000000000e+00 9.795918367346938549e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.817610583809744940e-01 24 | 1.000000000000000000e+00 9.877551020408164018e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.893444802454421927e-01 25 | 1.000000000000000000e+00 9.959183673469387266e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.969279021099096694e-01 26 | 1.000000000000000000e+00 1.004081632653061273e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.004517411435723817e+00 27 | 1.000000000000000000e+00 1.012244897959183598e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.012113008222883748e+00 28 | 1.000000000000000000e+00 1.020408163265306145e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.019708605010043900e+00 29 | 1.000000000000000000e+00 1.028571428571428470e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.027304201797204053e+00 30 | 1.000000000000000000e+00 1.036734693877551017e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.034899798584364206e+00 31 | 1.000000000000000000e+00 1.044897959183673564e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.042495395371524358e+00 32 | 1.000000000000000000e+00 1.053061224489795888e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.050090992158684511e+00 33 | 1.000000000000000000e+00 1.061224489795918435e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.057686588945844663e+00 34 | 1.000000000000000000e+00 1.069387755102040760e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.065282185733004594e+00 35 | 1.000000000000000000e+00 1.077551020408163307e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.072877782520164969e+00 36 | 1.000000000000000000e+00 1.085714285714285854e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.080473379307325121e+00 37 | 1.000000000000000000e+00 1.093877551020408179e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.088068976094485052e+00 38 | 1.000000000000000000e+00 1.102040816326530503e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.095688823201490525e+00 39 | 1.000000000000000000e+00 1.110204081632653050e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.103381421268033069e+00 40 | 1.000000000000000000e+00 1.118367346938775597e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.111074019334575835e+00 41 | 1.000000000000000000e+00 1.126530612244897922e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.118766617401117935e+00 42 | 1.000000000000000000e+00 1.134693877551020469e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.126459215467660480e+00 43 | 1.000000000000000000e+00 1.142857142857142794e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.134151813534203024e+00 44 | 1.000000000000000000e+00 1.151020408163265341e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.141844411600745346e+00 45 | 1.000000000000000000e+00 1.159183673469387887e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.149537009667287890e+00 46 | 1.000000000000000000e+00 1.167346938775510212e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.157229607733830212e+00 47 | 1.000000000000000000e+00 1.175510204081632537e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.164922205800372534e+00 48 | 1.000000000000000000e+00 1.183673469387755084e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.172614803866914857e+00 49 | 1.000000000000000000e+00 1.191836734693877631e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.180307401933457623e+00 50 | 1.000000000000000000e+00 1.199999999999999956e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.187999999999999945e+00 51 | -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/Cap_policy_0.txt: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 8.000000000000000444e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.878481752635205337e-01 2 | 1.000000000000000000e+00 8.081632653061224802e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.883756355124002635e-01 3 | 1.000000000000000000e+00 8.163265306122449161e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.889030957612799932e-01 4 | 1.000000000000000000e+00 8.244897959183673519e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.894305560101598340e-01 5 | 1.000000000000000000e+00 8.326530612244897878e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.899580162590394528e-01 6 | 1.000000000000000000e+00 8.408163265306123346e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.904854765079192935e-01 7 | 1.000000000000000000e+00 8.489795918367347705e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.910129367567990233e-01 8 | 1.000000000000000000e+00 8.571428571428572063e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.915403970056787530e-01 9 | 1.000000000000000000e+00 8.653061224489796421e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.920678572545584828e-01 10 | 1.000000000000000000e+00 8.734693877551020780e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.925953175034383236e-01 11 | 1.000000000000000000e+00 8.816326530612245138e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.931227777523179423e-01 12 | 1.000000000000000000e+00 8.897959183673469497e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.936502380011977831e-01 13 | 1.000000000000000000e+00 8.979591836734693855e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.941776982500774018e-01 14 | 1.000000000000000000e+00 9.061224489795918213e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.946956173832046666e-01 15 | 1.000000000000000000e+00 9.142857142857143682e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.952103561444142210e-01 16 | 1.000000000000000000e+00 9.224489795918368040e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.957250949056239975e-01 17 | 1.000000000000000000e+00 9.306122448979592399e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.962398336668335519e-01 18 | 1.000000000000000000e+00 9.387755102040816757e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.967545724280433284e-01 19 | 1.000000000000000000e+00 9.469387755102041115e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.972693111892529938e-01 20 | 1.000000000000000000e+00 9.551020408163265474e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.977840499504625482e-01 21 | 1.000000000000000000e+00 9.632653061224489832e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.982987887116723247e-01 22 | 1.000000000000000000e+00 9.714285714285714191e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.988135274728818791e-01 23 | 1.000000000000000000e+00 9.795918367346938549e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.993282662340916556e-01 24 | 1.000000000000000000e+00 9.877551020408164018e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.998430049953012100e-01 25 | 1.000000000000000000e+00 9.959183673469387266e-01 0.000000000000000000e+00 0.000000000000000000e+00 1.000357743756510986e+00 26 | 1.000000000000000000e+00 1.004081632653061273e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000865668352878046e+00 27 | 1.000000000000000000e+00 1.012244897959183598e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.001366778784402278e+00 28 | 1.000000000000000000e+00 1.020408163265306145e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.001867889215926954e+00 29 | 1.000000000000000000e+00 1.028571428571428470e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.002368999647451409e+00 30 | 1.000000000000000000e+00 1.036734693877551017e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.002870110078975863e+00 31 | 1.000000000000000000e+00 1.044897959183673564e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.003371220510500317e+00 32 | 1.000000000000000000e+00 1.053061224489795888e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.003872330942024993e+00 33 | 1.000000000000000000e+00 1.061224489795918435e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.004373441373549225e+00 34 | 1.000000000000000000e+00 1.069387755102040760e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.004874551805073901e+00 35 | 1.000000000000000000e+00 1.077551020408163307e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.005375662236598355e+00 36 | 1.000000000000000000e+00 1.085714285714285854e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.005876772668122809e+00 37 | 1.000000000000000000e+00 1.093877551020408179e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.006377883099647264e+00 38 | 1.000000000000000000e+00 1.102040816326530503e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.006875475920381957e+00 39 | 1.000000000000000000e+00 1.110204081632653050e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.007362515908747813e+00 40 | 1.000000000000000000e+00 1.118367346938775597e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.007849555897113447e+00 41 | 1.000000000000000000e+00 1.126530612244897922e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.008336595885479081e+00 42 | 1.000000000000000000e+00 1.134693877551020469e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.008823635873844715e+00 43 | 1.000000000000000000e+00 1.142857142857142794e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.009310675862210571e+00 44 | 1.000000000000000000e+00 1.151020408163265341e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.009797715850575983e+00 45 | 1.000000000000000000e+00 1.159183673469387887e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.010284755838941839e+00 46 | 1.000000000000000000e+00 1.167346938775510212e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.010771795827307251e+00 47 | 1.000000000000000000e+00 1.175510204081632537e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.011258835815673107e+00 48 | 1.000000000000000000e+00 1.183673469387755084e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.011745875804038741e+00 49 | 1.000000000000000000e+00 1.191836734693877631e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.012232915792404375e+00 50 | 1.000000000000000000e+00 1.199999999999999956e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.012719955780770009e+00 51 | -------------------------------------------------------------------------------- /IRBC_model/data/data_smooth/Cap_policy_1.txt: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 8.000000000000000444e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.168288033561916794e-01 2 | 1.000000000000000000e+00 8.081632653061224802e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.243320569472988302e-01 3 | 1.000000000000000000e+00 8.163265306122449161e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.318353105384059809e-01 4 | 1.000000000000000000e+00 8.244897959183673519e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.393385641295131316e-01 5 | 1.000000000000000000e+00 8.326530612244897878e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.468418177206202824e-01 6 | 1.000000000000000000e+00 8.408163265306123346e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.543450713117276552e-01 7 | 1.000000000000000000e+00 8.489795918367347705e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.618483249028346949e-01 8 | 1.000000000000000000e+00 8.571428571428572063e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.693515784939418456e-01 9 | 1.000000000000000000e+00 8.653061224489796421e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.768548320850489963e-01 10 | 1.000000000000000000e+00 8.734693877551020780e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.843580856761561471e-01 11 | 1.000000000000000000e+00 8.816326530612245138e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.918613392672632978e-01 12 | 1.000000000000000000e+00 8.897959183673469497e-01 0.000000000000000000e+00 0.000000000000000000e+00 8.993645928583704485e-01 13 | 1.000000000000000000e+00 8.979591836734693855e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.068678464494774882e-01 14 | 1.000000000000000000e+00 9.061224489795918213e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.143684426975071666e-01 15 | 1.000000000000000000e+00 9.142857142857143682e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.218681531645112059e-01 16 | 1.000000000000000000e+00 9.224489795918368040e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.293678636315149122e-01 17 | 1.000000000000000000e+00 9.306122448979592399e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.368675740985186184e-01 18 | 1.000000000000000000e+00 9.387755102040816757e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.443672845655225467e-01 19 | 1.000000000000000000e+00 9.469387755102041115e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.518669950325263640e-01 20 | 1.000000000000000000e+00 9.551020408163265474e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.593667054995301813e-01 21 | 1.000000000000000000e+00 9.632653061224489832e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.668664159665339985e-01 22 | 1.000000000000000000e+00 9.714285714285714191e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.743661264335377048e-01 23 | 1.000000000000000000e+00 9.795918367346938549e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.818658369005416331e-01 24 | 1.000000000000000000e+00 9.877551020408164018e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.893655473675455614e-01 25 | 1.000000000000000000e+00 9.959183673469387266e-01 0.000000000000000000e+00 0.000000000000000000e+00 9.968652578345491566e-01 26 | 1.000000000000000000e+00 1.004081632653061273e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.004371295551290899e+00 27 | 1.000000000000000000e+00 1.012244897959183598e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.011883660517769901e+00 28 | 1.000000000000000000e+00 1.020408163265306145e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.019396025484249124e+00 29 | 1.000000000000000000e+00 1.028571428571428470e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.026908390450728348e+00 30 | 1.000000000000000000e+00 1.036734693877551017e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.034420755417207793e+00 31 | 1.000000000000000000e+00 1.044897959183673564e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.041933120383686795e+00 32 | 1.000000000000000000e+00 1.053061224489795888e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.049445485350166019e+00 33 | 1.000000000000000000e+00 1.061224489795918435e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.056957850316645464e+00 34 | 1.000000000000000000e+00 1.069387755102040760e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.064470215283124688e+00 35 | 1.000000000000000000e+00 1.077551020408163307e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.071982580249604133e+00 36 | 1.000000000000000000e+00 1.085714285714285854e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.079494945216083357e+00 37 | 1.000000000000000000e+00 1.093877551020408179e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.087007310182562136e+00 38 | 1.000000000000000000e+00 1.102040816326530503e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.094520692922969607e+00 39 | 1.000000000000000000e+00 1.110204081632653050e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.102037128985161596e+00 40 | 1.000000000000000000e+00 1.118367346938775597e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.109553565047353363e+00 41 | 1.000000000000000000e+00 1.126530612244897922e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.117070001109545130e+00 42 | 1.000000000000000000e+00 1.134693877551020469e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.124586437171737341e+00 43 | 1.000000000000000000e+00 1.142857142857142794e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.132102873233929108e+00 44 | 1.000000000000000000e+00 1.151020408163265341e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.139619309296120875e+00 45 | 1.000000000000000000e+00 1.159183673469387887e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.147135745358312864e+00 46 | 1.000000000000000000e+00 1.167346938775510212e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.154652181420504409e+00 47 | 1.000000000000000000e+00 1.175510204081632537e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.162168617482696176e+00 48 | 1.000000000000000000e+00 1.183673469387755084e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.169685053544888387e+00 49 | 1.000000000000000000e+00 1.191836734693877631e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.177201489607080154e+00 50 | 1.000000000000000000e+00 1.199999999999999956e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.184717925669271921e+00 51 | -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/IC_policy_0.txt: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 8.000000000000000444e-01 0.000000000000000000e+00 0.000000000000000000e+00 2.252654139625418633e-04 2 | 1.000000000000000000e+00 8.081632653061224802e-01 0.000000000000000000e+00 0.000000000000000000e+00 -2.344995650278848239e-04 3 | 1.000000000000000000e+00 8.163265306122449161e-01 0.000000000000000000e+00 0.000000000000000000e+00 -6.942645440183222447e-04 4 | 1.000000000000000000e+00 8.244897959183673519e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.154029523008748932e-03 5 | 1.000000000000000000e+00 8.326530612244897878e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.613794501999186353e-03 6 | 1.000000000000000000e+00 8.408163265306123346e-01 0.000000000000000000e+00 0.000000000000000000e+00 -2.073559480989623557e-03 7 | 1.000000000000000000e+00 8.489795918367347705e-01 0.000000000000000000e+00 0.000000000000000000e+00 -2.533324459980050569e-03 8 | 1.000000000000000000e+00 8.571428571428572063e-01 0.000000000000000000e+00 0.000000000000000000e+00 -2.993089438970478883e-03 9 | 1.000000000000000000e+00 8.653061224489796421e-01 0.000000000000000000e+00 0.000000000000000000e+00 -3.452854417960915436e-03 10 | 1.000000000000000000e+00 8.734693877551020780e-01 0.000000000000000000e+00 0.000000000000000000e+00 -3.912619396951343316e-03 11 | 1.000000000000000000e+00 8.816326530612245138e-01 0.000000000000000000e+00 0.000000000000000000e+00 -4.372384375941779436e-03 12 | 1.000000000000000000e+00 8.897959183673469497e-01 0.000000000000000000e+00 0.000000000000000000e+00 -4.832149354932206882e-03 13 | 1.000000000000000000e+00 8.979591836734693855e-01 0.000000000000000000e+00 0.000000000000000000e+00 -5.291914333922633461e-03 14 | 1.000000000000000000e+00 9.061224489795918213e-01 0.000000000000000000e+00 0.000000000000000000e+00 -5.732126431447518919e-03 15 | 1.000000000000000000e+00 9.142857142857143682e-01 0.000000000000000000e+00 0.000000000000000000e+00 -6.165820901817220534e-03 16 | 1.000000000000000000e+00 9.224489795918368040e-01 0.000000000000000000e+00 0.000000000000000000e+00 -6.599515372186911741e-03 17 | 1.000000000000000000e+00 9.306122448979592399e-01 0.000000000000000000e+00 0.000000000000000000e+00 -7.033209842556602948e-03 18 | 1.000000000000000000e+00 9.387755102040816757e-01 0.000000000000000000e+00 0.000000000000000000e+00 -7.466904312926303695e-03 19 | 1.000000000000000000e+00 9.469387755102041115e-01 0.000000000000000000e+00 0.000000000000000000e+00 -7.900598783295994035e-03 20 | 1.000000000000000000e+00 9.551020408163265474e-01 0.000000000000000000e+00 0.000000000000000000e+00 -8.334293253665695650e-03 21 | 1.000000000000000000e+00 9.632653061224489832e-01 0.000000000000000000e+00 0.000000000000000000e+00 -8.767987724035386857e-03 22 | 1.000000000000000000e+00 9.714285714285714191e-01 0.000000000000000000e+00 0.000000000000000000e+00 -9.201682194405079798e-03 23 | 1.000000000000000000e+00 9.795918367346938549e-01 0.000000000000000000e+00 0.000000000000000000e+00 -9.635376664774781413e-03 24 | 1.000000000000000000e+00 9.877551020408164018e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.006907113514448303e-02 25 | 1.000000000000000000e+00 9.959183673469387266e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.050276560551416383e-02 26 | 1.000000000000000000e+00 1.004081632653061273e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.093281663724422585e-02 27 | 1.000000000000000000e+00 1.012244897959183598e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.135922423033461359e-02 28 | 1.000000000000000000e+00 1.020408163265306145e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.178563182342502041e-02 29 | 1.000000000000000000e+00 1.028571428571428470e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.221203941651541683e-02 30 | 1.000000000000000000e+00 1.036734693877551017e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.263844700960582365e-02 31 | 1.000000000000000000e+00 1.044897959183673564e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.306485460269622874e-02 32 | 1.000000000000000000e+00 1.053061224489795888e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.349126219578662515e-02 33 | 1.000000000000000000e+00 1.061224489795918435e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.391766978887703197e-02 34 | 1.000000000000000000e+00 1.069387755102040760e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.434407738196742665e-02 35 | 1.000000000000000000e+00 1.077551020408163307e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.477048497505783348e-02 36 | 1.000000000000000000e+00 1.085714285714285854e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.519689256814824030e-02 37 | 1.000000000000000000e+00 1.093877551020408179e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.562330016123862630e-02 38 | 1.000000000000000000e+00 1.102040816326530503e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.602614273364242822e-02 39 | 1.000000000000000000e+00 1.110204081632653050e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.635829024398643972e-02 40 | 1.000000000000000000e+00 1.118367346938775597e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.669043775433045468e-02 41 | 1.000000000000000000e+00 1.126530612244897922e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.702258526467446270e-02 42 | 1.000000000000000000e+00 1.134693877551020469e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.735473277501847766e-02 43 | 1.000000000000000000e+00 1.142857142857142794e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.768688028536248569e-02 44 | 1.000000000000000000e+00 1.151020408163265341e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.801902779570650065e-02 45 | 1.000000000000000000e+00 1.159183673469387887e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.835117530605051561e-02 46 | 1.000000000000000000e+00 1.167346938775510212e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.868332281639451323e-02 47 | 1.000000000000000000e+00 1.175510204081632537e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.901547032673852125e-02 48 | 1.000000000000000000e+00 1.183673469387755084e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.934761783708253968e-02 49 | 1.000000000000000000e+00 1.191836734693877631e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.967976534742655464e-02 50 | 1.000000000000000000e+00 1.199999999999999956e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.001191285777055920e-02 51 | -------------------------------------------------------------------------------- /IRBC_model/data/data_nonsmooth/IC_policy_1.txt: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 8.000000000000000444e-01 0.000000000000000000e+00 0.000000000000000000e+00 -2.296504612742085449e-02 2 | 1.000000000000000000e+00 8.081632653061224802e-01 0.000000000000000000e+00 0.000000000000000000e+00 -2.246362972537953306e-02 3 | 1.000000000000000000e+00 8.163265306122449161e-01 0.000000000000000000e+00 0.000000000000000000e+00 -2.196221332333820470e-02 4 | 1.000000000000000000e+00 8.244897959183673519e-01 0.000000000000000000e+00 0.000000000000000000e+00 -2.146079692129688327e-02 5 | 1.000000000000000000e+00 8.326530612244897878e-01 0.000000000000000000e+00 0.000000000000000000e+00 -2.095938051925555143e-02 6 | 1.000000000000000000e+00 8.408163265306123346e-01 0.000000000000000000e+00 0.000000000000000000e+00 -2.045796411721421959e-02 7 | 1.000000000000000000e+00 8.489795918367347705e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.995654771517289816e-02 8 | 1.000000000000000000e+00 8.571428571428572063e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.945513131313158020e-02 9 | 1.000000000000000000e+00 8.653061224489796421e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.895371491109024836e-02 10 | 1.000000000000000000e+00 8.734693877551020780e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.845229850904892693e-02 11 | 1.000000000000000000e+00 8.816326530612245138e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.795088210700759856e-02 12 | 1.000000000000000000e+00 8.897959183673469497e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.744946570496627714e-02 13 | 1.000000000000000000e+00 8.979591836734693855e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.694804930292495571e-02 14 | 1.000000000000000000e+00 9.061224489795918213e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.644903711096945553e-02 15 | 1.000000000000000000e+00 9.142857142857143682e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.595082632237589115e-02 16 | 1.000000000000000000e+00 9.224489795918368040e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.545261553378234239e-02 17 | 1.000000000000000000e+00 9.306122448979592399e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.495440474518879188e-02 18 | 1.000000000000000000e+00 9.387755102040816757e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.445619395659523271e-02 19 | 1.000000000000000000e+00 9.469387755102041115e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.395798316800168394e-02 20 | 1.000000000000000000e+00 9.551020408163265474e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.345977237940812477e-02 21 | 1.000000000000000000e+00 9.632653061224489832e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.296156159081457426e-02 22 | 1.000000000000000000e+00 9.714285714285714191e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.246335080222102550e-02 23 | 1.000000000000000000e+00 9.795918367346938549e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.196514001362746632e-02 24 | 1.000000000000000000e+00 9.877551020408164018e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.146692922503390541e-02 25 | 1.000000000000000000e+00 9.959183673469387266e-01 0.000000000000000000e+00 0.000000000000000000e+00 -1.096871843644036705e-02 26 | 1.000000000000000000e+00 1.004081632653061273e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.047659510925257748e-02 27 | 1.000000000000000000e+00 1.012244897959183598e+00 0.000000000000000000e+00 0.000000000000000000e+00 -9.990559243470602604e-03 28 | 1.000000000000000000e+00 1.020408163265306145e+00 0.000000000000000000e+00 0.000000000000000000e+00 -9.504523377688605182e-03 29 | 1.000000000000000000e+00 1.028571428571428470e+00 0.000000000000000000e+00 0.000000000000000000e+00 -9.018487511906618168e-03 30 | 1.000000000000000000e+00 1.036734693877551017e+00 0.000000000000000000e+00 0.000000000000000000e+00 -8.532451646124622480e-03 31 | 1.000000000000000000e+00 1.044897959183673564e+00 0.000000000000000000e+00 0.000000000000000000e+00 -8.046415780342625057e-03 32 | 1.000000000000000000e+00 1.053061224489795888e+00 0.000000000000000000e+00 0.000000000000000000e+00 -7.560379914560638910e-03 33 | 1.000000000000000000e+00 1.061224489795918435e+00 0.000000000000000000e+00 0.000000000000000000e+00 -7.074344048778642355e-03 34 | 1.000000000000000000e+00 1.069387755102040760e+00 0.000000000000000000e+00 0.000000000000000000e+00 -6.588308182996657075e-03 35 | 1.000000000000000000e+00 1.077551020408163307e+00 0.000000000000000000e+00 0.000000000000000000e+00 -6.102272317214658785e-03 36 | 1.000000000000000000e+00 1.085714285714285854e+00 0.000000000000000000e+00 0.000000000000000000e+00 -5.616236451432662230e-03 37 | 1.000000000000000000e+00 1.093877551020408179e+00 0.000000000000000000e+00 0.000000000000000000e+00 -5.130200585650686491e-03 38 | 1.000000000000000000e+00 1.102040816326530503e+00 0.000000000000000000e+00 0.000000000000000000e+00 -4.660904819574284742e-03 39 | 1.000000000000000000e+00 1.110204081632653050e+00 0.000000000000000000e+00 0.000000000000000000e+00 -4.241829352614627513e-03 40 | 1.000000000000000000e+00 1.118367346938775597e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.822753885654971151e-03 41 | 1.000000000000000000e+00 1.126530612244897922e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.403678418695323029e-03 42 | 1.000000000000000000e+00 1.134693877551020469e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.984602951735665800e-03 43 | 1.000000000000000000e+00 1.142857142857142794e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.565527484776017678e-03 44 | 1.000000000000000000e+00 1.151020408163265341e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.146452017816360882e-03 45 | 1.000000000000000000e+00 1.159183673469387887e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.727376550856703869e-03 46 | 1.000000000000000000e+00 1.167346938775510212e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.308301083897066373e-03 47 | 1.000000000000000000e+00 1.175510204081632537e+00 0.000000000000000000e+00 0.000000000000000000e+00 -8.892256169374172748e-04 48 | 1.000000000000000000e+00 1.183673469387755084e+00 0.000000000000000000e+00 0.000000000000000000e+00 -4.701501499777603166e-04 49 | 1.000000000000000000e+00 1.191836734693877631e+00 0.000000000000000000e+00 0.000000000000000000e+00 -5.107468301810337861e-05 50 | 1.000000000000000000e+00 1.199999999999999956e+00 0.000000000000000000e+00 0.000000000000000000e+00 3.680007839415438964e-04 51 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Sparse Grids for Dynamic Economic Models 2 | 3 |

4 | 5 |

6 | 7 | Sparse grid methods are a versatile tool to compute recursive equilibria in dynamic stochastic economic models. This code repository contains materials 8 | accompanying the review article entitled ["Sparse grids for dynamic economic models"](https://oxfordre.com/economics/view/10.1093/acrefore/9780190625979.001.0001/acrefore-9780190625979-e-820). 9 | 10 | The goal of this repository is to make sparse grid methods easily accessible to the computational economics and finance community. 11 | Thus, all illustrative code examples are using [Tasmanian](https://tasmanian.ornl.gov), a high-quality open source sparse grid library. 12 | 13 | ### Authors 14 | * [Johannes Brumm](https://johannesbrumm.com/) (Chair of Macroeconomics, Karlsruhe Institute of Technology) 15 | * [Christopher Krause](https://macro.econ.kit.edu/103_170.php) (Chair of Macroeconomics, Karlsruhe Institute of Technology) 16 | * [Andreas Schaab](https://andreasschaab.com/) (Economics division, Columbia Business School) 17 | * [Simon Scheidegger](https://sites.google.com/site/simonscheidegger/) (Department of Economics, University of Lausanne) 18 | 19 | ### The full review article can be found here 20 | * [Link to the review](https://oxfordre.com/economics/view/10.1093/acrefore/9780190625979.001.0001/acrefore-9780190625979-e-820) 21 | 22 | ### Illustrative example 23 | 24 | **Analytical Example:** To foster the basic intuition on how to use sparse grids as approximation method, we demonstrate their ability to efficiently interpolate the following n-dimensional (non-smooth) function 25 | 26 | ![\begin{align*} 27 | f_d(\vec{x}) = \max(0,1-e^{\frac{1}{2}-(\prod_{i=1}^d(x_i+\frac{1}{5}))^{\frac{1}{d}}}),\;\,\text{with}\,\vec{x}=\{x_1,\dots,x_d\}\in[0,1]^d 28 | e\nd{align*} 29 | ](https://render.githubusercontent.com/render/math?math=%5CLarge+%5Cdisplaystyle+%5Cbegin%7Balign%2A%7D%0Af_d%28%5Cvec%7Bx%7D%29+%3D+%5Cmax%280%2C1-e%5E%7B%5Cfrac%7B1%7D%7B2%7D-%28%5Cprod_%7Bi%3D1%7D%5Ed%28x_i%2B%5Cfrac%7B1%7D%7B5%7D%29%29%5E%7B%5Cfrac%7B1%7D%7Bd%7D%7D%7D%29%2C%5C%3B%5C%2C%5Ctext%7Bwith%7D%5C%2C%5Cvec%7Bx%7D%3D%5C%7Bx_1%2C%5Cdots%2Cx_d%5C%7D%5Cin%5B0%2C1%5D%5Ed%0A%5Cend%7Balign%2A%7D%0A) 30 | 31 | We generate sparse grid as well as adaptive sparse grid approximations to the function and measure their accuracy as follows: We randomly generate 10,000 uniformly distributed test points, and compute the maximum error and the L2-error. 32 | 33 | **Benchmark model in discrete time:** To illustrate how (adaptive) sparse grids can be applied to solve economic models in discrete time, we provide an (MPI-parallelized) example in python, which solves a multi-country real business cycle model with and without irreversible investment, where the former is presented in [Section 3 of the review article](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3979412) (for more details on this model, see also [Brumm & Scheidegger (2017)](https://onlinelibrary.wiley.com/doi/abs/10.3982/ECTA12216)). 34 | 35 | **Benchmark model in continuous time:** To illustrate how (adaptive) sparse grids can be applied to solve economic models in continuous time, we provide an example which solves an Aiyagari-type model with a jump in the capital tax rate, as presented in [Section 4 of the review article](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3979412) (for more details on this model, see also [Schaab (2020)](https://scholar.harvard.edu/andreasschaab/publications/micro-and-macro-uncertainty)) 36 | 37 | 38 | ### Usage 39 | 40 | We provide implementations which use python 3. 41 | 42 | First, we provide an implementation of an analytic function in two forms. A [jupyter-notebook](https://jupyter.org/) that is self-contained: 43 | 44 | [![Generic badge](https://img.shields.io/badge/jupyter%20nbviewer-ASG-green)](https://nbviewer.jupyter.org/github/SparseGridsForDynamicEcon/SparseGrids_in_econ_handbook/blob/master/Analytical_example/2D_example.ipynb) 45 | 46 | as well as a plain python script, which can be executed from the command line: 47 | 48 | [![Generic badge 2](https://img.shields.io/badge/analytic-ASG-green)](Analytical_example) 49 | 50 | 51 | The benchmark IRBC model code can be found here: 52 | 53 | [![Generic badge 3](https://img.shields.io/badge/benchmark-IRBC-green)](IRBC_model) 54 | 55 | The benchmark IRBC model code, parallelized with MPI, can be found here: 56 | 57 | [![Generic badge 4](https://img.shields.io/badge/benchmark-IRBC_mpi-green)](IRBC_model_mpi) 58 | 59 | 60 | The benchmark Aiyagari model code can be found here: 61 | 62 | [![Generic badge 4](https://img.shields.io/badge/benchmark-Aiyagari-green)](https://github.com/schaab-lab/sparseecon) 63 | 64 | 65 | ### Prerequisites / Installation 66 | 67 | To run the code with the analytical examples, follow the instructions below. For instructions on how to run the benchmark international real business cycle (IRBC) model, see the corresponding instructions here: [IRBC README](IRBC_model). 68 | 69 | ```shell 70 | $ python3 -m pip install scikit-build packaging numpy --user (required dependencies) 71 | $ python3 -m pip install Tasmanian --user (user installation) 72 | $ python3 -m pip install Tasmanian (virtual env installation) 73 | $ python3 -m pip install mpi4py (MPI, to run the IRBC model in parallel) 74 | ``` 75 | Further information on alternative installation procedures for **TASMANIAN** can be found here: https://tasmanian.ornl.gov/documentation/md_Doxygen_Installation.html 76 | 77 | ## Support 78 | This work is generously supported by grants from the [Swiss National Science Foundation](https://www.snf.ch) under project IDs “New methods for asset pricing with frictions”, "Can economic policy mitigate climate change", and the [Enterprise for Society (E4S)](https://e4s.center). 79 | 80 | ## Citation 81 | Please cite this handbook in your publications if it helps your research: 82 | 83 | Brumm, Johannes and Krause, Christopher and Schaab, Andreas and Scheidegger, Simon (2022); [Sparse grids for dynamic economic models](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3979412) 84 | 85 | 86 | ``` 87 | @article{SG_in_econ_handbook, 88 | author = {Brumm, Johannes and Krause, Christopher and Schaab, Andreas and Scheidegger, Simon}, 89 | title = {Sparse Grids for Dynamic Economic Models}, 90 | journal={Available at SSRN 3979412}, 91 | year = {2022} 92 | } 93 | ``` 94 | 95 | -------------------------------------------------------------------------------- /IRBC_model/mainASG.py: -------------------------------------------------------------------------------- 1 | """ 2 | 3 | This Python code accompanies the review article by Brumm, Krause, Schaab, & Scheidegger (2021) 4 | and corresponds to the International Real Business Cycle (IRBC) model with irreversible invest- 5 | ment, as presented in section 3.2. 6 | 7 | We demonstrate the capabilities of adaptive sparse grids as these occasionally binding constraints 8 | induce non-differentiabilities in policy functions, a challenge for approximation that adaptivity is 9 | able to address. 10 | 11 | Then, we generate a sparse grid as well as adaptive sparse grid approximations to the function 12 | and measure their accuracy as follows: We randomly generate 10,000 uniformly distributed test 13 | points, and compute the maximum error and the L1-error. 14 | 15 | To do so, we use TASMANIAN library to showcase the general workflow of setting up a sparse grid 16 | and approximate a multivariate function. 17 | 18 | -------------------------------------------------------------------------------------------------- 19 | 20 | The parameters that govern the adaptivity of grid points are located in setup_asg.py. In particular, 21 | the following parameters can be set: 22 | 23 | - surplThreshold is the threshold that determines whether new grid points are added. 24 | 25 | - maxRef is the number of maximum refinements of the sparse grid. A value of 0 corresponds to an 26 | ordinary grid without any refinement. 27 | 28 | - dimRef determines the model outputs that are considered in the refinement process. A value of -1 29 | implies that all outputs are used. 30 | 31 | - typeRefinement corresponds to the refinement strategy. The following options are available: 32 | 33 | ['classic', 'parents', 'direction', 'fds', 'stable'] (see TASMANIAN documentation for details) 34 | 35 | - scaleCorr is a scale correction applied before the grid refinement. This implies that model outputs 36 | can be weighted in their contribution to the grid refinement. Note that this has to be applied to 37 | all existing points in the grid such that scaleCorr has to be an array of the same size as the grid. 38 | A value of 0 then implies that a given model output is ignored in the refinement process. 39 | 40 | -------------------------------------------------------------------------------------------------- 41 | 42 | The code is organized as follows: 43 | 44 | 1) Solution of the IRBC model with irreversible investment, using either an ordinary or an 45 | adaptive sparse grid (given the parametrization in setup_asg). 46 | 47 | 2) Computation of max- and L1-errors along the simulation path. 48 | 49 | 3) Computation of max- and L1-errors for 10,000 points in the state space. 50 | 51 | 52 | """ 53 | 54 | ################################################################################ 55 | # Load necessary libraries # 56 | ################################################################################ 57 | 58 | import numpy as np 59 | from scipy import optimize 60 | import matplotlib.pyplot as plt 61 | import copy 62 | 63 | from parameters import * 64 | from setup_num_int import * 65 | from setup_asg import * 66 | import time_iteration as time_iter 67 | import postprocessing as post 68 | 69 | import Tasmanian 70 | 71 | import argparse 72 | 73 | # TeX Support for plots 74 | plt.rc('text', usetex=True) 75 | plt.rc('font', family='serif') 76 | 77 | # Parser settings for terminal calls 78 | parser = argparse.ArgumentParser(description='Run the IRBC model.') 79 | parser.add_argument('--final_grid', dest='load_flag', action='store_true',\ 80 | help='Postprocessing only') 81 | 82 | args = parser.parse_args() 83 | load_flag = args.load_flag 84 | 85 | 86 | ################################################################################ 87 | # Main Loop # 88 | ################################################################################ 89 | 90 | if args.load_flag: 91 | 92 | print('Postprocessing only.') 93 | 94 | # Construct the grid structure 95 | gridFinal = Tasmanian.TasmanianSparseGrid() 96 | # Read the properties from grid_final.txt 97 | gridFinal.read(data_location + "grid_final.txt") 98 | # Set as interpolation grid 99 | grid1 = Tasmanian.copyGrid(gridFinal) 100 | 101 | else: 102 | 103 | print('Start time iteration from iter = ', numstart) 104 | 105 | # If numstart==0 => start from scratch; numstart>0 => Restart from given iteration 106 | 107 | if (numstart>0): 108 | 109 | # Construct a new grid structure 110 | gridRestart = Tasmanian.TasmanianSparseGrid() 111 | # Read properties from file for restart 112 | gridRestart.read(data_location + "grid_iter_" + str(numstart) + ".txt") 113 | # Set as interpolation grid 114 | grid0 = Tasmanian.copyGrid(gridRestart) 115 | 116 | for iter0 in range(numstart,maxiter+1): 117 | 118 | polGuess1 = copy.copy(polGuess) 119 | 120 | grid1 = time_iter.fresh_grid() 121 | 122 | # Index of current grid level to control the number of refinements 123 | ilev = gridDepth 124 | 125 | while ((grid1.getNumNeeded() > 0) and (ilev<=maxRefLevel)): 126 | 127 | grid1 = time_iter.ti_step(grid1,polGuess1,grid0) 128 | 129 | # We start the refinement process after a given number of iterations 130 | if (iter0>iterRefStart): 131 | grid1,polGuess1 = time_iter.refine(grid1) 132 | #grid1 = time_iter.refine(grid1) 133 | 134 | # Track the grid level 135 | ilev += 1 136 | 137 | ## Calculate (approximate) errors on tomorrow's policy grid 138 | metric, polGuess, grid0 = time_iter.policy_update(grid0,grid1) 139 | 140 | print("Iteration: %2d, Grid pts: %2d, Level: %2d, Metric: %.4E" % (iter0, grid0.getNumPoints(),ilev,metric)) 141 | 142 | if (np.mod(iter0+1,savefreq)==0): 143 | time_iter.save_grid(grid0,iter0) 144 | 145 | if (metric 1: 60 | comm.Allgather(polSolutionsLocal, polSolutionsGlobal) 61 | else: 62 | polSolutionsGlobal = polSolutionsLocal 63 | 64 | # Add the new function values to grid1 65 | grid.loadNeededPoints(polSolutionsGlobal[:aNumAdd, :]) 66 | 67 | return grid 68 | 69 | 70 | ################################################################################ 71 | # Grid refinement # 72 | ################################################################################ 73 | 74 | 75 | def refine(grid): 76 | 77 | # Get the points that require function values 78 | aNumLoad = grid.getNumLoaded() 79 | # Scaling to only allow for those policies that are supposed to 80 | # determine the refinement process (in this case only the capital policies) 81 | scaleCorrMat = np.zeros((aNumLoad, nPols)) 82 | scaleCorrMat[:, 0 : nPols + 1] = scaleCorr 83 | 84 | # Refine the grid based on the surplus coefficients 85 | grid.setSurplusRefinement(surplThreshold, dimRef, typeRefinement, [], scaleCorrMat) 86 | 87 | if grid.getNumNeeded() > 0: 88 | 89 | # Get the new points and the number of points 90 | nwpts = grid.getNeededPoints() 91 | 92 | # We assign (for now) function values through interpolation# 93 | pol_guess = grid.evaluateBatch(nwpts) 94 | 95 | else: 96 | 97 | pol_guess = [] 98 | 99 | return grid, pol_guess 100 | 101 | 102 | ################################################################################ 103 | # New grid construction # 104 | ################################################################################ 105 | 106 | 107 | def fresh_grid(): 108 | 109 | # Generate the grid structure 110 | grid = Tasmanian.makeLocalPolynomialGrid( 111 | gridDim, gridOut, gridDepth, gridOrder, gridRule 112 | ) 113 | # Transform the domain 114 | grid.setDomainTransform(gridDomain) 115 | 116 | return grid 117 | 118 | 119 | ################################################################################ 120 | # Checking convergence and updating policies # 121 | ################################################################################ 122 | 123 | 124 | def policy_update(gridOld, gridNew): 125 | 126 | # Get the points and the number of points from grid1 127 | aPoints2 = gridNew.getPoints() 128 | aNumTot = gridNew.getNumPoints() 129 | 130 | # Evaluate the grid points on both grid structures 131 | polGuessTr1 = gridNew.evaluateBatch(aPoints2) 132 | polGuessTr0 = gridOld.evaluateBatch(aPoints2) 133 | 134 | # 1) Compute the Sup-Norm 135 | 136 | metricAux = np.zeros(nPols) 137 | 138 | for imet in range(nPols): 139 | metricAux[imet] = np.amax(np.abs(polGuessTr0[:, imet] - polGuessTr1[:, imet])) 140 | 141 | metricSup = np.amax(metricAux) 142 | 143 | # 2) Compute the L2-Norm 144 | 145 | metricL2 = 0.0 146 | 147 | for imetL2 in range(nPols): 148 | metricL2 += np.sum( 149 | (np.abs(polGuessTr0[:, imetL2] - polGuessTr1[:, imetL2])) ** 2 150 | ) 151 | 152 | metricL2 = (metricL2 / (aNumTot * nPols)) ** 0.5 153 | 154 | metric = np.minimum(metricL2, metricSup) 155 | 156 | # Now update pol_guess and grid 157 | 158 | polGuess = np.zeros((aNumTot, nPols)) 159 | 160 | for iupd in range(nPols): 161 | polGuess[:, iupd] = 0.5 * polGuessTr0[:, iupd] + 0.5 * polGuessTr1[:, iupd] 162 | 163 | gridOld = Tasmanian.copyGrid(gridNew) 164 | 165 | return metric, polGuess, gridOld 166 | 167 | 168 | ################################################################################ 169 | # Grid storage # 170 | ################################################################################ 171 | 172 | 173 | def save_grid(grid, iter): 174 | grid.write(data_location + "grid_iter_" + str(iter + 1) + ".txt") 175 | return 176 | -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_smooth/ARC_policy.txt: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 8.000000000000000444e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.141810820261413895e-01 2 | 1.000000000000000000e+00 8.081632653061224802e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.131654708418860844e-01 3 | 1.000000000000000000e+00 8.163265306122449161e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.121498596576307794e-01 4 | 1.000000000000000000e+00 8.244897959183673519e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.111342484733754743e-01 5 | 1.000000000000000000e+00 8.326530612244897878e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.101186372891201692e-01 6 | 1.000000000000000000e+00 8.408163265306123346e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.091030261048648642e-01 7 | 1.000000000000000000e+00 8.489795918367347705e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.080874149206095591e-01 8 | 1.000000000000000000e+00 8.571428571428572063e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.070948859034896783e-01 9 | 1.000000000000000000e+00 8.653061224489796421e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.061056543388176676e-01 10 | 1.000000000000000000e+00 8.734693877551020780e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.051164227741458790e-01 11 | 1.000000000000000000e+00 8.816326530612245138e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.041271912094739793e-01 12 | 1.000000000000000000e+00 8.897959183673469497e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.031379596448019687e-01 13 | 1.000000000000000000e+00 8.979591836734693855e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.021487280801301800e-01 14 | 1.000000000000000000e+00 9.061224489795918213e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.011784675933272482e-01 15 | 1.000000000000000000e+00 9.142857142857143682e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.002145307991471945e-01 16 | 1.000000000000000000e+00 9.224489795918368040e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.992505940049671409e-01 17 | 1.000000000000000000e+00 9.306122448979592399e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.982866572107871983e-01 18 | 1.000000000000000000e+00 9.387755102040816757e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.973227204166071447e-01 19 | 1.000000000000000000e+00 9.469387755102041115e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.963587836224270911e-01 20 | 1.000000000000000000e+00 9.551020408163265474e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.954097691837922701e-01 21 | 1.000000000000000000e+00 9.632653061224489832e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.944697081584844112e-01 22 | 1.000000000000000000e+00 9.714285714285714191e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.935296471331766632e-01 23 | 1.000000000000000000e+00 9.795918367346938549e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.925895861078688043e-01 24 | 1.000000000000000000e+00 9.877551020408164018e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.916495250825609453e-01 25 | 1.000000000000000000e+00 9.959183673469387266e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.907094640572531974e-01 26 | 1.000000000000000000e+00 1.004081632653061273e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.897806720733985486e-01 27 | 1.000000000000000000e+00 1.012244897959183598e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.888631491309967769e-01 28 | 1.000000000000000000e+00 1.020408163265306145e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.879456261885951163e-01 29 | 1.000000000000000000e+00 1.028571428571428470e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.870281032461935666e-01 30 | 1.000000000000000000e+00 1.036734693877551017e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.861105803037917950e-01 31 | 1.000000000000000000e+00 1.044897959183673564e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.851930573613901343e-01 32 | 1.000000000000000000e+00 1.053061224489795888e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.842840012069958400e-01 33 | 1.000000000000000000e+00 1.061224489795918435e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.833890563659474893e-01 34 | 1.000000000000000000e+00 1.069387755102040760e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.824941115248989165e-01 35 | 1.000000000000000000e+00 1.077551020408163307e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.815991666838503438e-01 36 | 1.000000000000000000e+00 1.085714285714285854e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.807042218428017710e-01 37 | 1.000000000000000000e+00 1.093877551020408179e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.798092770017533093e-01 38 | 1.000000000000000000e+00 1.102040816326530503e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.789198219430673253e-01 39 | 1.000000000000000000e+00 1.110204081632653050e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.780468362314694408e-01 40 | 1.000000000000000000e+00 1.118367346938775597e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.771738505198713343e-01 41 | 1.000000000000000000e+00 1.126530612244897922e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.763008648082733387e-01 42 | 1.000000000000000000e+00 1.134693877551020469e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.754278790966752322e-01 43 | 1.000000000000000000e+00 1.142857142857142794e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.745548933850773476e-01 44 | 1.000000000000000000e+00 1.151020408163265341e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.736847624614049623e-01 45 | 1.000000000000000000e+00 1.159183673469387887e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.728346150532124037e-01 46 | 1.000000000000000000e+00 1.167346938775510212e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.719844676450201781e-01 47 | 1.000000000000000000e+00 1.175510204081632537e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.711343202368276195e-01 48 | 1.000000000000000000e+00 1.183673469387755084e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.702841728286351719e-01 49 | 1.000000000000000000e+00 1.191836734693877631e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.694340254204427243e-01 50 | 1.000000000000000000e+00 1.199999999999999956e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.685838780122502767e-01 51 | -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_nonsmooth/ARC_policy.txt: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 8.000000000000000444e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.144960600043880339e-01 2 | 1.000000000000000000e+00 8.081632653061224802e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.134767372520514073e-01 3 | 1.000000000000000000e+00 8.163265306122449161e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.124574144997145586e-01 4 | 1.000000000000000000e+00 8.244897959183673519e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.114380917473780430e-01 5 | 1.000000000000000000e+00 8.326530612244897878e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.104187689950413054e-01 6 | 1.000000000000000000e+00 8.408163265306123346e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.093994462427046788e-01 7 | 1.000000000000000000e+00 8.489795918367347705e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.083801234903678301e-01 8 | 1.000000000000000000e+00 8.571428571428572063e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.073854672256351117e-01 9 | 1.000000000000000000e+00 8.653061224489796421e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.063943347448454757e-01 10 | 1.000000000000000000e+00 8.734693877551020780e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.054032022640559507e-01 11 | 1.000000000000000000e+00 8.816326530612245138e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.044120697832664257e-01 12 | 1.000000000000000000e+00 8.897959183673469497e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.034209373024769008e-01 13 | 1.000000000000000000e+00 8.979591836734693855e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.024298048216873758e-01 14 | 1.000000000000000000e+00 9.061224489795918213e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.014586016349595443e-01 15 | 1.000000000000000000e+00 9.142857142857143682e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 7.004940415462523884e-01 16 | 1.000000000000000000e+00 9.224489795918368040e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.995294814575450104e-01 17 | 1.000000000000000000e+00 9.306122448979592399e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.985649213688379655e-01 18 | 1.000000000000000000e+00 9.387755102040816757e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.976003612801305875e-01 19 | 1.000000000000000000e+00 9.469387755102041115e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.966358011914233206e-01 20 | 1.000000000000000000e+00 9.551020408163265474e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.956861598471147934e-01 21 | 1.000000000000000000e+00 9.632653061224489832e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.947454697494452880e-01 22 | 1.000000000000000000e+00 9.714285714285714191e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.938047796517761157e-01 23 | 1.000000000000000000e+00 9.795918367346938549e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.928640895541066103e-01 24 | 1.000000000000000000e+00 9.877551020408164018e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.919233994564373269e-01 25 | 1.000000000000000000e+00 9.959183673469387266e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.909827093587679325e-01 26 | 1.000000000000000000e+00 1.004081632653061273e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.900530536899179834e-01 27 | 1.000000000000000000e+00 1.012244897959183598e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.891344324498873686e-01 28 | 1.000000000000000000e+00 1.020408163265306145e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.882158112098566427e-01 29 | 1.000000000000000000e+00 1.028571428571428470e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.872971899698261389e-01 30 | 1.000000000000000000e+00 1.036734693877551017e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.863785687297955240e-01 31 | 1.000000000000000000e+00 1.044897959183673564e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.854599474897650202e-01 32 | 1.000000000000000000e+00 1.053061224489795888e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.845496652232468948e-01 33 | 1.000000000000000000e+00 1.061224489795918435e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.836532812459166220e-01 34 | 1.000000000000000000e+00 1.069387755102040760e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.827568972685863491e-01 35 | 1.000000000000000000e+00 1.077551020408163307e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.818605132912559652e-01 36 | 1.000000000000000000e+00 1.085714285714285854e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.809641293139256923e-01 37 | 1.000000000000000000e+00 1.093877551020408179e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.800677453365954195e-01 38 | 1.000000000000000000e+00 1.102040816326530503e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.791765491205606908e-01 39 | 1.000000000000000000e+00 1.110204081632653050e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.783009161884123728e-01 40 | 1.000000000000000000e+00 1.118367346938775597e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.774252832562641657e-01 41 | 1.000000000000000000e+00 1.126530612244897922e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.765496503241158477e-01 42 | 1.000000000000000000e+00 1.134693877551020469e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.756740173919677517e-01 43 | 1.000000000000000000e+00 1.142857142857142794e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.747983844598194336e-01 44 | 1.000000000000000000e+00 1.151020408163265341e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.739261112886044680e-01 45 | 1.000000000000000000e+00 1.159183673469387887e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.730773564439219703e-01 46 | 1.000000000000000000e+00 1.167346938775510212e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.722286015992396946e-01 47 | 1.000000000000000000e+00 1.175510204081632537e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.713798467545571969e-01 48 | 1.000000000000000000e+00 1.183673469387755084e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.705310919098746991e-01 49 | 1.000000000000000000e+00 1.191836734693877631e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.696823370651922014e-01 50 | 1.000000000000000000e+00 1.199999999999999956e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 6.688335822205098147e-01 51 | -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_nonsmooth/Cap_policy_0.txt: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 8.000000000000000444e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.009688330147311852e+00 2 | 1.000000000000000000e+00 8.081632653061224802e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.010034915709659087e+00 3 | 1.000000000000000000e+00 8.163265306122449161e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.010381501272006766e+00 4 | 1.000000000000000000e+00 8.244897959183673519e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.010728086834354000e+00 5 | 1.000000000000000000e+00 8.326530612244897878e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.011074672396701457e+00 6 | 1.000000000000000000e+00 8.408163265306123346e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.011421257959048692e+00 7 | 1.000000000000000000e+00 8.489795918367347705e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.011767843521396149e+00 8 | 1.000000000000000000e+00 8.571428571428572063e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.012119504139252335e+00 9 | 1.000000000000000000e+00 8.653061224489796421e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.012471889765037991e+00 10 | 1.000000000000000000e+00 8.734693877551020780e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.012824275390823869e+00 11 | 1.000000000000000000e+00 8.816326530612245138e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.013176661016609748e+00 12 | 1.000000000000000000e+00 8.897959183673469497e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.013529046642395404e+00 13 | 1.000000000000000000e+00 8.979591836734693855e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.013881432268181282e+00 14 | 1.000000000000000000e+00 9.061224489795918213e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.014238862990396672e+00 15 | 1.000000000000000000e+00 9.142857142857143682e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.014597975411422048e+00 16 | 1.000000000000000000e+00 9.224489795918368040e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.014957087832447424e+00 17 | 1.000000000000000000e+00 9.306122448979592399e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.015316200253472578e+00 18 | 1.000000000000000000e+00 9.387755102040816757e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.015675312674498176e+00 19 | 1.000000000000000000e+00 9.469387755102041115e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.016034425095523552e+00 20 | 1.000000000000000000e+00 9.551020408163265474e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.016399164453891002e+00 21 | 1.000000000000000000e+00 9.632653061224489832e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.016767279974664318e+00 22 | 1.000000000000000000e+00 9.714285714285714191e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.017135395495437633e+00 23 | 1.000000000000000000e+00 9.795918367346938549e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.017503511016210949e+00 24 | 1.000000000000000000e+00 9.877551020408164018e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.017871626536984264e+00 25 | 1.000000000000000000e+00 9.959183673469387266e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.018239742057757358e+00 26 | 1.000000000000000000e+00 1.004081632653061273e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.018614908577547329e+00 27 | 1.000000000000000000e+00 1.012244897959183598e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.018997126096353512e+00 28 | 1.000000000000000000e+00 1.020408163265306145e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.019379343615159694e+00 29 | 1.000000000000000000e+00 1.028571428571428470e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.019761561133965655e+00 30 | 1.000000000000000000e+00 1.036734693877551017e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.020143778652771838e+00 31 | 1.000000000000000000e+00 1.044897959183673564e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.020525996171577798e+00 32 | 1.000000000000000000e+00 1.053061224489795888e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.020916640695949340e+00 33 | 1.000000000000000000e+00 1.061224489795918435e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.021321330229596480e+00 34 | 1.000000000000000000e+00 1.069387755102040760e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.021726019763243398e+00 35 | 1.000000000000000000e+00 1.077551020408163307e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.022130709296890538e+00 36 | 1.000000000000000000e+00 1.085714285714285854e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.022535398830537456e+00 37 | 1.000000000000000000e+00 1.093877551020408179e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.022940088364184597e+00 38 | 1.000000000000000000e+00 1.102040816326530503e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.023354284561442729e+00 39 | 1.000000000000000000e+00 1.110204081632653050e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.023797000749534281e+00 40 | 1.000000000000000000e+00 1.118367346938775597e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.024239716937626277e+00 41 | 1.000000000000000000e+00 1.126530612244897922e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.024682433125717829e+00 42 | 1.000000000000000000e+00 1.134693877551020469e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.025125149313809603e+00 43 | 1.000000000000000000e+00 1.142857142857142794e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.025567865501901377e+00 44 | 1.000000000000000000e+00 1.151020408163265341e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.026022331331778226e+00 45 | 1.000000000000000000e+00 1.159183673469387887e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.026559044654151931e+00 46 | 1.000000000000000000e+00 1.167346938775510212e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.027095757976525636e+00 47 | 1.000000000000000000e+00 1.175510204081632537e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.027632471298898897e+00 48 | 1.000000000000000000e+00 1.183673469387755084e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.028169184621272603e+00 49 | 1.000000000000000000e+00 1.191836734693877631e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.028705897943646086e+00 50 | 1.000000000000000000e+00 1.199999999999999956e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.029242611266019791e+00 51 | -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_nonsmooth/Cap_policy_1.txt: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 8.000000000000000444e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.361577361456297153e-01 2 | 1.000000000000000000e+00 8.081632653061224802e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.436309136802776498e-01 3 | 1.000000000000000000e+00 8.163265306122449161e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.511040912149260285e-01 4 | 1.000000000000000000e+00 8.244897959183673519e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.585772687495739630e-01 5 | 1.000000000000000000e+00 8.326530612244897878e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.660504462842221196e-01 6 | 1.000000000000000000e+00 8.408163265306123346e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.735236238188703872e-01 7 | 1.000000000000000000e+00 8.489795918367347705e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.809968013535184328e-01 8 | 1.000000000000000000e+00 8.571428571428572063e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.884513077872178144e-01 9 | 1.000000000000000000e+00 8.653061224489796421e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.959031469207818787e-01 10 | 1.000000000000000000e+00 8.734693877551020780e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.033549860543457211e-01 11 | 1.000000000000000000e+00 8.816326530612245138e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.108068251879096744e-01 12 | 1.000000000000000000e+00 8.897959183673469497e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.182586643214735167e-01 13 | 1.000000000000000000e+00 8.979591836734693855e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.257105034550374700e-01 14 | 1.000000000000000000e+00 9.061224489795918213e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.331456008112343214e-01 15 | 1.000000000000000000e+00 9.142857142857143682e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.405751175749755832e-01 16 | 1.000000000000000000e+00 9.224489795918368040e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.480046343387165120e-01 17 | 1.000000000000000000e+00 9.306122448979592399e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.554341511024575517e-01 18 | 1.000000000000000000e+00 9.387755102040816757e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.628636678661988135e-01 19 | 1.000000000000000000e+00 9.469387755102041115e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.702931846299397423e-01 20 | 1.000000000000000000e+00 9.551020408163265474e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.777062479625966418e-01 21 | 1.000000000000000000e+00 9.632653061224489832e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.851094392366027686e-01 22 | 1.000000000000000000e+00 9.714285714285714191e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.925126305106087843e-01 23 | 1.000000000000000000e+00 9.795918367346938549e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.999158217846151331e-01 24 | 1.000000000000000000e+00 9.877551020408164018e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.007319013058621371e+00 25 | 1.000000000000000000e+00 9.959183673469387266e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.014722204332627387e+00 26 | 1.000000000000000000e+00 1.004081632653061273e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.022107346861277355e+00 27 | 1.000000000000000000e+00 1.012244897959183598e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.029474440644569944e+00 28 | 1.000000000000000000e+00 1.020408163265306145e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.036841534427862976e+00 29 | 1.000000000000000000e+00 1.028571428571428470e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.044208628211155787e+00 30 | 1.000000000000000000e+00 1.036734693877551017e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.051575721994448820e+00 31 | 1.000000000000000000e+00 1.044897959183673564e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.058942815777741853e+00 32 | 1.000000000000000000e+00 1.053061224489795888e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.066290228964918319e+00 33 | 1.000000000000000000e+00 1.061224489795918435e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.073604841158567691e+00 34 | 1.000000000000000000e+00 1.069387755102040760e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.080919453352217285e+00 35 | 1.000000000000000000e+00 1.077551020408163307e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.088234065545866880e+00 36 | 1.000000000000000000e+00 1.085714285714285854e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.095548677739516252e+00 37 | 1.000000000000000000e+00 1.093877551020408179e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.102863289933165625e+00 38 | 1.000000000000000000e+00 1.102040816326530503e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.110156917983994074e+00 39 | 1.000000000000000000e+00 1.110204081632653050e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.117387593606360419e+00 40 | 1.000000000000000000e+00 1.118367346938775597e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.124618269228726319e+00 41 | 1.000000000000000000e+00 1.126530612244897922e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.131848944851092442e+00 42 | 1.000000000000000000e+00 1.134693877551020469e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.139079620473458565e+00 43 | 1.000000000000000000e+00 1.142857142857142794e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.146310296095824466e+00 44 | 1.000000000000000000e+00 1.151020408163265341e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.153516328890177078e+00 45 | 1.000000000000000000e+00 1.159183673469387887e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.160549861888432899e+00 46 | 1.000000000000000000e+00 1.167346938775510212e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.167583394886688275e+00 47 | 1.000000000000000000e+00 1.175510204081632537e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.174616927884944095e+00 48 | 1.000000000000000000e+00 1.183673469387755084e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.181650460883200138e+00 49 | 1.000000000000000000e+00 1.191836734693877631e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.188683993881455736e+00 50 | 1.000000000000000000e+00 1.199999999999999956e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.195717526879711556e+00 51 | -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_nonsmooth/Cap_policy_2.txt: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 8.000000000000000444e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.009688330245660959e+00 2 | 1.000000000000000000e+00 8.081632653061224802e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.010034915790832155e+00 3 | 1.000000000000000000e+00 8.163265306122449161e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.010381501336003129e+00 4 | 1.000000000000000000e+00 8.244897959183673519e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.010728086881174104e+00 5 | 1.000000000000000000e+00 8.326530612244897878e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.011074672426345078e+00 6 | 1.000000000000000000e+00 8.408163265306123346e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.011421257971516274e+00 7 | 1.000000000000000000e+00 8.489795918367347705e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.011767843516687249e+00 8 | 1.000000000000000000e+00 8.571428571428572063e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.012119504132729331e+00 9 | 1.000000000000000000e+00 8.653061224489796421e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.012471889758895793e+00 10 | 1.000000000000000000e+00 8.734693877551020780e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.012824275385062478e+00 11 | 1.000000000000000000e+00 8.816326530612245138e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.013176661011228941e+00 12 | 1.000000000000000000e+00 8.897959183673469497e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.013529046637395625e+00 13 | 1.000000000000000000e+00 8.979591836734693855e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.013881432263561866e+00 14 | 1.000000000000000000e+00 9.061224489795918213e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.014238862990788803e+00 15 | 1.000000000000000000e+00 9.142857142857143682e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.014597975418369158e+00 16 | 1.000000000000000000e+00 9.224489795918368040e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.014957087845949291e+00 17 | 1.000000000000000000e+00 9.306122448979592399e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.015316200273529645e+00 18 | 1.000000000000000000e+00 9.387755102040816757e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.015675312701109778e+00 19 | 1.000000000000000000e+00 9.469387755102041115e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.016034425128689911e+00 20 | 1.000000000000000000e+00 9.551020408163265474e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.016399164487171047e+00 21 | 1.000000000000000000e+00 9.632653061224489832e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.016767280004192031e+00 22 | 1.000000000000000000e+00 9.714285714285714191e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.017135395521213237e+00 23 | 1.000000000000000000e+00 9.795918367346938549e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.017503511038234443e+00 24 | 1.000000000000000000e+00 9.877551020408164018e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.017871626555255649e+00 25 | 1.000000000000000000e+00 9.959183673469387266e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.018239742072276854e+00 26 | 1.000000000000000000e+00 1.004081632653061273e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.018614908566935151e+00 27 | 1.000000000000000000e+00 1.012244897959183598e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.018997126039230317e+00 28 | 1.000000000000000000e+00 1.020408163265306145e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.019379343511525260e+00 29 | 1.000000000000000000e+00 1.028571428571428470e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.019761560983820647e+00 30 | 1.000000000000000000e+00 1.036734693877551017e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.020143778456115813e+00 31 | 1.000000000000000000e+00 1.044897959183673564e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.020525995928410978e+00 32 | 1.000000000000000000e+00 1.053061224489795888e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.020916640445894474e+00 33 | 1.000000000000000000e+00 1.061224489795918435e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.021321330038691855e+00 34 | 1.000000000000000000e+00 1.069387755102040760e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.021726019631489235e+00 35 | 1.000000000000000000e+00 1.077551020408163307e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.022130709224286393e+00 36 | 1.000000000000000000e+00 1.085714285714285854e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.022535398817083774e+00 37 | 1.000000000000000000e+00 1.093877551020408179e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.022940088409881154e+00 38 | 1.000000000000000000e+00 1.102040816326530503e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.023354284643209100e+00 39 | 1.000000000000000000e+00 1.110204081632653050e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.023797000798128964e+00 40 | 1.000000000000000000e+00 1.118367346938775597e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.024239716953049051e+00 41 | 1.000000000000000000e+00 1.126530612244897922e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.024682433107968915e+00 42 | 1.000000000000000000e+00 1.134693877551020469e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.025125149262888558e+00 43 | 1.000000000000000000e+00 1.142857142857142794e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.025567865417808644e+00 44 | 1.000000000000000000e+00 1.151020408163265341e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.026022331219022199e+00 45 | 1.000000000000000000e+00 1.159183673469387887e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.026559044544291144e+00 46 | 1.000000000000000000e+00 1.167346938775510212e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.027095757869560089e+00 47 | 1.000000000000000000e+00 1.175510204081632537e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.027632471194829256e+00 48 | 1.000000000000000000e+00 1.183673469387755084e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.028169184520098645e+00 49 | 1.000000000000000000e+00 1.191836734693877631e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.028705897845367589e+00 50 | 1.000000000000000000e+00 1.199999999999999956e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.029242611170636534e+00 51 | -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_smooth/Cap_policy_0.txt: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 8.000000000000000444e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.009673832674491178e+00 2 | 1.000000000000000000e+00 8.081632653061224802e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.010021731403760281e+00 3 | 1.000000000000000000e+00 8.163265306122449161e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.010369630133029384e+00 4 | 1.000000000000000000e+00 8.244897959183673519e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.010717528862298487e+00 5 | 1.000000000000000000e+00 8.326530612244897878e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.011065427591567589e+00 6 | 1.000000000000000000e+00 8.408163265306123346e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.011413326320836914e+00 7 | 1.000000000000000000e+00 8.489795918367347705e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.011761225050106017e+00 8 | 1.000000000000000000e+00 8.571428571428572063e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.012113433182947331e+00 9 | 1.000000000000000000e+00 8.653061224489796421e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.012466256944870135e+00 10 | 1.000000000000000000e+00 8.734693877551020780e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.012819080706792940e+00 11 | 1.000000000000000000e+00 8.816326530612245138e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.013171904468715745e+00 12 | 1.000000000000000000e+00 8.897959183673469497e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.013524728230638550e+00 13 | 1.000000000000000000e+00 8.979591836734693855e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.013877551992561354e+00 14 | 1.000000000000000000e+00 9.061224489795918213e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.014234802012826009e+00 15 | 1.000000000000000000e+00 9.142857142857143682e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.014593527452537947e+00 16 | 1.000000000000000000e+00 9.224489795918368040e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.014952252892250106e+00 17 | 1.000000000000000000e+00 9.306122448979592399e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.015310978331962266e+00 18 | 1.000000000000000000e+00 9.387755102040816757e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.015669703771674204e+00 19 | 1.000000000000000000e+00 9.469387755102041115e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.016028429211386142e+00 20 | 1.000000000000000000e+00 9.551020408163265474e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.016392548558183284e+00 21 | 1.000000000000000000e+00 9.632653061224489832e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.016759904249231905e+00 22 | 1.000000000000000000e+00 9.714285714285714191e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.017127259940280526e+00 23 | 1.000000000000000000e+00 9.795918367346938549e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.017494615631328925e+00 24 | 1.000000000000000000e+00 9.877551020408164018e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.017861971322377546e+00 25 | 1.000000000000000000e+00 9.959183673469387266e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.018229327013426166e+00 26 | 1.000000000000000000e+00 1.004081632653061273e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.018603579328378528e+00 27 | 1.000000000000000000e+00 1.012244897959183598e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.018984728267234852e+00 28 | 1.000000000000000000e+00 1.020408163265306145e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.019365877206090953e+00 29 | 1.000000000000000000e+00 1.028571428571428470e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.019747026144947277e+00 30 | 1.000000000000000000e+00 1.036734693877551017e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.020128175083803379e+00 31 | 1.000000000000000000e+00 1.044897959183673564e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.020509324022659481e+00 32 | 1.000000000000000000e+00 1.053061224489795888e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.020898188212029378e+00 33 | 1.000000000000000000e+00 1.061224489795918435e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.021299911152255380e+00 34 | 1.000000000000000000e+00 1.069387755102040760e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.021701634092481159e+00 35 | 1.000000000000000000e+00 1.077551020408163307e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.022103357032706938e+00 36 | 1.000000000000000000e+00 1.085714285714285854e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.022505079972933162e+00 37 | 1.000000000000000000e+00 1.093877551020408179e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.022906802913158941e+00 38 | 1.000000000000000000e+00 1.102040816326530503e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.023316771031614669e+00 39 | 1.000000000000000000e+00 1.110204081632653050e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.023751474684759355e+00 40 | 1.000000000000000000e+00 1.118367346938775597e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.024186178337904263e+00 41 | 1.000000000000000000e+00 1.126530612244897922e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.024620881991048726e+00 42 | 1.000000000000000000e+00 1.134693877551020469e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.025055585644193856e+00 43 | 1.000000000000000000e+00 1.142857142857142794e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.025490289297338764e+00 44 | 1.000000000000000000e+00 1.151020408163265341e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.025937789351862861e+00 45 | 1.000000000000000000e+00 1.159183673469387887e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.026474864216041727e+00 46 | 1.000000000000000000e+00 1.167346938775510212e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.027011939080220593e+00 47 | 1.000000000000000000e+00 1.175510204081632537e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.027549013944399681e+00 48 | 1.000000000000000000e+00 1.183673469387755084e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.028086088808578547e+00 49 | 1.000000000000000000e+00 1.191836734693877631e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.028623163672757634e+00 50 | 1.000000000000000000e+00 1.199999999999999956e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.029160238536936500e+00 51 | -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_smooth/Cap_policy_1.txt: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 8.000000000000000444e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.361517914931146933e-01 2 | 1.000000000000000000e+00 8.081632653061224802e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.436226913283898510e-01 3 | 1.000000000000000000e+00 8.163265306122449161e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.510935911636652307e-01 4 | 1.000000000000000000e+00 8.244897959183673519e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.585644909989403883e-01 5 | 1.000000000000000000e+00 8.326530612244897878e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.660353908342156570e-01 6 | 1.000000000000000000e+00 8.408163265306123346e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.735062906694910367e-01 7 | 1.000000000000000000e+00 8.489795918367347705e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.809771905047663054e-01 8 | 1.000000000000000000e+00 8.571428571428572063e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.884307519413081611e-01 9 | 1.000000000000000000e+00 8.653061224489796421e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 8.958818364637455289e-01 10 | 1.000000000000000000e+00 8.734693877551020780e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.033329209861827858e-01 11 | 1.000000000000000000e+00 8.816326530612245138e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.107840055086199316e-01 12 | 1.000000000000000000e+00 8.897959183673469497e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.182350900310571884e-01 13 | 1.000000000000000000e+00 8.979591836734693855e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.256861745534942232e-01 14 | 1.000000000000000000e+00 9.061224489795918213e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.331216399833351938e-01 15 | 1.000000000000000000e+00 9.142857142857143682e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.405518990489770692e-01 16 | 1.000000000000000000e+00 9.224489795918368040e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.479821581146189446e-01 17 | 1.000000000000000000e+00 9.306122448979592399e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.554124171802607091e-01 18 | 1.000000000000000000e+00 9.387755102040816757e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.628426762459025845e-01 19 | 1.000000000000000000e+00 9.469387755102041115e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.702729353115444599e-01 20 | 1.000000000000000000e+00 9.551020408163265474e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.776872133346619087e-01 21 | 1.000000000000000000e+00 9.632653061224489832e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.850919027322646571e-01 22 | 1.000000000000000000e+00 9.714285714285714191e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.924965921298674054e-01 23 | 1.000000000000000000e+00 9.795918367346938549e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 9.999012815274703758e-01 24 | 1.000000000000000000e+00 9.877551020408164018e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.007305970925073346e+00 25 | 1.000000000000000000e+00 9.959183673469387266e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.014710660322675650e+00 26 | 1.000000000000000000e+00 1.004081632653061273e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.022097646681110028e+00 27 | 1.000000000000000000e+00 1.012244897959183598e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.029466930000375369e+00 28 | 1.000000000000000000e+00 1.020408163265306145e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.036836213319640931e+00 29 | 1.000000000000000000e+00 1.028571428571428470e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.044205496638906494e+00 30 | 1.000000000000000000e+00 1.036734693877551017e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.051574779958172057e+00 31 | 1.000000000000000000e+00 1.044897959183673564e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.058944063277437841e+00 32 | 1.000000000000000000e+00 1.053061224489795888e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.066295124487109058e+00 33 | 1.000000000000000000e+00 1.061224489795918435e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.073615815514122884e+00 34 | 1.000000000000000000e+00 1.069387755102040760e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.080936506541136932e+00 35 | 1.000000000000000000e+00 1.077551020408163307e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.088257197568151202e+00 36 | 1.000000000000000000e+00 1.085714285714285854e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.095577888595165250e+00 37 | 1.000000000000000000e+00 1.093877551020408179e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.102898579622179076e+00 38 | 1.000000000000000000e+00 1.102040816326530503e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.110200890592136558e+00 39 | 1.000000000000000000e+00 1.110204081632653050e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.117448061390925229e+00 40 | 1.000000000000000000e+00 1.118367346938775597e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.124695232189714345e+00 41 | 1.000000000000000000e+00 1.126530612244897922e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.131942402988502794e+00 42 | 1.000000000000000000e+00 1.134693877551020469e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.139189573787291687e+00 43 | 1.000000000000000000e+00 1.142857142857142794e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.146436744586080136e+00 44 | 1.000000000000000000e+00 1.151020408163265341e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.153657100921077427e+00 45 | 1.000000000000000000e+00 1.159183673469387887e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.160689756009533724e+00 46 | 1.000000000000000000e+00 1.167346938775510212e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.167722411097989577e+00 47 | 1.000000000000000000e+00 1.175510204081632537e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.174755066186445873e+00 48 | 1.000000000000000000e+00 1.183673469387755084e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.181787721274901948e+00 49 | 1.000000000000000000e+00 1.191836734693877631e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.188820376363358244e+00 50 | 1.000000000000000000e+00 1.199999999999999956e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.195853031451814097e+00 51 | -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_smooth/Cap_policy_2.txt: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 8.000000000000000444e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.009673832558145579e+00 2 | 1.000000000000000000e+00 8.081632653061224802e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.010021731259566291e+00 3 | 1.000000000000000000e+00 8.163265306122449161e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.010369629960987004e+00 4 | 1.000000000000000000e+00 8.244897959183673519e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.010717528662407938e+00 5 | 1.000000000000000000e+00 8.326530612244897878e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.011065427363828650e+00 6 | 1.000000000000000000e+00 8.408163265306123346e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.011413326065249363e+00 7 | 1.000000000000000000e+00 8.489795918367347705e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.011761224766669853e+00 8 | 1.000000000000000000e+00 8.571428571428572063e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.012113432944345082e+00 9 | 1.000000000000000000e+00 8.653061224489796421e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.012466256761484829e+00 10 | 1.000000000000000000e+00 8.734693877551020780e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.012819080578625019e+00 11 | 1.000000000000000000e+00 8.816326530612245138e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.013171904395764766e+00 12 | 1.000000000000000000e+00 8.897959183673469497e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.013524728212904735e+00 13 | 1.000000000000000000e+00 8.979591836734693855e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.013877552030044482e+00 14 | 1.000000000000000000e+00 9.061224489795918213e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.014234802067519592e+00 15 | 1.000000000000000000e+00 9.142857142857143682e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.014593527511773674e+00 16 | 1.000000000000000000e+00 9.224489795918368040e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.014952252956027090e+00 17 | 1.000000000000000000e+00 9.306122448979592399e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.015310978400281172e+00 18 | 1.000000000000000000e+00 9.387755102040816757e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.015669703844534588e+00 19 | 1.000000000000000000e+00 9.469387755102041115e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.016028429288788448e+00 20 | 1.000000000000000000e+00 9.551020408163265474e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.016392548642423455e+00 21 | 1.000000000000000000e+00 9.632653061224489832e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.016759904341687060e+00 22 | 1.000000000000000000e+00 9.714285714285714191e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.017127260040950887e+00 23 | 1.000000000000000000e+00 9.795918367346938549e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.017494615740214492e+00 24 | 1.000000000000000000e+00 9.877551020408164018e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.017861971439478097e+00 25 | 1.000000000000000000e+00 9.959183673469387266e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.018229327138741924e+00 26 | 1.000000000000000000e+00 1.004081632653061273e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.018603579465987563e+00 27 | 1.000000000000000000e+00 1.012244897959183598e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.018984728421215236e+00 28 | 1.000000000000000000e+00 1.020408163265306145e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.019365877376442686e+00 29 | 1.000000000000000000e+00 1.028571428571428470e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.019747026331670359e+00 30 | 1.000000000000000000e+00 1.036734693877551017e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.020128175286898031e+00 31 | 1.000000000000000000e+00 1.044897959183673564e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.020509324242125482e+00 32 | 1.000000000000000000e+00 1.053061224489795888e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.020898188439939958e+00 33 | 1.000000000000000000e+00 1.061224489795918435e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.021299911375398883e+00 34 | 1.000000000000000000e+00 1.069387755102040760e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.021701634310857587e+00 35 | 1.000000000000000000e+00 1.077551020408163307e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.022103357246316513e+00 36 | 1.000000000000000000e+00 1.085714285714285854e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.022505080181775217e+00 37 | 1.000000000000000000e+00 1.093877551020408179e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.022906803117233920e+00 38 | 1.000000000000000000e+00 1.102040816326530503e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.023316771235127431e+00 39 | 1.000000000000000000e+00 1.110204081632653050e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.023751474900324476e+00 40 | 1.000000000000000000e+00 1.118367346938775597e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.024186178565521521e+00 41 | 1.000000000000000000e+00 1.126530612244897922e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.024620882230718344e+00 42 | 1.000000000000000000e+00 1.134693877551020469e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.025055585895915389e+00 43 | 1.000000000000000000e+00 1.142857142857142794e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.025490289561112212e+00 44 | 1.000000000000000000e+00 1.151020408163265341e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.025937789624128849e+00 45 | 1.000000000000000000e+00 1.159183673469387887e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.026474864471882187e+00 46 | 1.000000000000000000e+00 1.167346938775510212e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.027011939319635303e+00 47 | 1.000000000000000000e+00 1.175510204081632537e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.027549014167388197e+00 48 | 1.000000000000000000e+00 1.183673469387755084e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.028086089015141535e+00 49 | 1.000000000000000000e+00 1.191836734693877631e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.028623163862894652e+00 50 | 1.000000000000000000e+00 1.199999999999999956e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.029160238710647990e+00 51 | -------------------------------------------------------------------------------- /IRBC_model_mpi/data/data_nonsmooth/IC_policy_0.txt: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 8.000000000000000444e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -1.968833014731188880e-02 2 | 1.000000000000000000e+00 8.081632653061224802e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.003491570797734031e-02 3 | 1.000000000000000000e+00 8.163265306122449161e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.038150126864280223e-02 4 | 1.000000000000000000e+00 8.244897959183673519e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.072808682930825375e-02 5 | 1.000000000000000000e+00 8.326530612244897878e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.107467238997371567e-02 6 | 1.000000000000000000e+00 8.408163265306123346e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.142125795063917065e-02 7 | 1.000000000000000000e+00 8.489795918367347705e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.176784351130462564e-02 8 | 1.000000000000000000e+00 8.571428571428572063e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.211950413042204286e-02 9 | 1.000000000000000000e+00 8.653061224489796421e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.247188975788974932e-02 10 | 1.000000000000000000e+00 8.734693877551020780e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.282427538535744538e-02 11 | 1.000000000000000000e+00 8.816326530612245138e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.317666101282514837e-02 12 | 1.000000000000000000e+00 8.897959183673469497e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.352904664029284790e-02 13 | 1.000000000000000000e+00 8.979591836734693855e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.388143226776054395e-02 14 | 1.000000000000000000e+00 9.061224489795918213e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.423886299039649042e-02 15 | 1.000000000000000000e+00 9.142857142857143682e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.459797541142185254e-02 16 | 1.000000000000000000e+00 9.224489795918368040e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.495708783244720425e-02 17 | 1.000000000000000000e+00 9.306122448979592399e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.531620025347255595e-02 18 | 1.000000000000000000e+00 9.387755102040816757e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.567531267449791460e-02 19 | 1.000000000000000000e+00 9.469387755102041115e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.603442509552326978e-02 20 | 1.000000000000000000e+00 9.551020408163265474e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.639916445389109065e-02 21 | 1.000000000000000000e+00 9.632653061224489832e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.676727997466437498e-02 22 | 1.000000000000000000e+00 9.714285714285714191e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.713539549543766277e-02 23 | 1.000000000000000000e+00 9.795918367346938549e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.750351101621095751e-02 24 | 1.000000000000000000e+00 9.877551020408164018e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.787162653698425571e-02 25 | 1.000000000000000000e+00 9.959183673469387266e-01 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.823974205775752963e-02 26 | 1.000000000000000000e+00 1.004081632653061273e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.861490857754726488e-02 27 | 1.000000000000000000e+00 1.012244897959183598e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.899712609635339902e-02 28 | 1.000000000000000000e+00 1.020408163265306145e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.937934361515954704e-02 29 | 1.000000000000000000e+00 1.028571428571428470e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -2.976156113396568811e-02 30 | 1.000000000000000000e+00 1.036734693877551017e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.014377865277183613e-02 31 | 1.000000000000000000e+00 1.044897959183673564e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.052599617157799108e-02 32 | 1.000000000000000000e+00 1.053061224489795888e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.091664069591170891e-02 33 | 1.000000000000000000e+00 1.061224489795918435e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.132133022945805811e-02 34 | 1.000000000000000000e+00 1.069387755102040760e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.172601976300440385e-02 35 | 1.000000000000000000e+00 1.077551020408163307e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.213070929655074959e-02 36 | 1.000000000000000000e+00 1.085714285714285854e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.253539883009709532e-02 37 | 1.000000000000000000e+00 1.093877551020408179e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.294008836364343412e-02 38 | 1.000000000000000000e+00 1.102040816326530503e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.335428456085130083e-02 39 | 1.000000000000000000e+00 1.110204081632653050e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.379700074904372353e-02 40 | 1.000000000000000000e+00 1.118367346938775597e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.423971693723614623e-02 41 | 1.000000000000000000e+00 1.126530612244897922e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.468243312542856893e-02 42 | 1.000000000000000000e+00 1.134693877551020469e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.512514931362099163e-02 43 | 1.000000000000000000e+00 1.142857142857142794e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.556786550181340739e-02 44 | 1.000000000000000000e+00 1.151020408163265341e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.602233133177847046e-02 45 | 1.000000000000000000e+00 1.159183673469387887e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.655904465415202309e-02 46 | 1.000000000000000000e+00 1.167346938775510212e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.709575797652555490e-02 47 | 1.000000000000000000e+00 1.175510204081632537e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.763247129889908671e-02 48 | 1.000000000000000000e+00 1.183673469387755084e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.816918462127263240e-02 49 | 1.000000000000000000e+00 1.191836734693877631e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.870589794364617808e-02 50 | 1.000000000000000000e+00 1.199999999999999956e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 -3.924261126601971683e-02 51 | --------------------------------------------------------------------------------