The problem it solves
A feed must contain enough energy, protein, amino acids, minerals and other nutrients. Many different mixes of raw materials meet these limits. Their costs are different. Raw material prices change every week, so the cheapest mix today may not be the cheapest mix next month. A nutritionist cannot test all mixes by hand. The calculation does it in less than a second.
How the calculation works
The method is called linear programming. You give it three things:
- The raw materials you can use, with their nutrient values and prices.
- The limits of the formula: the minimum and maximum of each nutrient, and the minimum and maximum share of each raw material.
- The goal: the lowest cost per tonne.
The result is the share of each raw material in the formula.
A small example
You have two raw materials. Corn has 8.5% protein and costs 200 per tonne. Soybean meal has 46% protein and costs 400 per tonne. The feed needs at least 20% protein. The cheapest mix that meets the limit is 69.3% corn and 30.7% soybean meal. It costs 261.33 per tonne. A real formula has 20 or more raw materials and 30 or more limits, but the principle is the same.
Why the cheapest raw materials do not give the cheapest formula
A raw material is worth what its nutrients are worth in your formula. A material with a high price can lower the cost of the formula if it brings a nutrient that is expensive to get from other materials. A cheap material can raise the cost if it forces you to add something expensive to correct the formula. The calculation compares all of this at once.
What a limit costs
The result also shows the cost of each limit. In the example above, each extra percentage point of protein adds 5.33 to the cost per tonne. This number is called a shadow price. It tells you which limits are expensive, so you can check if each of them is really needed.
Where least-cost formulation stops
The basic method has three limits of its own:
- It works with average nutrient values. Real raw materials vary from one delivery to the next. Stochastic optimization takes this into account.
- It calculates one formula at a time. When several formulas share a raw material that is in short supply, they must be calculated together.
- It gives shares such as 0.37%. Production needs amounts that a scale can weigh, so the result is rounded for the batch size.
Least-cost formulation in AFOS
AFOS calculates least-cost formulas in the browser. It also has stochastic optimization, AFOS Suggestions that shows the cost of each limit, and Production Schedule Optimizer that calculates several formulas together.