Skip to content

Commit 9e1fb4d

Browse files
committed
Minors.
1 parent 0f8d2b2 commit 9e1fb4d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

examples/paper_example02.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ param, g = create_graph(param, width, height, type = "triangle") # case with ran
1717

1818
Random.seed!(5)
1919
minpop = minimum(param[:Lj])
20-
param[:Zjn] = minpop .* ones(g[:J]) # matrix of productivity
20+
param[:Zjn] = fill(minpop, g[:J], 1) # matrix of productivity
2121

2222
Ni = find_node(g, ceil(width/2), ceil(height/2)) # find center
2323
param[:Zjn][Ni] = 1 # more productive node
@@ -34,6 +34,8 @@ for i in 1:nb_cities-1
3434
end
3535
end
3636

37+
param[:hj] = param[:Hj] ./ param[:Lj]
38+
param[:hj][param[:Lj] .== minpop] .= 1
3739

3840
# Convex case
3941
results = Vector{Any}(undef, 3)

0 commit comments

Comments
 (0)