Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/250234427

An Adjustable Nutrient Margin of Safety Comparison Using


Linear and Stochastic Programming in an Excel Spreadsheet

Article in The Journal of Applied Poultry Research · December 2007


DOI: 10.3382/japr.2007-00033

CITATIONS READS

17 2,055

3 authors, including:

Joseph Purswell
United States Department of Agriculture
176 PUBLICATIONS 2,252 CITATIONS

SEE PROFILE

All content following this page was uploaded by Joseph Purswell on 25 May 2018.

The user has requested enhancement of the downloaded file.


©2007 Poultry Science Association, Inc.

An Adjustable Nutrient Margin of Safety


Comparison Using Linear and Stochastic
Programming in an Excel Spreadsheet1

W. B. Roush,2 J. Purswell, and S. L. Branton

USDA, Agricultural Research Service, Poultry Research Unit,


Mississippi State University, Mississippi State 39762

Primary Audience: Nutritionists, Production Managers

SUMMARY
A stochastic-linear program Excel workbook was developed that consisted of 2 worksheets
illustrating linear and stochastic program approaches. Both approaches used the Excel Solver add-
in. A published linear program problem served as an example for the ingredients, nutrients, and
costs and as a benchmark in the development of the linear and stochastic programs. Standard
deviations for ME and nutrients were taken or calculated from CV, and from a commercial
publication of sources for amino acids. The Excel spreadsheet was set up so that the calculated
margin of safety (MOS) value, according to the requested probability, was the same for both the
linear and stochastic programs. As an example, the probability for meeting the nutrient value for
protein was compared at 50% (MOS = 0) and 69% (MOS = 0.5) by using both linear and stochastic
programming. Spreadsheet results illustrated the flexibility, accuracy, and precision of the
stochastic program over the linear program in meeting the requested nutrient probability.

Key words: linear program, stochastic program, margin of safety, diet formulation
2007 J. Appl. Poult. Res. 16:514–520
doi:10.3382/japr.2007-00033

DESCRIPTION OF PROBLEM gramming” is considered equivalent to the


terms “nonlinear stochastic programming” and
“chance-constrained programming,” as used in
“. . . I work on planning under uncer- other feed formulation publications.
tainty. That’s the big field as far as I’m The use of a margin of safety (MOS) was
concerned; that’s the future. Maybe I’m suggested by Nott and Combs [2] as a simple
the only one who says that.” George Dant- way to adjust the nutrient matrix to compensate
zig, Father of Linear Programming [1] for nutrient variability. To make the adjust-
Uncertainty and risk are inherent in biological ment, they suggested subtracting one-half of a
variability. Stochastic programming is a nonlin- SD from the mean value of nutrients. This
ear programming approach used to manage un- would increase the probability of meeting an
certainty and constrain risk when dealing with animal’s requirement from 50% for a linear
nutrient variability. The term “stochastic pro- program to greater than or equal to 69% for a

1
Mention of trade names or commercial products in this publication is solely for the purpose of providing specific information
and does not imply recommendation or endorsement by the USDA.
2
Corresponding author: BRoush@msa-msstate.ars.usda.gov

Downloaded from https://academic.oup.com/japr/article-abstract/16/4/514/759980


by guest
on 25 May 2018
ROUSH ET AL.: ADJUSTABLE NUTRIENT MARGIN OF SAFETY 515

Figure 1. Linear and stochastic program Visual Basic for Applications macros for Excel spreadsheets.

linear program adjusted for an MOS. An MOS The intent of this paper is to build on their
of 0.5 was chosen, most likely for ease of calcu- paper [11] by demonstrating a comparison of
lation. linear and stochastic programming with a single
Several papers and presentations have ad- problem, as proposed in their paper. Our hope
dressed stochastic programming as a method is that nutritionists and others involved in feed
of constraining the diet formulation risk of not manufacturing and the business of accurately
meeting the requested nutrient amounts [3, 4, feeding animals at a least cost will be able
5]. The philosophy of and assumptions about to make their own comparisons based on the
linear and stochastic programming are dis- illustrated principles.
cussed elsewhere [6, 7, 8, 9, 10].
Pesti and Seila [11] made a breakthrough MATERIALS AND METHODS
in showing how both linear and stochastic pro- A stochastic-linear program Excel work-
gramming could be formulated in an Excel book was developed, consisting of 2 work-
spreadsheet program. They used 2 problems sheets. The first worksheet was developed into
with different scenarios, one showing linear a linear program problem, and the second work-
programming, and the other showing stochas- sheet was developed into a stochastic program
tic programming. problem. Both approaches used the Solver

