Optimization, Python, Linear Optimization, Operations Research.
pe.Constraint(model.d_cust_demand, rule = meet_demand) # Constraints: sum of goods <= factory capacity def meet_capacity(model, factory): sum_of_goods_for_customers = sum(model.x[customer,factory] for customer in model.d_cust_demand) factory_capacity = model.fact_capacity[factory] return