def NorthWest():
    ''' The simplest method to get an initial solution.
    Not the most efficient'''
    global aRoute
    u  = 0
    v  = 0
    aS = [ 0] * m
    aD = [ 0] * n
    while u <= n - 1 and v <= m - 1:
        if aDemand[ v] - aS[ v] < aSupply[ u] - aD[ u]:
            z              = aDemand[ v] - aS[ v]
            aRoute[ u][ v] = z
            aS[ v]        += z
            aD[ u]        += z
            v             += 1
        else:
            z              = aSupply[ u] - aD[ u]
            aRoute[ u][ v] = z
            aS[ v]        += z
            aD[ u]        += z
            u             += 1
 The simplest method to get an initial solution.
    Not the most efficient
recipes/Python/576575_Stepping_stone_algorithum_solving_transhipment/recipe-576575.py