Downloaded from https://academic.oup.com/japr/article-abstract/16/4/514/759980


by guest
on 25 May 2018
516 JAPR: Research Report

Figure 2. Database spreadsheets for linear programming, including Microsoft Excel cell formulas (bottom spread-
sheet). Only protein is shown with its accompanying SD and margin of safety (MOS). The requested level of
probability for meeting the protein requirement was 69%. The resulting formulated probability was 77.26%.

function, an Excel add-in for optimization. The restrictions, and cost ($) per ingredient, as well
Visual Basic for Applications macros for Solver as the nutrient data. In this example, only the
associated with the linear and stochastic prob- nutrient data for protein and the associated SD
lems are shown in Figure 1. Solver is not always are shown. The calculated values, SD, re-
installed with Excel and must be installed as quested levels, and final MOS levels for sto-
an add-in. Instructions for installation can be chastic and linear programming are shown. The
found at the Web site http://support.microsoft. requested probability, the z-value, and the cal-
com/kb/843304 [12]. culated probability for the diet are shown. The
The spreadsheet data for the problems are spreadsheet below the data shows the formulas
shown in Figures 2 and 3 for solving the linear associated with the data values.
and stochastic programs, respectively. For both Figures 4 and 5 show the inputs and results
sheets, the data include the ingredients, cost for the linear and stochastic programs, respec-
per ton, amount (to be solved for), ingredient tively. Inputs to be entered included the re-

Downloaded from https://academic.oup.com/japr/article-abstract/16/4/514/759980


by guest
on 25 May 2018
ROUSH ET AL.: ADJUSTABLE NUTRIENT MARGIN OF SAFETY 517

Figure 3. Database spreadsheets for stochastic programming, including Microsoft Excel cell formulas (bottom
spreadsheet). Only protein is shown with its accompanying SD. The requested level of probability for meeting the
protein requirement was 69%. The resulting formulated probability was 69%, as requested.

quested nutrient, requested probability, and re- energy and nutrients were taken or calculated
strictions. The ingredient amounts, calculated from CV published by Zhang [13] and from a
nutrients, calculated probabilities, and cost of commercial publication of sources for amino
the diet were calculated after the linear or sto- acids [14], respectively. The Excel spreadsheet
chastic macros were activated. was configured so that the calculated MOS
The linear program problem proposed by value, according to the requested probability,
Pesti and Seila [11] served as an example for was the same for both the linear and stochastic
the ingredients, nutrients, and costs and as a programs. As an example, the probability for
benchmark in the development of the linear and meeting the nutrient value for protein was com-
stochastic programs. Standard deviations for pared at 50% (MOS = 0) and 69% (MOS = 0.5)

Downloaded from https://academic.oup.com/japr/article-abstract/16/4/514/759980


by guest
on 25 May 2018
518 JAPR: Research Report

Figure 4. Input spreadsheets for linear programming, including Microsoft Excel cell formulas (bottom spreadsheet).
The requested probability for protein was set at 69%. The result was an overformulated probability of 77.26%.

by using both linear and stochastic program- tions for the linear and stochastic programs in
ming. Sensitivity analysis was not addressed at the Excel spreadsheet were identical when the
this stage of program development. MOS values were set equal to zero (not shown).
This was expected because multiplication of
RESULTS AND DISCUSSION the MOS at a value of zero cancels out the
The results of the objective (minimization variance of the nutrients, and the nutrient mean
of cost), diet composition, and nutrient alloca- values remain as a linear program problem.

Downloaded from https://academic.oup.com/japr/article-abstract/16/4/514/759980


by guest
on 25 May 2018
ROUSH ET AL.: ADJUSTABLE NUTRIENT MARGIN OF SAFETY 519

Figure 5. Input spreadsheets for stochastic programming, including Microsoft Excel cell formulas (bottom spread-
sheet). The requested probability for protein was set at 69%. The formulated result was 69%.

Therefore, the objective result ($163.28) swers obtained by linear and stochastic pro-
matched the benchmark linear programming re- gramming. As shown in Figures 4 and 5, results
sult of the spreadsheet program described by for the objective equations (cost/ton) were
Pesti and Seila [11]. $165.776 for the linear program and $165.344
However, when insurance was incorporated for the stochastic program. Examination of the
in the formulation problem, such as a 69% requested and calculated probabilities revealed
chance of meeting the nutrient requirement of that the linear program overformulated at a
the animal, there was a difference in the an- probability of 77.26%, whereas the stochastic

