Skip to content

Commit 28fdd9d

Browse files
committed
setting start values using broadcast in transportation
1 parent d1fa110 commit 28fdd9d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/transportation.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,7 @@ function solve(t::TransportationProblem)::TransportationResult
152152
@constraint(model, sum(x[i, 1:p] for i = 1:n) .== newt.demand)
153153

154154
initial_solution = northwestcorner(newt).solution
155-
for i in 1:n
156-
for j in 1:p
157-
JuMP.set_start_value(x[i, j], initial_solution[i, j])
158-
end
159-
end
155+
JuMP.set_start_value.(x, initial_solution)
160156

161157
optimize!(model)
162158

0 commit comments

Comments
 (0)