Computer Feed Formulation - Under Construction

Introduction

Computer programs that formulate animal rations use terms such as dry matter percentage, dry matter price, nutrient concentration, least-cost balanced ration, linear programming, etc. This paper defines these terms and shows relationships between them. There is also an explanation of how linear programming restricts feeds and nutrients and optimizes properties of rations other than cost. What is not included are topics about the health, growth, and production of animals. 

Basic Terminology
The first six topics in this paper, from “Weights and dry matter” to “Linear programming”, cover the basic terminology and ideas that are common to all feed formulation programs. The remaining topics are mostly independent of one another and may be read in any order. Many of the topics in this paper are well-known; some -- like “Restricting dry matter in a ration”, “Requirement feeding” and “Optimizing properties of a ration” -- are less well-known. The topic “Feeding animals with fixed intake” is believed to be new. 

Special Note
In this paper, water is a nutrient, but not a feed. There are two reasons why water will not be considered a feed. Firstly, it is unusual in the literature of feed formulation to see water listed as one of the feeds making up an animal ration. The second and more important reason is that some calculations made by computer feed formulation programs involve division by the dry matter weight of a feed, and the dry matter weight of water is zero.

Contents

Basic Terminology



Weights and dry matter 

feed  is an ingredient or material (other than water, as explained earlier) fed to animals for the purpose of sustaining them. The term feed will include basic ingredients, such as alfalfa hay and limestone, as well as mixtures of basic ingredients, which are called rations, such as vitamin and mineral supplements and complete rations. Feeds are customarily weighed in pounds, kilograms or (American or metric) tons; and the pound, kilogram or ton is the unit of weight of the feed.

Suppose a container holds AF# pounds of a feed and after all moisture has been removed it holds DM# pounds of the feed. Then AF# is the as fed weight of the feed (in pounds), and DM# is the dry matter weight of the feed (in pounds).

Clearly, for a given amount AF# of feed, 0 < DM# < AF#. Then multiplication by 100 / AF# shows

0 < 100 • DM# / AF# < 100

provided AF# > 0

The expression 100 • DM# / AF# is the dry matter percentage of the feed and is written DRY = 100 • DM# / AF#, or 

(1) DM# = AF# • (DRY / 100)

Equation(1) is independent of the unit of weight. That is, it is valid if weight is measured in pounds (lb), kilograms (kg), or tons (ton). The number DRY is a property of the feed and does not depend on the amount of feed in the container. The number 100 - DRY is the moisture percentage of the feed and is written MOIST = 100 - DRY.

Suppose a container holds AF# > 0 pounds of feed and, after all of the moisture has been removed, it holds DM# pounds of feed. Then DM# > 0, because water is the only material that has 100% moisture, and we have agreed that water is not a feed. Therefore, if a container holds AF# > 0 pounds of feed, then

0 < DM# < AF#
0 < DRY < 100
0 < MOIST < 100 


Feed cost and feed prices

Suppose a container holds AF# > 0 pounds (lb) of feed and, after all moisture has been removed from the feed, it holds DM# > 0 pounds of feed. If the feed in the container can be purchased for C dollars, then C is the feed cost (in $), C / AF# is the as fed price of the feed (in $/lb), and C / DM# is the dry matter price of the feed (in $/lb). These prices will be written AF$ and DM$, respectively. That is,

(2) AF$ = C / AF# 
    DM$ = C / DM#

Since AF$ • AF# = C = DM$ • DM#, the cost of the feed is

(3) AF$ • AF# = DM$ • DM#

Equation (3) shows that the cost of the feed is price times weight, and it does not matter if price and weight are on an as fed basis or on a dry matter basis. Equation (3) is valid if the unit of cost is the dollar ($), the euro (€) or the peso (P). Equations (1) and (3) show that

(4) AF$ = DM$ • (DRY / 100)

Equation (4) is valid if price is measured in $/lb, €/kg or P/ton

If Feed i has as fed weight AFi# > 0, dry matter weight DMi# > 0 and costs Ci dollars, for i = 1, 2, ..., n, then a mixture that consists of AFi# pounds of Feed i, for i = 1, 2, ..., n, has as fed price 

