Optimization, Python, Linear Optimization, Operations Research.
(4,1):8, (4,2):5, (4,3):3, (5,1):10, (5,2):8, (5,3):4 } # transportation costs SciPy # to be used in SciPy we must transform cost dictionary into 2D aray cost2d = np.empty([len(I), len(J)]) for i in range(len(I)): for j in range(len(J)): cost2d[i,j] = cost[i+1,j+1] Pyomo from pyomo import environ