A linear constraint restricts decision variables with a linear equality or inequality. Together with a linear objective function, linear constraints define a linear programming problem. section 2.1.4
Common constraint forms include:
- Minimum or maximum limits, such as protein of at least 22% or fiber of at most 5%. section 2.1.4
- Range constraints, such as calcium between 0.8% and 1.2%. section 2.1.4
- Equality constraints, such as requiring ingredient proportions to sum to one. section 2.1.4
- Non-negativity restrictions, which prevent negative decision-variable values. section 2.1.4
Animal feed mix
Choose proportions of corn, limestone, and soybean meal to minimize cost while satisfying calcium, protein, fiber, conservation, and non-negativity constraints. A PuLP model produces a mixture of 65% corn, 3% limestone, and 32% soybean meal, costing $0.4916 per kilogram. section 2.1.4
