Skip to content

Commit fd5c3d6

Browse files
committed
Model should not be silent upon return.
1 parent 5cf4e5a commit fd5c3d6

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/main/optimal_network.jl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ function optimal_network(param, graph; I0=nothing, Il=nothing, Iu=nothing, verbo
6969
auxdata = create_auxdata(param, graph, edges, I0)
7070
model, recover_allocation = get_model(param, auxdata)
7171

72-
if !verbose
73-
set_silent(model)
74-
end
75-
7672
if return_model == 1
7773
return model, recover_allocation
7874
end
7975

76+
if !verbose
77+
set_silent(model)
78+
end
79+
8080
# --------------------
8181
# NETWORK OPTIMIZATION
8282

@@ -184,6 +184,9 @@ function optimal_network(param, graph; I0=nothing, Il=nothing, Iu=nothing, verbo
184184
end
185185

186186
if return_model == 2
187+
if !verbose
188+
unset_silent(model)
189+
end
187190
return results, model, recover_allocation
188191
end
189192
return results

0 commit comments

Comments
 (0)