Country

LandUse.CountryType
Country

A Country is a collection of single Region's. There is free migration across regions (same utilty everywhere). What characterises a Region are different θs in their respective urban sectors.

Shared Characteristics

In all regions, the following characteristics are shared:

  • total population
  • rural wage
  • rural productivity
  • rural land price ρ
  • rent and food price
source

Similarly to a single region, constructing a Country requires a parameter vector. We have to require at least 2 regions for this work. In this example we create a country with $K=3$ regions, where the first region has 50% of all available space, and the the rest is split equally between cities 2 and 3 (key :kshare). The key :factors should be ones(K) by default, it allows an exogenous mulitplicative shift of productivity $\theta_u$. Same for :gs which is a growth shift (by default zero). This is useful to experiment with different growth trajectories for regions according to which we would set the $\theta_u$ of region ik to:

p.θu * p.factors[ik] * exp(p.gs[ik] * (p.it-1))

Here we create 3 regions with equal $\theta_u$s:

pk = LandUse.Param(par = Dict(:K => 3,
                              :kshare => [0.5,0.25,0.25],
                              :factors => ones(3),
                              :gs => zeros(3)))
c3 = LandUse.Country(pk)
c3
Region: θu=01.000, θr=01.000, ϕ=NaN, cityarea=NaN, rel_cityarea=NaN, area=NaN, Lu=NaN, Lr=NaN, pop=NaN, pr=NaN
 Region: θu=01.000, θr=01.000, ϕ=NaN, cityarea=NaN, rel_cityarea=NaN, area=NaN, Lu=NaN, Lr=NaN, pop=NaN, pr=NaN
 Region: θu=01.000, θr=01.000, ϕ=NaN, cityarea=NaN, rel_cityarea=NaN, area=NaN, Lu=NaN, Lr=NaN, pop=NaN, pr=NaN

Solving for a Country in one period

We use the Country type mainly to keep country-wide variables in one place. The actual computation of the equilibrium is again performed in JuMP.jl in the jc function:

LandUse.jcFunction

solve a Country at point x0

keywords:

  • estimateθ: whether the sequence of $\theta_u$ should be a choice variable
  • solve : solve the model (true) or return the model object for debugging?
  • fit_allyears : try to match the population distribution in all available years or just a single year.
source

The main difference to the single city solution is that this imposes certain constraints on the chosen $\theta_u$ sequence. Please consult the source code of jc for more details.

Running a Country

As before, we want to compute the country solution at a sequence of dates. This can be done with the runk. The default keywords run a 2-country setup:

