Lp, Linear Programming, Machine Learning, Python, Pulp.
function. We want to minimize the sum of the costs. transport_prob += x11*C11 + x12*C12 + x13*C13 + x21*C21 + x22*C22 + x23*C23 + x31*C31 + x32*C32 + x33*C33 The last step before solving the problem is setting the constraints. As we did with the target function, we just add them to the model.