Skip to content

Commit d1fa110

Browse files
committed
introduce nortwestcorner start values in transportation solver
1 parent fcc787b commit d1fa110

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/transportation.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,13 @@ function solve(t::TransportationProblem)::TransportationResult
151151
@constraint(model, sum(x[1:n, j] for j = 1:p) .== newt.supply)
152152
@constraint(model, sum(x[i, 1:p] for i = 1:n) .== newt.demand)
153153

154+
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
160+
154161
optimize!(model)
155162

156163
solution = value.(x)

0 commit comments

Comments
 (0)