Optimization, Operations Research, Data Science, Hands On Tutorials, Python.
pyo.Objective(expr=sum(model.x[i, j] * model.c[i, j] for (i, j) in model.x), sense=pyo.minimize) sol = cbc.solve(model, tee=False) And in this example, I will export my results to a pandas DataFrame for better visualization. results = pd.DataFrame(index=model.I, columns=model.J) for i, j in