Downloaded from https://academic.oup.com/japr/article-abstract/16/4/514/759980


by guest
on 25 May 2018
520 JAPR: Research Report

program produced the requested probability This study was designed to show the advan-
of 69%. tage of stochastic programming in controlling
However, should the formulator decide that nutrient variation. However, we also illustrate
77.26% is more appropriate for a particular nu- the accessibility of linear and nonlinear algo-
trient, then the stochastic program would more rithms through commonly available computer
accurately provide that probability. The linear spreadsheets, which allow application of these
program with an MOS would again overformu- formulation methods by companies in devel-
late at a higher than requested level of probabil- oping areas that do not have sophisticated soft-
ity. Stochastic programming provides more ware and have numerous ingredients that vary
flexibility, accuracy, and precision in meeting in quantity and quality.
the requested probability levels.

CONCLUSIONS AND APPLICATIONS


1. An Excel spreadsheet, with Solver as an add-in, was effectively developed to compare formula-
tion of a poultry diet with linear programming with an MOS and with stochastic programming.
2. The developed program allows the formulator to determine the level of probability for requested
nutrient specifications.
3. Results showed that at a requested probability level of 50%, both the linear program and the
stochastic program produced the same diet.
4. The linear program with an MOS was shown to overformulate the requested probability,
resulting in 77.26%, whereas the stochastic program formulated the requested probability
of 69%.

REFERENCES AND NOTES


1. Horner, P. 2005. George Bernard Dantzig (1914–2005): with stochastic programming or linear programming with a margin
Operations research loses a pillar of the profession. OR/MS Today of safety. Poult. Sci. 73:1290–1295.
32:24–32.
8. Roush, W. B., R. L. Stock, T. L. Cravener, and T. H.
2. Nott, H., and G. F. Combs. 1967. Data processing feed D’Alfonso. 1994. Using chance constrained-programming for ani-
ingredient composition data. Feedstuffs 39:21–22. mal feed formulation at Agway. Operations Research Society/The
Institute of Management Sciences. Interfaces 24:53–58.
3. Van de Panne, C., and W. Popp. 1963. Minimum cost cattle
feed under probabilistic protein constraints. Manage. Sci. 9:405– 9. Roush, W. B., T. L. Cravener, and F. Zhang. 1996. Com-
430. puter formulation observations and caveats. J. Appl. Poult. Res.
5:116–125.
4. St. Pierre, N. R., and W. R. Harvey. 1986. Incorporation
of uncertainty in composition of feed into least cost ration models. 10. Roush, W. B. 2001. Stochastic programming has implica-
1. Single chance constrained programming, and 2. Joint chance tions for precision feeding. Feedstuffs 73:14, 15.
constrained programming. J. Dairy Sci. 69:3051–3073. 11. Pesti, G. M., and A. F. Seila. 1999. The use of an electronic
5. St. Pierre, N. R. 1991. Ration balancing: From costs to spreadsheet to solve linear and non-linear “stochastic” feed formula-
profits. Pages 73–80 in Proc. 1991 Maryland Nutr. Conf. Feed tion problems. J. Appl. Poultry Res. 8:110–121.
Manuf., College Park, MD. Univ. Maryland, College Park. 12. Microsoft. 2006. How to create Visual Basic macros by
6. D’Alfonso, T. H., W. B. Roush, and J. A. Ventura. 1992. using Excel Solver in Excel 97. http://support.microsoft.com/kb/
Least cost poultry rations with nutrient variability: A comparison 843304 Accessed Feb. 28, 2007.
of linear programming with a margin of safety and stochastic pro- 13. Zhang, F. 1999. Stochastic models and software design for
gramming models. Poult. Sci. 71:255–262. feed formulation. PhD Diss. Penn State Univ., University Park, PA.
7. Cravener, T. L., W. B. Roush, and T. H. D’Alfonso. 1994. 14. Degussa. 2001. The Amino Acid Composition of Feed-
Laying hen production responses to least cost rations formulated stuffs. 5th rev. ed. Degussa Corp., Feed Addit., Kennesaw, GA.

Downloaded from https://academic.oup.com/japr/article-abstract/16/4/514/759980


by guest
on 25 May 2018
View publication stats

You might also like