x,C,p = LandUse.runk()  # sol vector, Country in each t, param
C
19-element Vector{LandUse.Country}:
 Region: θu=01.014, θr=01.000, ϕ=0.0351, cityarea=0.0039, rel_cityarea=0.00, area=1.00, Lu=0.519, Lr=0.703, pop=1.222, pr=0.819
 Region: θu=00.903, θr=01.000, ϕ=0.0211, cityarea=0.0014, rel_cityarea=0.00, area=1.00, Lu=0.074, Lr=0.704, pop=0.778, pr=0.819
 Region: θu=01.015, θr=01.097, ϕ=0.0415, cityarea=0.0054, rel_cityarea=0.01, area=1.00, Lu=0.664, Lr=0.669, pop=1.333, pr=0.701
 Region: θu=00.893, θr=01.097, ϕ=0.0252, cityarea=0.0020, rel_cityarea=0.00, area=1.00, Lu=0.095, Lr=0.671, pop=0.766, pr=0.701
 Region: θu=01.017, θr=01.234, ϕ=0.0492, cityarea=0.0076, rel_cityarea=0.01, area=1.00, Lu=0.836, Lr=0.610, pop=1.446, pr=0.575
 Region: θu=00.882, θr=01.234, ϕ=0.0303, cityarea=0.0029, rel_cityarea=0.00, area=1.00, Lu=0.120, Lr=0.612, pop=0.732, pr=0.575
 Region: θu=01.219, θr=01.330, ϕ=0.0541, cityarea=0.0092, rel_cityarea=0.01, area=1.00, Lu=0.917, Lr=0.536, pop=1.453, pr=0.616
 Region: θu=01.056, θr=01.330, ϕ=0.0335, cityarea=0.0035, rel_cityarea=0.00, area=1.00, Lu=0.131, Lr=0.539, pop=0.670, pr=0.616
 Region: θu=01.305, θr=01.328, ϕ=0.0533, cityarea=0.0089, rel_cityarea=0.01, area=1.00, Lu=0.966, Lr=0.584, pop=1.550, pr=0.687
 Region: θu=01.131, θr=01.328, ϕ=0.0324, cityarea=0.0033, rel_cityarea=0.00, area=1.00, Lu=0.131, Lr=0.587, pop=0.718, pr=0.687
 Region: θu=01.423, θr=01.426, ϕ=0.0578, cityarea=0.0105, rel_cityarea=0.01, area=1.00, Lu=1.064, Lr=0.550, pop=1.614, pr=0.676
 Region: θu=01.232, θr=01.426, ϕ=0.0356, cityarea=0.0040, rel_cityarea=0.00, area=1.00, Lu=0.149, Lr=0.553, pop=0.702, pr=0.676
 Region: θu=01.606, θr=01.618, ϕ=0.0660, cityarea=0.0137, rel_cityarea=0.01, area=1.00, Lu=1.233, Lr=0.481, pop=1.714, pr=0.631
 Region: θu=01.370, θr=01.618, ϕ=0.0398, cityarea=0.0050, rel_cityarea=0.01, area=1.00, Lu=0.155, Lr=0.486, pop=0.641, pr=0.631
 Region: θu=01.799, θr=01.653, ϕ=0.0679, cityarea=0.0145, rel_cityarea=0.01, area=1.00, Lu=1.276, Lr=0.479, pop=1.755, pr=0.698
 Region: θu=01.539, θr=01.653, ϕ=0.0409, cityarea=0.0053, rel_cityarea=0.01, area=1.00, Lu=0.162, Lr=0.484, pop=0.645, pr=0.698
 Region: θu=01.906, θr=01.619, ϕ=0.0675, cityarea=0.0143, rel_cityarea=0.01, area=1.00, Lu=1.213, Lr=0.465, pop=1.678, pr=0.759
 Region: θu=01.637, θr=01.619, ϕ=0.0407, cityarea=0.0052, rel_cityarea=0.01, area=1.00, Lu=0.155, Lr=0.469, pop=0.624, pr=0.759
 Region: θu=02.477, θr=02.036, ϕ=0.0834, cityarea=0.0218, rel_cityarea=0.02, area=1.00, Lu=1.490, Lr=0.378, pop=1.868, pr=0.718
 Region: θu=02.096, θr=02.036, ϕ=0.0497, cityarea=0.0077, rel_cityarea=0.01, area=1.00, Lu=0.176, Lr=0.383, pop=0.559, pr=0.718
 Region: θu=02.986, θr=02.347, ϕ=0.0942, cityarea=0.0279, rel_cityarea=0.03, area=1.00, Lu=1.592, Lr=0.317, pop=1.909, pr=0.708
 Region: θu=02.512, θr=02.347, ϕ=0.0560, cityarea=0.0098, rel_cityarea=0.01, area=1.00, Lu=0.184, Lr=0.323, pop=0.507, pr=0.708
 Region: θu=03.231, θr=02.731, ϕ=0.1032, cityarea=0.0334, rel_cityarea=0.03, area=1.00, Lu=1.714, Lr=0.272, pop=1.986, pr=0.618
 Region: θu=02.691, θr=02.731, ϕ=0.0610, cityarea=0.0117, rel_cityarea=0.01, area=1.00, Lu=0.188, Lr=0.278, pop=0.466, pr=0.618
 Region: θu=04.688, θr=04.182, ϕ=0.1314, cityarea=0.0543, rel_cityarea=0.06, area=1.00, Lu=2.088, Lr=0.193, pop=2.281, pr=0.521
 Region: θu=03.875, θr=04.182, ϕ=0.0787, cityarea=0.0194, rel_cityarea=0.02, area=1.00, Lu=0.229, Lr=0.201, pop=0.429, pr=0.521
 Region: θu=07.365, θr=07.251, ϕ=0.1691, cityarea=0.0898, rel_cityarea=0.10, area=1.00, Lu=2.449, Lr=0.129, pop=2.578, pr=0.421
 Region: θu=06.119, θr=07.251, ϕ=0.1053, cityarea=0.0348, rel_cityarea=0.04, area=1.00, Lu=0.303, Lr=0.137, pop=0.440, pr=0.421
 Region: θu=09.768, θr=09.454, ϕ=0.1925, cityarea=0.1164, rel_cityarea=0.13, area=1.00, Lu=2.658, Lr=0.111, pop=2.769, pr=0.415
 Region: θu=08.110, θr=09.454, ϕ=0.1197, cityarea=0.0450, rel_cityarea=0.05, area=1.00, Lu=0.329, Lr=0.120, pop=0.449, pr=0.415
 Region: θu=11.645, θr=14.875, ϕ=0.2149, cityarea=0.1451, rel_cityarea=0.17, area=1.00, Lu=2.851, Lr=0.086, pop=2.937, pr=0.292
 Region: θu=09.665, θr=14.875, ϕ=0.1355, cityarea=0.0577, rel_cityarea=0.06, area=1.00, Lu=0.360, Lr=0.095, pop=0.455, pr=0.292
 Region: θu=13.390, θr=21.842, ϕ=0.2324, cityarea=0.1696, rel_cityarea=0.20, area=1.00, Lu=3.006, Lr=0.073, pop=3.079, pr=0.219
 Region: θu=11.101, θr=21.842, ϕ=0.1471, cityarea=0.0679, rel_cityarea=0.07, area=1.00, Lu=0.380, Lr=0.082, pop=0.462, pr=0.219
 Region: θu=14.795, θr=24.127, ϕ=0.2420, cityarea=0.1840, rel_cityarea=0.23, area=1.00, Lu=3.200, Lr=0.074, pop=3.275, pr=0.222
 Region: θu=12.299, θr=24.127, ϕ=0.1540, cityarea=0.0745, rel_cityarea=0.08, area=1.00, Lu=0.417, Lr=0.084, pop=0.501, pr=0.222
 Region: θu=16.343, θr=26.651, ϕ=0.2518, cityarea=0.1992, rel_cityarea=0.25, area=1.00, Lu=3.340, Lr=0.074, pop=3.413, pr=0.223
 Region: θu=13.586, θr=26.651, ϕ=0.1599, cityarea=0.0803, rel_cityarea=0.09, area=1.00, Lu=0.435, Lr=0.085, pop=0.520, pr=0.223

and as before, a certain index contains the country in that period:

C[6].R   # regions in period 6
2-element Vector{LandUse.Region}:
 Region: θu=01.423, θr=01.426, ϕ=0.0578, cityarea=0.0105, rel_cityarea=0.01, area=1.00, Lu=1.064, Lr=0.550, pop=1.614, pr=0.676
 Region: θu=01.232, θr=01.426, ϕ=0.0356, cityarea=0.0040, rel_cityarea=0.00, area=1.00, Lu=0.149, Lr=0.553, pop=0.702, pr=0.676