Skip to content

Commit 6cb1674

Browse files
committed
Move seed.
1 parent de9e6b0 commit 6cb1674

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/example04.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ import Random
88

99
# Init and Solve network
1010

11-
param = init_parameters(K = 100, labor_mobility = false,
11+
param = init_parameters(K = 100, labor_mobility = false,
1212
N = 1, gamma = 1, beta = 1, duality = false)
1313
w = 13; h = 13
1414
param, graph = create_graph(param, w, h, type = "map")
1515

1616
# ----------------
1717
# Draw populations
1818

19-
Random.seed!(5)
2019
param[:Zjn] = ones(param[:J], 1) .* 1e-3 # matrix of productivity (not 0 to avoid numerical glitches)
2120
param[:Lj] = ones(param[:J]) .* 1e-3 # matrix of population
2221

2322
Ni = find_node(graph, ceil(w/2), ceil(h/2)) # center
2423
param[:Zjn][Ni] = 1 # more productive node
2524
param[:Lj][Ni] = 1 # more productive node
2625

26+
Random.seed!(5)
2727
ncities = 20 # draw a number of random cities in space
2828
for i in 1:ncities-1
2929
newdraw = false

0 commit comments

Comments
 (0)