Skip to content

Commit f330ca4

Browse files
committed
Ensure productivity parameter is matrix.
1 parent cb6ca79 commit f330ca4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/optimal_network.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,14 @@ plot_graph(graph, results[:Ijk])
3131
function optimal_network(param, graph; I0=nothing, Il=nothing, Iu=nothing, verbose=false, return_model=0, solve_allocation = false)
3232

3333
# I0=nothing; Il=nothing; Iu=nothing; verbose=false; return_model = false; return_model = 0;
34+
# Check param.Zjn and make matrix if vector:
35+
if length(size(param[:Zjn])) == 1
36+
param[:Zjn] = reshape(param[:Zjn], param[:J], 1)
37+
end
3438
graph = dict_to_namedtuple(graph)
3539
param = dict_to_namedtuple(param)
3640
edges = represent_edges(graph)
37-
41+
3842
J = graph.J
3943
error_status = false
4044

0 commit comments

Comments
 (0)