Optimization, Operations Research, Data Science, Hands On Tutorials, Python.
respecting suppliers' capacities (inequality). def availability_rule(model, i): return sum(model.x[i, j] for j in model.J) <= model.b[i] model.availability_constr = pyo.Constraint(model.I, rule=availability_rule) def demand_rule(model, j): return sum(model.x[i, j] for i in model.I) == model.d[j]