(C1 + C2 + ... + Cn) / (AF1# + AF2# + ... + AFn#)
 
and dry matter price 

(C1 + C2 + ... + Cn) / (DM1# + DM2# + ... + DMn#)


Nutrients and units

On page 70 of Feeds & Nutrition - Complete, first edition 1978, Ensminger and Olentine say “By definition, nutrients are the chemical substances found in feed materials that can be used and are necessary for the maintenance, production, and health of animals. The chief classes of nutrients are carbohydrates and fats (energy), proteins, minerals, vitamins, and water.”

Nutrients can be numerically measured. The unit of a nutrient is a name that suggests the method by which the nutrient is measured, and the quantity of a nutrient in a container of feed is the number that results from the measurement of the nutrient.

It is assumed that nutrient quantities can be added: If X pounds of Feed A with quantity P of nutrient N is mixed with Y pounds of Feed B with quantity Q of nutrient N, the resulting X + Y pounds of the mixture will have quantity P + Q of nutrient N. Also, nutrient quantities can be multiplied: If a > 0 and X pounds of Feed A has quantity P of nutrient N, then a • X pounds of Feed A will have quantity a • P of nutrient N. Finally, nutrient quantities are consistent: if X kg of Feed A has quantity Q of P, then any other sample of X kg of Feed A has quantity Q of P

(These properties of nutrients, which are often assumed automatically by computer feed formulation programs, are ideals or approximations. For practical objections to the additive and multiplicative rules, see the later topic “Variable nutrient concentrations”, while the topic “Stochastic feed formulation” questions the consistency rule.)

The following are some nutrient units: A unit of energy is the kilocalorie (kcal) or megacalorie (Mcal), and a unit of protein is the gram (g) or kilogram (kg). Minerals are measured in milligrams (mg), and vitamins are measured in micrograms (µg), milligrams (mg) or international units (IU). Water is measured in pounds (lb) or kilograms (kg).

The above list shows that many nutrient units are names of weights like the gram, kilogram or pound. For an example of nutrient quantities, a container of feed could have 5000 kcal of energy, 3 kg of protein, 20 g of magnesium, 400 IU of Vitamin A, and 8 kg of water.


Nutrient concentrations

Suppose a container holds AF# > 0 pounds of feed and, after all moisture has been removed from the feed, it holds DM# > 0 pounds of feed. If A is the quantity of a nutrient in the container, then A / AF# is the as fed concentration of the nutrient in the feed, and A / DM# is the dry matter concentration of the nutrient in the feed. These concentrations will be written AN* and DN*, respectively. That is,

(5) AN* = A / AF# 
    DN* = A / DM#

If the unit of a nutrient is the same as the unit of weight of the feed containing the nutrient, then the as fed percentage of the nutrient is 100 AN* and the dry matter percentage of the nutrient is 100 • DN*. For example, suppose a container of feed has 5000 kcal of energy, 3 kg of protein, 20 g of magnesium, 400 IU of vitamin A, and 8 kg of water. If the as fed weight of the feed is 100 kg, then the as fed concentrations are 50 kcal/kg energy, 0.03 kg/kg (= 3%) protein, 0.2 g/kg (= 200 mg/kg or 200 ppm) magnesium, 4 IU/kg vitamin A, and 0.08 kg/kg (= 8%) water, 

Equation (5) can be written 

(6) A = AN* • AF# = DN* • DM#

Equation (6) shows that the quantity of a nutrient is concentration times weight, whether weight and concentration are on an as fed basis or dry matter basis. Equations (1) and (6) show that

(7) AN* = DN* • (DRY/100) 
    100 • AN* = 100 • DN* • (DRY / 100)

Many tables give the nutrient concentrations or nutrient percentages of feeds. Some tables show them on an as fed basis, and some show them on a dry matter basis. Equation (7) is used to convert nutrient concentrations and nutrient percentages from one basis to the other.

If Feed i has concentration Ci of nutrient N, for i = 1, 2, ..., k, then a mixture that consists of Xi pounds of Feed i, for i = 1, 2, ..., k, will have the following concentration of nutrient N.

(8) (C1 • X1 + C2 • X2 + ... + Ck • Xk)/(X1 + X2 + ... + Xk)

This formula is established by the following argument in which all weights and concentrations are on an as fed basis, or all weights and concentrations are on a dry matter basis.

By Equation (6), Ci • Xi is the quantity of nutrient N in Xi pounds of Feed i, for i = 1, 2, ..., k. Since nutrient quantities can be added, C1 • X1 + C2 • X2 + ... + Ck • Xk is the quantity of nutrient N in X1 + X2 + ... + Xk pounds of the mixture. By Equation (5), the concentration of nutrient N in the mixture is given by Equation (8).

Top

Nutrient prices

When formulating animal rations it is important to find inexpensive sources of nutrients. For example, needing more protein in a ration, it would be helpful to compare feeds high in protein and tell which of them is the most economical source of protein. That is, which feed has the smallest “price of protein” in the sense of the following definition. 

If AF$ is the as fed price of a feed, and AN* > 0 is the as fed concentration of nutrient N in the feed, then the price of nutrient N in the feed is AF$ / AN*. In the case AN* = 0, the “price of nutrient N” is not defined (or is infinite).

To justify this definition, suppose k1 > 0 and k2 > 0 are numbers such that k1 • AF$ is the as fed price of a feed in $/kg and k2 • ANi* > 0 is the as fed concentration of nutrient N in the feed in units of N/kg. Then

The cost of 1 kg of the feed is 

k1 • AF$ • (1 kg)

But 1 kg of the feed contains k2 • AN* • (1 kg) units of N. Therefore, the cost of k2 • AN* • (1 kg) units of N is 

k1 • AF$ • (1 kg)

Dividing by k2 • AN* • (1 kg), the cost of 1 unit of N is 

k1 • AF$ • (1 kg) / k2 • AN* • (1 kg)

or, the cost of 1 unit of N is


(k1 / k2) • (AF$ / AN*)

Since k1 / k2 is a constant, the feed with the smallest nutrient price (AF$ / AN*) will also have the smallest cost of one unit of N, and this feed will be the most economical source of nutrient N.

When AN* > 0, dividing Equation (4) by Equation(7) gives

(9) AF$ / AN* = DM$ / DN*

showing that the price of a nutrient does not change if the quantities are on a dry matter basis.


NOTE: To see all nutrient prices, click By Nutrient in the MixitWin window. Then select a nutrient in the drop down box, and scroll to the rightmost column of the ingredient table.

Dry matter intake (DMI) is the dry matter amount of a feed that an animal consumes in a day. If an animal consumes AF# kg of a feed, then Equation (1) shows that DMI = DM# kg. Dry matter intake depends on many factors including animal type, feed type, and feeding environment. 

The daily amount (DA) of a nutrient is the number of grams, kilograms or pounds of the nutrient that an animal requires or consumes in one day. The daily amount that an animal consumes depends on the nutrient content of the ration and the animal’s dry matter intake. The daily unit is how the daily amount of a nutrient is measured. Some examples of daily units are grams per day (g/day), mega calories per day (mcal/day), and international units per day (IU/day).

Suppose a container holds AF# > 0 kg of feed and, after all moisture has been removed from the feed, it holds DM# > 0 kg of feed. If A is the quantity of a nutrient in the container, then Equation(6) shows that A = DN* • DM#, where DN* is the dry matter concentration of the nutrient in the feed. If AF# is the total amount of feed that the animal consumes in a day, then DM# = DMI and A = DA. The daily amount of a nutrient in a feed is therefore

(10) DA = DN* • DMI

where DN* is the dry matter concentration of the nutrient in the feed and DMI is the dry matter
intake of the animal.

Care must be taken with the units of DN* and DMI. For example, if DN* = 20% and DMI = 3
kg, then

DA = (20%) • (3kg/day) = (200g/kg) • (3kg/day) = 600 g/day


Linear programming

Given N feeds, each containing M nutrients, the feed-mix problem is to find the as fed weights X1, X2, ..., XN of these feeds that satisfy certain feed and nutrient restrictions at minimum cost. For example, suppose three feeds have the protein concentrations and feed prices shown below.

 Feed  Protein  Price
       (as fed) (as fed)
Feed A    5%    $3.00/lb
Feed B    8%    $5.00/lb
Feed C    9%    $6.00/lb

A feed-mix problem is to find a 100-pound mixture of these feeds that has between 7% and 8% protein, at least 50% of Feed B, and is not more expensive than any other 100-pound mixture of these three feeds that satisfy these feed and nutrient restrictions. A feed mixture is a balanced ration if it satisfies the feed and nutrient restrictions, and is a least-cost balanced ration if no other balanced ration has a smaller feed cost. This problem, whose solution (33.33 lb of Feed A and 66.67 lb of Feed B) is difficult to guess, is a simple feed-mix problem. Typical feed-mix problems have ten to twenty feeds and ten to twenty nutrients with minimum or maximum restrictions. Practical feed-mix problems are so large that only computers can solve them. 

Feed mix problems are solved by a mathematical technique called linear programming, which can be used to restrict feeds, nutrients, ratios of feeds and ratios of nutrients on an as fed or dry matter basis. Linear programming can also be used to solve multiple feed-mix problems when feed inventory is limited, and to optimize feed properties other than cost. In the present case, the linear programming method assumes that the solution is Xa pounds of Feed A, Xb pounds of Feed B, and Xc pounds of Feed C, where initially Xa, Xb and Xc are unknown as fed weights, and sets up the following conditions.

Minimize: Z = 3.00Xa + 5.00Xb + 6.00Xc

Subject to:  Xa + Xb + Xc = 100
                  Xb      > 50 
    .05Xa + .08Xb + .09Xc > 7
    .05Xa + .08Xb + .09Xc < 8

The function Z, called the objective function, is the feed cost that is to be minimized. The equality says that the ration must have exactly 100 pounds of as fed weight, followed by an inequality, called a feed restriction or feed constraint that says at least 50 of these 100 pounds must come from Feed B. The last two inequalities are nutrient restrictions or nutrient constraints and say that the ration must have at least 7% protein and at most 8% protein on an as fed basis. The coefficients of the X’s are then placed in a matrix and a solution is found by a procedure called the simplex algorithm. (See books on business mathematics for details.)

Top

Restricting dry matter in a ration

Some linear programming procedures restrict the as fed concentrations of nutrients and others restrict the dry matter concentrations of nutrients. Regardless of which linear programming procedure you are using, it is possible to restrict the dry matter percentage of a least-cost balanced ration to a number between MIN and MAX

(10) MIN < DMP < MAX

where DMP > 0 is the dry matter percentage of the balanced ration and 0 < MIN < MAX < 100. Restricting the dry matter percentage of a ration is the same as restricting its moisture percentage since moisture % = 100 - dry matter %.

As fed concentrations of nutrients are restricted

Define a nutrient with the name Dry Weight and unit %. For each feed Fi, set the as fed concentration of Dry Weight to Di, where Di is the dry matter percentage of Fi. By Equation (7), the dry matter concentration of Dry Weight is

 DN* = AN* • (100 / DRY) = Di • (100 / Di) = 100

That is, for each feed, the as fed concentration of Dry Weight is the dry matter percentage of the feed, and the dry matter concentration of Dry Weight is 100.

If the linear programming procedure restricts the as fed concentrations of nutrients, the following inequality can be used to restrict the as fed concentration of Dry Weight to a number between MIN and MAX.

MIN < Dry Weight < MAX

Since the as fed concentration of Dry Weight in the balanced ration is DMP, the last inequality is the same as Inequality (10).

Use Dry Weight when the as fed concentrations of nutrients are restricted. Use Wet Weight, explained below, when the dry matter concentrations of nutrients are restricted. 

NOTE: In MixitWin, it is simplest to set the dry matter concentration of Dry Weight to 100 for each ingredient, and to set the as fed concentration of Wet Weight to 1 for each ingredient. 

Top

Dry matter concentrations of nutrients are restricted

Define a nutrient with the name Wet Weight and unit %. For each feed Fi, set the dry matter concentration of Wet Weight to 100/Di, where Di is the dry matter percentage of Fi. (100/Di is the number of pounds of Fi that is required to produce one pound of dry matter.) By Equation (7), the as fed concentration of Wet Weight is 

AN* = DN* • (DRY / 100) = (100 / Di) • (Di / 100) = 1 

That is, for each feed, the dry matter concentration of Wet Weight is 100 divided by the dry matter percentage of the feed, and the as fed concentration of Wet Weight is 1.

If the linear programming procedure restricts the dry matter concentrations of nutrients, the following inequality can be used to restrict the dry matter concentration of Wet Weight to a number between 100 / MAX and 100 / MIN.

100 / MAX < Wet Weight < 100 / MIN

Since the dry matter concentration of Wet Weight in the balanced ration is 100 / DMP, the last inequality is the same as

(11) 100 / MAX < 100 / DMP < 100 / MIN

The following calculation shows that Inequalities (10) and (11) are equivalent, and therefore the dry matter percentage of a balanced ration can always be restricted to a number between MIN and MAX, as long as a balanced ration is possible.

100 / MAX < 100 / DMP < 100 / MIN
  1 / MAX < 1 / DMP   <   1 / MIN 
      MIN <   DMP     <       MAX  

NOTE: An alternate approach is to restrict the moisture percentage of a ration by defining two nutrients, Wet Percent and Dry Percent, whose as fed and dry matter percentages are MOIST = 100 - DRY and MOIST • (100 / DRY), respectively, and using the equivalent inequalities

MIN < Wet Percent < MAX

100 • MIN < Dry Percent < 100 • MAX
100 - MIN                 100 - MAX

Wet weight is consistent

The previous sections showed how Dry Weight and Wet Weight are used to restrict the percentage of dry matter in a ration when the nutrient constraints of a ration are on an as fed or dry matter basis, respectively. This section shows that defining the dry matter concentration of Wet Weight in Feed i as 100 / Di causes the dry matter concentration of Wet Weight of a mixture of these feeds to be 100 / DMP.

Suppose Feed i has dry matter percentage Di for i = 1,2. Then a mixture of X1 kg of Feed 1 and X2 kg of Feed 2 has dry matter percentage 

DMP = D1 • X1 + D2 • X2
           X1 + X2 

If Ci is the dry matter concentration of nutrient N in Feed i, then Equation (8) shows that the dry matter concentration of N in a mixture of X1 kg of Feed 1 and X2 kg of Feed 2 has dry matter concentration

CON = C1 • D1 • X1 + C2 • D2 • X2 
           D1 • X1 + D2 • X2

If, for i = 1,2, we set Ci = 100 / Di, which is the dry matter concentration of Wet Weight in Feed i, then 

CON =  100 • (X1 + X2)  = 100 
      D1 • X1 + D2 • X2   DMP

which is the dry matter concentration of Wet Weight in the mixture. 


Similarly, defining the as fed concentration of Dry Weight in Feed i as Di causes the as fed concentration of Dry Weight of a mixture of these feeds to be DMP, as shown next.

If Ci is the as fed concentration of a nutrient N in Feed i, then Equation (8) shows that the as fed concentration of N in a mixture of X1 kg of Feed 1 and X2 kg of Feed 2 is

CON = C1 • X1 + C2 • X2 
           X1 + X2

and if we set Ci = Di, which is the as fed concentrations of Dry Weight in  Feed i, then

CON = D1 • X1 + D2 • X2 = DMP
           X1 + X2

which is the as fed concentrations of Dry Weight in the mixture. 


Restricting Feeds - Under Construction

Restricting classes of feeds - Under Construction
Restricting by ratios of nutrients - Under Construction
Restricting by limiting nutrients - Under Construction

Variable nutrient concentrations - Under Construction

Stochastic feed formulation - Under Construction







http://www.agriculturalsoftwareconsultants.com/contact

Least cost feed formulation software since 1979.