Skip to content

Commit c465cb2

Browse files
committed
fix nortwestcorner loop
1 parent b2cbc04 commit c465cb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transportation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ function northwestcorner(t::TransportationProblem)::TransportationResult
235235
i = 1
236236
j = 1
237237

238-
while (i <= n) || (j <= m)
238+
while (i <= n) && (j <= m)
239239
amount = min(supply[i], demand[j])
240240
asgnmatrix[i, j] = amount
241241
supply[i] -= amount

0 commit comments

Comments
 (0)