@@ -3,7 +3,7 @@ using Random
33using Plots
44
55# Initialize parameters
6- param = init_parameters (K = 100 , rho = 0 , labor_mobility = false )
6+ param = init_parameters (K = 100 , sigma = 2 , rho = 0 , labor_mobility = false )
77width, height = 13 , 13
88
99# Create graph
@@ -17,7 +17,7 @@ Ni = find_node(g0, ceil(width/2), ceil(height/2)) # center
1717g0[:Zjn ][Ni] = 1 # more productive node
1818g0[:Lj ][Ni] = 1 # more productive node
1919
20- Random. seed! (10 ) # use 5, 8, 10 or 11
20+ Random. seed! (11 ) # use 5, 8, 10 or 11
2121nb_cities = 20 # draw a number of random cities in space
2222for i in 1 : nb_cities- 1
2323 newdraw = false
@@ -113,11 +113,13 @@ plots = Vector{Any}(undef, length(simulation))
113113i = 0
114114for s in simulation
115115 i += 1
116+ sizes = 2 .* results[Symbol (s)][:cj ] .* (g0[:Lj ] .> 1e-6 ) / maximum (results[Symbol (s)][:cj ])
117+ shades = results[Symbol (s)][:cj ] .* (g0[:Lj ] .> 1e-6 ) / maximum (results[Symbol (s)][:cj ])
116118 plots[i] = plot_graph (g0, results[Symbol (s)][:Ijk ],
117119 geography = geographies[Symbol (s)], obstacles = obstacles[i] == " on" ,
118120 mesh = true , mesh_transparency = 0.2 ,
119- node_sizes = results[ Symbol (s)][ :cj ] ,
120- node_shades = g0[ :Zjn ], node_color = :seismic ,
121+ node_sizes = sizes, node_shades = shades ,
122+ node_color = :seismic ,
121123 edge_min_thickness = 1 , edge_max_thickness = 4 )
122124 title! (plots[i], " Geography $(s) " )
123125end
0 commit comments