Agricultural and Food Science, Vol. 19 (2010): 193-206 A G R I C U L T U R A L A N D F O O D S C I E N C E Vol. 19(2010): 193–206. 193 © Agricultural and Food Science Manuscript received May 2008 Multi-step beef ration optimisation: application of linear and weighted goal programming with a penalty function Jaka Žgajnar*, Emil Erjavec and Stane Kavčič University of Ljubljana, Biotehnical Faculty, Groblje 3, SI-1230 Domžale, Slovenia, *e-mail: jaka.zgajnar@bfro.uni-lj.si The aim of this paper is to present the method and tool for optimisation of beef-fattening diets. Changes in policy environment and changes in costs of feed pose challenges for farm efficiency. We construct a spreadsheet from two modules based on mathematical deterministic programming techniques. In order to obtain an estimate of the magnitude of costs that may be incurred, the first module utilizes a linear program for least-cost ration formulation. The resulting value is then targeted as a cost goal in the second module. This is supported by weighted goal programming with a penalty function system. The approach presented here is an example of how a combination of mathematical programming techniques might be applied to prepare a user-friendly tool for ‘optimal’ ration formulations. We report results that confirm this approach as useful, since one is able to formulate a least-cost ration without risking a decrease in the ration’s nutritive value or affecting the balance between nutrients. Key-words: linear programming, weighted goal programming, penalty function, spreadsheet ration optimi- sation, beef farming, beef economics A G R I C U L T U R A L A N D F O O D S C I E N C E Žgajnar, J. et al. Multi-step beef ration optimisation 194 A G R I C U L T U R A L A N D F O O D S C I E N C E Vol. 19(2010): 193–206. 195 Introduction The economic position of the EU beef sector has significantly changed in the past few years. This is mainly due to gradual abolition of production cou- pled with budgetary support. In addition, increased pressures from internal and world markets as a result of trade liberalisation, BSE disease impacts and changes on world supply and demand sides have led to marked market fluctuations, for which most EU beef farmers are not a match (Binfield et al. 2004, Balkhausen et al. 2005, Breen et al. 2005). Together with direct consequences on the beef market, other influences will present an increasing economic challenge for beef farmers. One of them is a further reform of the common agricultural policy in relation to the growing importance of renewable energy that is going to be put into play. Energy crop production has come to offer an alternative for agricultural enterprises, as it opens up new income sources for farmers other than simple food production. At the same time, the additional demand for crops for energy uses will lead to higher prices, and therefore better economic positions for arable farmers (Zeller and Häring 2007). This non-feed production and price increase will definitely cause significant issues for the livestock sector, where cereals and other feed crops are indispensable inputs for feed rations. In addition to changes in economic conditions, beef farmers will also increasingly face a growing demand to meet numerous public goals—many of which that, until now, have not been important is- sues (Tozer and Stokes 2001). Most of them could be summarised with a public goods and externali- ties concept. Environmental issues especially are an important field where positive and negative externalities occur. An unbalanced feed ration could be characterised as a twofold problem. In the first place, underfeeding or overfeeding both cost money, but each case can also have a negative impact on the environment. Overfeeding of some nutrients ultimately leads to an excess of unutilised nutrients, which can lead to pollution of soils and underground water. Both imbalances result in dete- rioration of animal welfare, one of the concepts of cross-compliance that should be met by EU farms to justify direct payment subsidies. However, both of these issues are beyond the scope of this paper. At the same time, climate changes are also hap- pening. On the one hand, livestock production is the one sector within EU agriculture that is hav- ing the most significant impact on greenhouse gas (GHG) emissions (De Cara et al. 2005). In view of this, ration formulation might be an important option for mitigation. Brink et al. (2001) pointed out an especially positive effect of the energy–pro- tein ration balance on resulting GHG production. However, pollution by GHG aside, agriculture is also one sector that is expected to be severely af- fected by climate changes due to atmospheric GHG increases. Climatologists are predicting more fre- quent droughts and floods, and are therefore rec- ommending that crop rotations should be adjusted accordingly. In relative terms, this means that ad- aptation to climate change will also be an effective means of reducing risk. The above mentioned specifics are only some of the reasons why livestock ration formulation is becoming increasingly important in management of the beef sector. In the literature, we can find nu- merous examples where mathematical techniques have been used to solve nutrition management problems. The most frequent mathematical technique used is that of deterministic linear programming (LP). This is a classical approach for formulation of animal diets and is also an appropriate tool for optimising human nutrition (Darmon et al. 2002). When focusing only on livestock diets, one finds that the most frequent use of the LP technique in- volves the least-cost ration formulation. It was first used by Waugh (1951), who optimised livestock rations in economic terms with a classical linear program. Common to all linear optimisation problems is a single objective function as its basic concept. This means that one tries to get the optimal solution by minimising or maximising the desired objective within a common set of imposed constraints. From this point of view, LP could be a deficient method for ration formulation (Rehman and Romero 1984, 1987). In many real-life situations, like livestock A G R I C U L T U R A L A N D F O O D S C I E N C E Žgajnar, J. et al. Multi-step beef ration optimisation 194 A G R I C U L T U R A L A N D F O O D S C I E N C E Vol. 19(2010): 193–206. 195 ration formulation, the decision maker does not always search for an optimal solution on the ba- sis of a single objective (the most common would be a search for the least-cost ration), but rather on the basis of several different objectives (Lara and Romero 1994). Rehman and Romero (1984) men- tioned that the main weakness of utilising LP for least-cost ration formulation is in its exclusive reli- ance on cost function as the only decision criterion. After all, this is a very rigid assumption. Ration formulation is a much more complex process and the economic issue is only one of many objectives. As stated earlier, indirect (usually negative) ani- mal nutrition impacts on the environment and on animal well-being are becoming more and more important, and reducing these impacts usually costs money. This fact leads to the problem where sev- eral objectives that are usually in contradiction are faced in decision-making processes. Another drawback of pure LP is also that the mathematical rigidity of the constraints (right-hand side—RHS) usually results in a set of equations that does not have a feasible solution (Rehman and Romero 1984). This means that no constraint (e.g., given nutrition requirements) violation is allowed at all, irrespective of the deviation level. On the other hand, there are usually no upper limits (mini- misation case) or lower limits (maximisation case). The latter could reflect a rise of prime cost or, what is lately becoming even more important, increased pollution with surplus elements due to unbalanced rations at different stages. This drawback could be solved by imposing additional constraints, but this could rapidly lead to an over-constrained and too complex model that has no feasible solution at all (Lara 1993). Of course, any additional complexity of the model would not yield an applicable solu- tion. In other words, relatively small deviations in RHS would not seriously affect animal welfare, but would result in a feasible solution (Lara and Romero 1994). The simplest possible approach to relax the above-mentioned rigidity could be sensitivity analysis, but this is only possible when a feasible solution is obtained. However, it is not really useful for more general application. Besides the fact that it is also time consuming, the end-user should also have adequate nutrition knowledge and be familiar with the techniques applied. This problem could be partly diminished by risk inclusion in the constraint set, but Hazell and Norton (1986) pointed out that such a stochastic programming approach demands a lot of data and still could be very subjective. Fer- guson et al. (2006) stated that the problem could be solved with a classical deterministic linear program only if there was one arbitrary change, relaxed ob- jectives, and a set of conflicting constraints, which again demands the input of experts. Consequently, the model could be very open, and hence would produce results that would be unrealistic and use- less. The most appropriate and commonly used method that partly overcomes listed problems of LP is weighted goal programming (WGP) (Tamiz et al. 1998). It might be supported by an additional system based upon penalty functions that stress decision makers’ preferences (Romero 2004) and improve the quality of the obtained solution. WGP is a pragmatic and flexible methodology for resolv- ing multiple criteria decision-making (MCDM) problems, a category to which ration formulation definitely belongs. Its advantage lies also in its fa- miliarity with the LP paradigm, which means that a simplex algorithm could be utilised to find the solution (Rehman and Romero 1993). Therefore, it follows that very commonly used spreadsheet programs might be used as the basic platform. This fact is especially important when one is trying to prepare an end-user optimisation tool. In comparison to classical LP, where only one objective could be optimised at once and all other constraints are written as inequalities, WGP is an appropriate tool to search for a solution that sat- isfies more than one goal. Its formulation is ex- pressed as a mathematical programming model with a single objective function also referred to as achievement function. Some inequality constraints could be transformed into goals and, in theoreti- cal terms, could be satisfied either completely or partly, or, in some extreme cases, might not be met at all. The important part in formulating WGP is to set the targets, their values, and their belonging prior- ity weights. This is actually the domain of nutri- A G R I C U L T U R A L A N D F O O D S C I E N C E Žgajnar, J. et al. Multi-step beef ration optimisation 196 A G R I C U L T U R A L A N D F O O D S C I E N C E Vol. 19(2010): 193–206. 197 tionists and experts from this field of science. How- ever, in the case where one needs to know which of the values are binding and have significant impact on ration formulation, sensitivity analysis might be used. Only binding goals should be considered; Rehman and Romero (1993) strongly recommend its use, especially when one is not confident about the priorities of the goals. However, this approach is useful in the phase of developing the optimisa- tion tool, but not for more general use (Rehman and Romero 1987). The quality of the results obtained is strongly dependent on the selection of preferen- tial weights. To reduce bias in the obtained results, an alternative technique to define weights should sometimes also be used (Gass 1987). In most cas- es, the solution obtained is a compromise between conflicting goals, enabled with deviation variables. The main contribution of this paper is meth- odological. We present a spreadsheet tool for beef ration formulation. It is designed as a two-phase optimisation approach (modules) based on math- ematical programming techniques. After a brief overview of the WGP technique and how it could be upgraded with a penalty function (PF) system, a short description of the tool follows. Then, the basic characteristics of the analysed case are pre- sented, followed by results and a short discussion. In the last section, some conclusions are drawn based on these results. Material and methods Weighted goal programming with a penalty function In general, the major difference between the WGP and the LP approach is in deviations. They are measured using positive and negative deviation variables that are defined for each goal separately, and present either over- or underachievement of the goal. Negative deviation variables are included in the objective function for goals that are of the type ‘more is better’, and positive deviation variables are included in the objective function for goals of the type ‘less is better’. Since any deviation is unwanted, the relative importance of each deviation variable is determined by belonging weights. As result, the objective function is defined as the weighted sum of the deviation variables. Therefore, the objective function in a WGP model minimises the undesirable deviations from the target goal levels and does not minimise or maximise the goals themselves (Fergu- son et al. 2006). A major issue within the WGP has concerned the use of normalisation techniques to overcome incommensurability (Tamiz et al. 1998). Observed goals are mainly measured in different units of measurement; consequently, the deviation variables cannot simply be summed up and taken as absolute deviations. To overcome this problem, all objective function coefficients must be transformed with a mathematical process of normalisation into the same units of measurement. With this process, all deviations are expressed as a ratio difference (i.e., (desired – actual)/desired) = (deviation)/desired)). In this case, any marginal change within one observed goal is of equal impor- tance, no matter how distant it is from target value (Rehman and Romero 1987). This is, in fact, one of the main WGP drawbacks when it is utilised for nutrition management. This addresses another new issue in the ration formulation example: In some situations, a too- large deviation might lead to failure to meet the animal’s requirements within desirable limits of nutrition, and the obtained solution is therefore use- less in practice. To keep deviations within desired limits, and to distinguish between different levels of deviations, a penalty function might be intro- duced into the WGP model (Rehman and Romero 1984). The described approach enables one to define allowed positive and negative deviation intervals separately for each goal. Depending on a goal’s characteristics (the nature and importance of 100% matching), these intervals might be different. The decision-maker must define bounds for all prede- termined intervals of over- and underachievement. A several-sided penalty function also enables dis- tinction between different deviations within one goal. Sensitivity is dependant on the number and A G R I C U L T U R A L A N D F O O D S C I E N C E Žgajnar, J. et al. Multi-step beef ration optimisation 196 A G R I C U L T U R A L A N D F O O D S C I E N C E Vol. 19(2010): 193–206. 197 size of defined intervals and the penalty scale uti- lised (si, for i=1 to n); namely, any deviation is treated on the basis of a predefined several-sided penalty function and cannot exceed the defined margins of the outer intervals. The penalty system operates when desirable goal values are violated, and is coupled with the objective function (WGP) through penalty coefficients. Penalty functions added to WGP improve the quality of the solution obtained, but they also in- crease the complexity of the model. Therefore, it is very important to formulate a penalty function only for the goals that would significantly improve the result obtained. Again, post-optimal analysis might be used to calculate shadow prices and estimate their importance (Rehman and Romero 1987). Modelling tool for beef ration optimisation An optimisation tool for beef ration formulation has been developed in a Microsoft Excel framework that, in its basic version, includes a macro (called a solver) for solving optimisation problems. In the case of linearity, it utilises a simplex algorithm. Even though spreadsheets have some drawbacks (e.g., limited decision variables, solving power), we decided to use Excel as the basic platform for the main reasons of its accessibility and its planned tool structure. The tool is developed as an open system, which means that all input data can be adapted to the analysed case. For this purpose, another model (Žgajnar et al. 2007) previously developed in Excel can be applied. The approach presented here is an example of how a combination of LP and WGP with a several- sided penalty function might be applied to prepare a user-friendly tool for ‘optimal’ beef ration formu- lation. It is developed in the shape of two linked modules (Fig. 1). The first module is based on clas- sical LP technique and is an example of a least- cost ration formulation. On the basis of the most important non-competitive constraints, it searches for a roughly balanced ration with the least possi- ble cost. On this obtained solution, an estimate of expected cost magnitude is made. This is also the fundamental reason why an LP module is part of the optimisation tool. LP has some drawbacks that, in complex practi- cal cases, might result in a useless solution. There- fore, if necessary, the first module (LP) might be made simpler (on the constraints side), since it is WGP supported by PF € RATION (LP) OPTIMAL RATION LP INPUT DATA MODU L E 2 MODULE 1 Final solution Optimization tool 1 . 1 . 2 . Fig. 1: Scheme of optimisation tool. A G R I C U L T U R A L A N D F O O D S C I E N C E Žgajnar, J. et al. Multi-step beef ration optimisation 198 A G R I C U L T U R A L A N D F O O D S C I E N C E Vol. 19(2010): 193–206. 199 intended to get just a crude cost estimation. It is linked to the second module based on WGP, sup- ported by a six-sided penalty function (PF) that is usually more complex. Especially from a nutri- tion viewpoint it is expected that such an approach should yield a more reliable ration that is also ef- ficient in economic terms; namely, very close to the least-cost ration of the first module (LP). Mathematical formulation of the first and second modules The first module (LP) is formulated as shown in equations (1) to (3). It mostly relies on an economic (cost) function (C) and satisfies only the most impor- tant nutrition requirement coefficients (bi), known also as right-hand side (RHS). An example could be minimal metabolizable energy content and me- tabolizable protein of the ration. The most binding constraints (a common example is the appropriate mineral ratio between Ca/P and K/Na) as well as more detailed ones can be temporarily eliminated since the tool has an option to switch them on or off. This is especially important when the first model cannot yield a feasible solution. In such a case, infeasibility holds also for the second module as cost goal equals zero and the normalisation process brings to division by zero. First module (LP): such that (1) for all i = 1 to m, and (2) for all j (3) In the first optimisation, phase one is searching for a least-cost ration (Fig. 1). Except for mini- mum requirements that should be met, prices are the most important factor that influences ration formulation. Second module (WGP with penalty function): such that (4) for all i = 1 to r and gi ≠ 0 (5a) for all i = 1 to r and C≠ 0 (5b) for all i=1 to r and gi=0 (6) for all i=1 to m (7) for all i=1 to r (8a) for all i=1 to r (8b) for all i=1 to r (9a) for all i=1 do r (9b) for all j (10) The meanings of the first and the second module notations: Z and C objective function aij the quantity of the ith nutrient in one unit of jth feed Xj the quantity of the jth feed in the ration (decision variable) cj jth feed cost bi the amount of the ith resource available – right-hand side (RHS) 5 Especially from a nutrition viewpoint it is expected that such an approach should yield a more reliable ration that is also efficient in economic terms; namely, very close to the least-cost ration of the first module (LP). Mathematical formulation of the first and second modules The first module (LP) is formulated as shown in equations (1) to (3). It mostly relies on an economic (cost) function (C) and satisfies only the most important nutrition requirement coefficients (bi), known also as right-hand side (RHS). An example could be minimal metabolisable energy content and metabolisable protein of the ration. The most binding constraints (a common example is the appropriate mineral ratio between Ca/P and K/Na) as well as more detailed ones can be temporarily eliminated since the tool has an option to switch them on or off. This is especially important when the first model cannot yield a feasible solution. In such a case, infeasibility holds also for the second module as cost goal equals zero and the normalisation process brings to division by zero. First module (LP):  = = n j jj XcC 1 *min such that (1) i n j jij bXa ≤ =1 for all i = 1 to m, and (2) 0≥jX for all j (3) In the first optimisation, phase one is searching for a least-cost ration (Fig. 1). Except for minimum requirements that should be met, prices are the most important factor that influences ration formulation. Second module (WGP with penalty function):  = +−+− = + + + = k i i ii i i ii k i i g dd ws g dd wsZ 1 22 2 11 1 1min such that (4)  = ++−− =−−++ n j iiiiijij gddddXa 1 2121 for all i = 1 to r and gi ≠ 0 (5a)  = ++−− =−−++ n j iiiijj CddddXc 1 2121 for all i=1 to r and C≠ 0 (5b)  = = n j ijij gXa 1 for all i=1 to r and gi=0 (6)  = ≤ n j ijij bXa 1 for all i=1 to m (7) iiii gpgd min 11 −≤ − for all i=1 to r (8a) Muotoiltu: Fontti: 9 pt Muotoiltu: Fontti: 9 pt 5 Especially from a nutrition viewpoint it is expected that such an approach should yield a more reliable ration that is also efficient in economic terms; namely, very close to the least-cost ration of the first module (LP). Mathematical formulation of the first and second modules The first module (LP) is formulated as shown in equations (1) to (3). It mostly relies on an economic (cost) function (C) and satisfies only the most important nutrition requirement coefficients (bi), known also as right-hand side (RHS). An example could be minimal metabolisable energy content and metabolisable protein of the ration. The most binding constraints (a common example is the appropriate mineral ratio between Ca/P and K/Na) as well as more detailed ones can be temporarily eliminated since the tool has an option to switch them on or off. This is especially important when the first model cannot yield a feasible solution. In such a case, infeasibility holds also for the second module as cost goal equals zero and the normalisation process brings to division by zero. First module (LP):  = = n j jj XcC 1 *min such that (1) i n j jij bXa ≤ =1 for all i = 1 to m, and (2) 0≥jX for all j (3) In the first optimisation, phase one is searching for a least-cost ration (Fig. 1). Except for minimum requirements that should be met, prices are the most important factor that influences ration formulation. Second module (WGP with penalty function):  = +−+− = + + + = k i i ii i i ii k i i g dd ws g dd wsZ 1 22 2 11 1 1min such that (4)  = ++−− =−−++ n j iiiiijij gddddXa 1 2121 for all i = 1 to r and gi ≠ 0 (5a)  = ++−− =−−++ n j iiiijj CddddXc 1 2121 for all i=1 to r and C≠ 0 (5b)  = = n j ijij gXa 1 for all i=1 to r and gi=0 (6)  = ≤ n j ijij bXa 1 for all i=1 to m (7) iiii gpgd min 11 −≤ − for all i=1 to r (8a) Muotoiltu: Fontti: 9 pt Muotoiltu: Fontti: 9 pt 5 Especially from a nutrition viewpoint it is expected that such an approach should yield a more reliable ration that is also efficient in economic terms; namely, very close to the least-cost ration of the first module (LP). Mathematical formulation of the first and second modules The first module (LP) is formulated as shown in equations (1) to (3). It mostly relies on an economic (cost) function (C) and satisfies only the most important nutrition requirement coefficients (bi), known also as right-hand side (RHS). An example could be minimal metabolisable energy content and metabolisable protein of the ration. The most binding constraints (a common example is the appropriate mineral ratio between Ca/P and K/Na) as well as more detailed ones can be temporarily eliminated since the tool has an option to switch them on or off. This is especially important when the first model cannot yield a feasible solution. In such a case, infeasibility holds also for the second module as cost goal equals zero and the normalisation process brings to division by zero. First module (LP):  = = n j jj XcC 1 *min such that (1) i n j jij bXa ≤ =1 for all i = 1 to m, and (2) 0≥jX for all j (3) In the first optimisation, phase one is searching for a least-cost ration (Fig. 1). Except for minimum requirements that should be met, prices are the most important factor that influences ration formulation. Second module (WGP with penalty function):  = +−+− = + + + = k i i ii i i ii k i i g dd ws g dd wsZ 1 22 2 11 1 1min such that (4)  = ++−− =−−++ n j iiiiijij gddddXa 1 2121 for all i = 1 to r and gi ≠ 0 (5a)  = ++−− =−−++ n j iiiijj CddddXc 1 2121 for all i=1 to r and C≠ 0 (5b)  = = n j ijij gXa 1 for all i=1 to r and gi=0 (6)  = ≤ n j ijij bXa 1 for all i=1 to m (7) iiii gpgd min 11 −≤ − for all i=1 to r (8a) Muotoiltu: Fontti: 9 pt Muotoiltu: Fontti: 9 pt 5 Especially from a nutrition viewpoint it is expected that such an approach should yield a more reliable ration that is also efficient in economic terms; namely, very close to the least-cost ration of the first module (LP). Mathematical formulation of the first and second modules The first module (LP) is formulated as shown in equations (1) to (3). It mostly relies on an economic (cost) function (C) and satisfies only the most important nutrition requirement coefficients (bi), known also as right-hand side (RHS). An example could be minimal metabolisable energy content and metabolisable protein of the ration. The most binding constraints (a common example is the appropriate mineral ratio between Ca/P and K/Na) as well as more detailed ones can be temporarily eliminated since the tool has an option to switch them on or off. This is especially important when the first model cannot yield a feasible solution. In such a case, infeasibility holds also for the second module as cost goal equals zero and the normalisation process brings to division by zero. First module (LP):  = = n j jj XcC 1 *min such that (1) i n j jij bXa ≤ =1 for all i = 1 to m, and (2) 0≥jX for all j (3) In the first optimisation, phase one is searching for a least-cost ration (Fig. 1). Except for minimum requirements that should be met, prices are the most important factor that influences ration formulation. Second module (WGP with penalty function):  = +−+− = + + + = k i i ii i i ii k i i g dd ws g dd wsZ 1 22 2 11 1 1min such that (4)  = ++−− =−−++ n j iiiiijij gddddXa 1 2121 for all i = 1 to r and gi ≠ 0 (5a)  = ++−− =−−++ n j iiiijj CddddXc 1 2121 for all i=1 to r and C≠ 0 (5b)  = = n j ijij gXa 1 for all i=1 to r and gi=0 (6)  = ≤ n j ijij bXa 1 for all i=1 to m (7) iiii gpgd min 11 −≤ − for all i=1 to r (8a) Muotoiltu: Fontti: 9 pt Muotoiltu: Fontti: 9 pt 5 Especially from a nutrition viewpoint it is expected that such an approach should yield a more reliable ration that is also efficient in economic terms; namely, very close to the least-cost ration of the first module (LP). Mathematical formulation of the first and second modules The first module (LP) is formulated as shown in equations (1) to (3). It mostly relies on an economic (cost) function (C) and satisfies only the most important nutrition requirement coefficients (bi), known also as right-hand side (RHS). An example could be minimal metabolisable energy content and metabolisable protein of the ration. The most binding constraints (a common example is the appropriate mineral ratio between Ca/P and K/Na) as well as more detailed ones can be temporarily eliminated since the tool has an option to switch them on or off. This is especially important when the first model cannot yield a feasible solution. In such a case, infeasibility holds also for the second module as cost goal equals zero and the normalisation process brings to division by zero. First module (LP):  = = n j jj XcC 1 *min such that (1) i n j jij bXa ≤ =1 for all i = 1 to m, and (2) 0≥jX for all j (3) In the first optimisation, phase one is searching for a least-cost ration (Fig. 1). Except for minimum requirements that should be met, prices are the most important factor that influences ration formulation. Second module (WGP with penalty function):  = +−+− = + + + = k i i ii i i ii k i i g dd ws g dd wsZ 1 22 2 11 1 1min such that (4)  = ++−− =−−++ n j iiiiijij gddddXa 1 2121 for all i = 1 to r and gi ≠ 0 (5a)  = ++−− =−−++ n j iiiijj CddddXc 1 2121 for all i=1 to r and C≠ 0 (5b)  = = n j ijij gXa 1 for all i=1 to r and gi=0 (6)  = ≤ n j ijij bXa 1 for all i=1 to m (7) iiii gpgd min 11 −≤ − for all i=1 to r (8a) Muotoiltu: Fontti: 9 pt Muotoiltu: Fontti: 9 pt 5 Especially from a nutrition viewpoint it is expected that such an approach should yield a more reliable ration that is also efficient in economic terms; namely, very close to the least-cost ration of the first module (LP). Mathematical formulation of the first and second modules The first module (LP) is formulated as shown in equations (1) to (3). It mostly relies on an economic (cost) function (C) and satisfies only the most important nutrition requirement coefficients (bi), known also as right-hand side (RHS). An example could be minimal metabolisable energy content and metabolisable protein of the ration. The most binding constraints (a common example is the appropriate mineral ratio between Ca/P and K/Na) as well as more detailed ones can be temporarily eliminated since the tool has an option to switch them on or off. This is especially important when the first model cannot yield a feasible solution. In such a case, infeasibility holds also for the second module as cost goal equals zero and the normalisation process brings to division by zero. First module (LP):  = = n j jj XcC 1 *min such that (1) i n j jij bXa ≤ =1 for all i = 1 to m, and (2) 0≥jX for all j (3) In the first optimisation, phase one is searching for a least-cost ration (Fig. 1). Except for minimum requirements that should be met, prices are the most important factor that influences ration formulation. Second module (WGP with penalty function):  = +−+− = + + + = k i i ii i i ii k i i g dd ws g dd wsZ 1 22 2 11 1 1min such that (4)  = ++−− =−−++ n j iiiiijij gddddXa 1 2121 for all i = 1 to r and gi ≠ 0 (5a)  = ++−− =−−++ n j iiiijj CddddXc 1 2121 for all i=1 to r and C≠ 0 (5b)  = = n j ijij gXa 1 for all i=1 to r and gi=0 (6)  = ≤ n j ijij bXa 1 for all i=1 to m (7) iiii gpgd min 11 −≤ − for all i=1 to r (8a) Muotoiltu: Fontti: 9 pt Muotoiltu: Fontti: 9 pt 5 Especially from a nutrition viewpoint it is expected that such an approach should yield a more reliable ration that is also efficient in economic terms; namely, very close to the least-cost ration of the first module (LP). Mathematical formulation of the first and second modules The first module (LP) is formulated as shown in equations (1) to (3). It mostly relies on an economic (cost) function (C) and satisfies only the most important nutrition requirement coefficients (bi), known also as right-hand side (RHS). An example could be minimal metabolisable energy content and metabolisable protein of the ration. The most binding constraints (a common example is the appropriate mineral ratio between Ca/P and K/Na) as well as more detailed ones can be temporarily eliminated since the tool has an option to switch them on or off. This is especially important when the first model cannot yield a feasible solution. In such a case, infeasibility holds also for the second module as cost goal equals zero and the normalisation process brings to division by zero. First module (LP):  = = n j jj XcC 1 *min such that (1) i n j jij bXa ≤ =1 for all i = 1 to m, and (2) 0≥jX for all j (3) In the first optimisation, phase one is searching for a least-cost ration (Fig. 1). Except for minimum requirements that should be met, prices are the most important factor that influences ration formulation. Second module (WGP with penalty function):  = +−+− = + + + = k i i ii i i ii k i i g dd ws g dd wsZ 1 22 2 11 1 1min such that (4)  = ++−− =−−++ n j iiiiijij gddddXa 1 2121 for all i = 1 to r and gi ≠ 0 (5a)  = ++−− =−−++ n j iiiijj CddddXc 1 2121 for all i=1 to r and C≠ 0 (5b)  = = n j ijij gXa 1 for all i=1 to r and gi=0 (6)  = ≤ n j ijij bXa 1 for all i=1 to m (7) iiii gpgd min 11 −≤ − for all i=1 to r (8a) Muotoiltu: Fontti: 9 pt Muotoiltu: Fontti: 9 pt 5 Especially from a nutrition viewpoint it is expected that such an approach should yield a more reliable ration that is also efficient in economic terms; namely, very close to the least-cost ration of the first module (LP). Mathematical formulation of the first and second modules The first module (LP) is formulated as shown in equations (1) to (3). It mostly relies on an economic (cost) function (C) and satisfies only the most important nutrition requirement coefficients (bi), known also as right-hand side (RHS). An example could be minimal metabolisable energy content and metabolisable protein of the ration. The most binding constraints (a common example is the appropriate mineral ratio between Ca/P and K/Na) as well as more detailed ones can be temporarily eliminated since the tool has an option to switch them on or off. This is especially important when the first model cannot yield a feasible solution. In such a case, infeasibility holds also for the second module as cost goal equals zero and the normalisation process brings to division by zero. First module (LP):  = = n j jj XcC 1 *min such that (1) i n j jij bXa ≤ =1 for all i = 1 to m, and (2) 0≥jX for all j (3) In the first optimisation, phase one is searching for a least-cost ration (Fig. 1). Except for minimum requirements that should be met, prices are the most important factor that influences ration formulation. Second module (WGP with penalty function):  = +−+− = + + + = k i i ii i i ii k i i g dd ws g dd wsZ 1 22 2 11 1 1min such that (4)  = ++−− =−−++ n j iiiiijij gddddXa 1 2121 for all i = 1 to r and gi ≠ 0 (5a)  = ++−− =−−++ n j iiiijj CddddXc 1 2121 for all i=1 to r and C≠ 0 (5b)  = = n j ijij gXa 1 for all i=1 to r and gi=0 (6)  = ≤ n j ijij bXa 1 for all i=1 to m (7) iiii gpgd min 11 −≤ − for all i=1 to r (8a) Muotoiltu: Fontti: 9 pt Muotoiltu: Fontti: 9 pt 5 Especially from a nutrition viewpoint it is expected that such an approach should yield a more reliable ration that is also efficient in economic terms; namely, very close to the least-cost ration of the first module (LP). Mathematical formulation of the first and second modules The first module (LP) is formulated as shown in equations (1) to (3). It mostly relies on an economic (cost) function (C) and satisfies only the most important nutrition requirement coefficients (bi), known also as right-hand side (RHS). An example could be minimal metabolisable energy content and metabolisable protein of the ration. The most binding constraints (a common example is the appropriate mineral ratio between Ca/P and K/Na) as well as more detailed ones can be temporarily eliminated since the tool has an option to switch them on or off. This is especially important when the first model cannot yield a feasible solution. In such a case, infeasibility holds also for the second module as cost goal equals zero and the normalisation process brings to division by zero. First module (LP):  = = n j jj XcC 1 *min such that (1) i n j jij bXa ≤ =1 for all i = 1 to m, and (2) 0≥jX for all j (3) In the first optimisation, phase one is searching for a least-cost ration (Fig. 1). Except for minimum requirements that should be met, prices are the most important factor that influences ration formulation. Second module (WGP with penalty function):  = +−+− = + + + = k i i ii i i ii k i i g dd ws g dd wsZ 1 22 2 11 1 1min such that (4)  = ++−− =−−++ n j iiiiijij gddddXa 1 2121 for all i = 1 to r and gi ≠ 0 (5a)  = ++−− =−−++ n j iiiijj CddddXc 1 2121 for all i=1 to r and C≠ 0 (5b)  = = n j ijij gXa 1 for all i=1 to r and gi=0 (6)  = ≤ n j ijij bXa 1 for all i=1 to m (7) iiii gpgd min 11 −≤ − for all i=1 to r (8a) Muotoiltu: Fontti: 9 pt Muotoiltu: Fontti: 9 pt 6 iiiii gpgdd min 221 −≤+ −− for all i=1 to r (8b) iiii ggpd −≤ + max 11 for all i=1 to r (9a) iiiii ggpdd −≤+ ++ max 221 for all i=1 do r (9b) 0,,,, 2211 ≥ −+−+ jiiii Xdddd for all j (10) The meanings of the first and the second module notations: Z and C objective function aij the quantity of the ith nutrient in one unit of jth feed Xj the quantity of the jth feed in the ration (decision variable) cj jth feed cost bi the amount of the ith resource available – right-hand side (RHS) gi expected daily requirement of the ith nutrient (goal) wi weight expressing the relative importance of achieving the ith goal s1 and s2 penalty coefficients for the first and the second level of over- or underachievement of the goal di1 +, di1 -, di2 +,di2 positive and negative deviation variables including over- and underachievement of the ith goal pi1 min<1, pi1 max>1 penalty function parameters defining the first deviation interval of the ith nutrient pi2 min<1, pi2 max>1 penalty function parameters defining the second deviation interval of the ith nutrient The second module (WGP with PF) is formulated as shown in equations (4) to (10). The objective function (4) is defined as the weighted sum of unwanted deviation variables from observed goals, multiplied with the belonging penalty coefficients (s1 and s2). The obtained sum-product is a subject of minimisation. The relative importance of each goal is represented by weights (w) associated with the corresponding positive or negative deviations. To control deviations for each goal in WGP, penalty intervals are in place (8a, 8b, 9a, 9b) (Fig. 2). Because of the normalisation process, only goals that have nonzero target values (7) could be relaxed with positive and negative deviations. If goals are equal to zero (6), they are transformed into fixed constraints that must be fully fulfilled. If this is not done, one would face a forbidden division by zero. Both modules are directly linked to cost function (5b). The obtained target value (C) in the first module (LP) enters into the second module (WGP with PF) as a feed cost goal that should be met as closely as possible. This is also the only case where negative deviation is not penalised and is also not restricted with intervals. All other constraints that do not have defined target values or that do not have priority attributes are considered in equation (7). One of the main assumptions of the LP paradigm is also non-negativity, which is considered in equation (3) for the first module and in equation (10) for the second one. Input data Our primary aim was to develop an end-user spreadsheet tool for formulating more efficient beef cattle diets. It might also be useful for preparing calculations of different breeding technology types, in the sense of assessing variable costs of feed usage. The total cost of fattening is mostly dependent on starting and finishing weights. The last is highly correlated with achieved daily gains, which also determines the fattening period. These characteristics vary between cattle breeds and also determine their breeding technology. Nevertheless, when keeping animals for meat production, the farmer must also consider consumer preferences and produce carcasses that meet the right specifications for weight and composition. 6 iiiii gpgdd min 221 −≤+ −− for all i=1 to r (8b) iiii ggpd −≤ + max 11 for all i=1 to r (9a) iiiii ggpdd −≤+ ++ max 221 for all i=1 do r (9b) 0,,,, 2211 ≥ −+−+ jiiii Xdddd for all j (10) The meanings of the first and the second module notations: Z and C objective function aij the quantity of the ith nutrient in one unit of jth feed Xj the quantity of the jth feed in the ration (decision variable) cj jth feed cost bi the amount of the ith resource available – right-hand side (RHS) gi expected daily requirement of the ith nutrient (goal) wi weight expressing the relative importance of achieving the ith goal s1 and s2 penalty coefficients for the first and the second level of over- or underachievement of the goal di1 +, di1 -, di2 +,di2 positive and negative deviation variables including over- and underachievement of the ith goal pi1 min<1, pi1 max>1 penalty function parameters defining the first deviation interval of the ith nutrient pi2 min<1, pi2 max>1 penalty function parameters defining the second deviation interval of the ith nutrient The second module (WGP with PF) is formulated as shown in equations (4) to (10). The objective function (4) is defined as the weighted sum of unwanted deviation variables from observed goals, multiplied with the belonging penalty coefficients (s1 and s2). The obtained sum-product is a subject of minimisation. The relative importance of each goal is represented by weights (w) associated with the corresponding positive or negative deviations. To control deviations for each goal in WGP, penalty intervals are in place (8a, 8b, 9a, 9b) (Fig. 2). Because of the normalisation process, only goals that have nonzero target values (7) could be relaxed with positive and negative deviations. If goals are equal to zero (6), they are transformed into fixed constraints that must be fully fulfilled. If this is not done, one would face a forbidden division by zero. Both modules are directly linked to cost function (5b). The obtained target value (C) in the first module (LP) enters into the second module (WGP with PF) as a feed cost goal that should be met as closely as possible. This is also the only case where negative deviation is not penalised and is also not restricted with intervals. All other constraints that do not have defined target values or that do not have priority attributes are considered in equation (7). One of the main assumptions of the LP paradigm is also non-negativity, which is considered in equation (3) for the first module and in equation (10) for the second one. Input data Our primary aim was to develop an end-user spreadsheet tool for formulating more efficient beef cattle diets. It might also be useful for preparing calculations of different breeding technology types, in the sense of assessing variable costs of feed usage. The total cost of fattening is mostly dependent on starting and finishing weights. The last is highly correlated with achieved daily gains, which also determines the fattening period. These characteristics vary between cattle breeds and also determine their breeding technology. Nevertheless, when keeping animals for meat production, the farmer must also consider consumer preferences and produce carcasses that meet the right specifications for weight and composition. 6 iiiii gpgdd min 221 −≤+ −− for all i=1 to r (8b) iiii ggpd −≤ + max 11 for all i=1 to r (9a) iiiii ggpdd −≤+ ++ max 221 for all i=1 do r (9b) 0,,,, 2211 ≥ −+−+ jiiii Xdddd for all j (10) The meanings of the first and the second module notations: Z and C objective function aij the quantity of the ith nutrient in one unit of jth feed Xj the quantity of the jth feed in the ration (decision variable) cj jth feed cost bi the amount of the ith resource available – right-hand side (RHS) gi expected daily requirement of the ith nutrient (goal) wi weight expressing the relative importance of achieving the ith goal s1 and s2 penalty coefficients for the first and the second level of over- or underachievement of the goal di1 +, di1 -, di2 +,di2 positive and negative deviation variables including over- and underachievement of the ith goal pi1 min<1, pi1 max>1 penalty function parameters defining the first deviation interval of the ith nutrient pi2 min<1, pi2 max>1 penalty function parameters defining the second deviation interval of the ith nutrient The second module (WGP with PF) is formulated as shown in equations (4) to (10). The objective function (4) is defined as the weighted sum of unwanted deviation variables from observed goals, multiplied with the belonging penalty coefficients (s1 and s2). The obtained sum-product is a subject of minimisation. The relative importance of each goal is represented by weights (w) associated with the corresponding positive or negative deviations. To control deviations for each goal in WGP, penalty intervals are in place (8a, 8b, 9a, 9b) (Fig. 2). Because of the normalisation process, only goals that have nonzero target values (7) could be relaxed with positive and negative deviations. If goals are equal to zero (6), they are transformed into fixed constraints that must be fully fulfilled. If this is not done, one would face a forbidden division by zero. Both modules are directly linked to cost function (5b). The obtained target value (C) in the first module (LP) enters into the second module (WGP with PF) as a feed cost goal that should be met as closely as possible. This is also the only case where negative deviation is not penalised and is also not restricted with intervals. All other constraints that do not have defined target values or that do not have priority attributes are considered in equation (7). One of the main assumptions of the LP paradigm is also non-negativity, which is considered in equation (3) for the first module and in equation (10) for the second one. Input data Our primary aim was to develop an end-user spreadsheet tool for formulating more efficient beef cattle diets. It might also be useful for preparing calculations of different breeding technology types, in the sense of assessing variable costs of feed usage. The total cost of fattening is mostly dependent on starting and finishing weights. The last is highly correlated with achieved daily gains, which also determines the fattening period. These characteristics vary between cattle breeds and also determine their breeding technology. Nevertheless, when keeping animals for meat production, the farmer must also consider consumer preferences and produce carcasses that meet the right specifications for weight and composition. 6 iiiii gpgdd min 221 −≤+ −− for all i=1 to r (8b) iiii ggpd −≤ + max 11 for all i=1 to r (9a) iiiii ggpdd −≤+ ++ max 221 for all i=1 do r (9b) 0,,,, 2211 ≥ −+−+ jiiii Xdddd for all j (10) The meanings of the first and the second module notations: Z and C objective function aij the quantity of the ith nutrient in one unit of jth feed Xj the quantity of the jth feed in the ration (decision variable) cj jth feed cost bi the amount of the ith resource available – right-hand side (RHS) gi expected daily requirement of the ith nutrient (goal) wi weight expressing the relative importance of achieving the ith goal s1 and s2 penalty coefficients for the first and the second level of over- or underachievement of the goal di1 +, di1 -, di2 +,di2 positive and negative deviation variables including over- and underachievement of the ith goal pi1 min<1, pi1 max>1 penalty function parameters defining the first deviation interval of the ith nutrient pi2 min<1, pi2 max>1 penalty function parameters defining the second deviation interval of the ith nutrient The second module (WGP with PF) is formulated as shown in equations (4) to (10). The objective function (4) is defined as the weighted sum of unwanted deviation variables from observed goals, multiplied with the belonging penalty coefficients (s1 and s2). The obtained sum-product is a subject of minimisation. The relative importance of each goal is represented by weights (w) associated with the corresponding positive or negative deviations. To control deviations for each goal in WGP, penalty intervals are in place (8a, 8b, 9a, 9b) (Fig. 2). Because of the normalisation process, only goals that have nonzero target values (7) could be relaxed with positive and negative deviations. If goals are equal to zero (6), they are transformed into fixed constraints that must be fully fulfilled. If this is not done, one would face a forbidden division by zero. Both modules are directly linked to cost function (5b). The obtained target value (C) in the first module (LP) enters into the second module (WGP with PF) as a feed cost goal that should be met as closely as possible. This is also the only case where negative deviation is not penalised and is also not restricted with intervals. All other constraints that do not have defined target values or that do not have priority attributes are considered in equation (7). One of the main assumptions of the LP paradigm is also non-negativity, which is considered in equation (3) for the first module and in equation (10) for the second one. Input data Our primary aim was to develop an end-user spreadsheet tool for formulating more efficient beef cattle diets. It might also be useful for preparing calculations of different breeding technology types, in the sense of assessing variable costs of feed usage. The total cost of fattening is mostly dependent on starting and finishing weights. The last is highly correlated with achieved daily gains, which also determines the fattening period. These characteristics vary between cattle breeds and also determine their breeding technology. Nevertheless, when keeping animals for meat production, the farmer must also consider consumer preferences and produce carcasses that meet the right specifications for weight and composition. A G R I C U L T U R A L A N D F O O D S C I E N C E Žgajnar, J. et al. Multi-step beef ration optimisation 198 A G R I C U L T U R A L A N D F O O D S C I E N C E Vol. 19(2010): 193–206. 199 gi expected daily requirement of the ith nutrient (goalwi weight expressing the relative importance of achieving the ith goal s1 and s2 penalty coefficients for the first and the second level of over- or underachievement of the goal di1 +, di1 -, di2 +,di2 positive and negative deviation variables including over- and underachievement of the ith goal pi1 min<1, pi1 max>1 penalty function parameters defining the first deviation interval of the ith nutrient pi2 min<1, pi2 max>1 penalty function parameters defining the second deviation interval of the ith nutrient The second module (WGP with PF) is formu- lated as shown in equations (4) to (10). The objec- tive function (4) is defined as the weighted sum of unwanted deviation variables from observed goals, multiplied with the belonging penalty coefficients (s1 and s2). The obtained sum-product is a subject of minimisation. The relative importance of each goal is represented by weights (w) associated with the corresponding positive or negative deviations. To control deviations for each goal in WGP, pen- alty intervals are in place (8a, 8b, 9a, 9b) (Fig. 2). Because of the normalisation process, only goals that have nonzero target values (7) could be relaxed with positive and negative deviations. If goals are equal to zero (6), they are transformed into fixed constraints that must be fully fulfilled. If this is not done, one would face a forbidden division by zero. Both modules are directly linked to cost func- tion (5b). The obtained target value (C) in the first module (LP) enters into the second module (WGP with PF) as a feed cost goal that should be met as closely as possible. This is also the only case where negative deviation is not penalised and is also not restricted with intervals. All other constraints that do not have defined target values or that do not have priority attributes are considered in equation (7). One of the main assumptions of the LP para- digm is also non-negativity, which is considered in equation (3) for the first module and in equation (10) for the second one. Input data Our primary aim was to develop an end-user spreadsheet tool for formulating more efficient beef cattle diets. It might also be useful for prepar- ing calculations of different breeding technology types, in the sense of assessing variable costs of feed usage. The total cost of fattening is mostly dependent on starting and finishing weights. The last is highly correlated with achieved daily gains, which also determines the fattening period. These characteristics vary between cattle breeds and also determine their breeding technology. Nevertheless, when keeping animals for meat production, the farmer must also consider consumer preferences and produce carcasses that meet the right specifications for weight and composition. The tool has been tested on a hypothetical case. It was presumed that beef fattening starts at 200 kg of live weight and stops at 600 kg. For a more pre- cise ration formulation, the whole fattening period has been split into four periods (100 kg weight gains per period) with different average daily gains (Table 1). The latest manifests in duration of each fattening period. All nutritional requirements have been as- sessed with the spreadsheet model for ruminants’ nutritional requirements estimation (Žgajnar et al. 2007). It calculates requirements for metabolizable energy (ME), metabolizable protein (MP), dry mat- ter consumption (DM), mineral elements (Ca, P, K, Na, and Mg), and the minimal and maximal crude fibre (CF) for any period. Estimated requirements pi2 min pi1 min 100% 110% pi1 max pi2 max s2w i 8 Total penalty s1w i di/gi Fig. 2: Scheme of six-sided penalty function (adapted from Rehman and Romero 1987). A G R I C U L T U R A L A N D F O O D S C I E N C E Žgajnar, J. et al. Multi-step beef ration optimisation 200 A G R I C U L T U R A L A N D F O O D S C I E N C E Vol. 19(2010): 193–206. 201 for periods observed are presented in absolute val- ues in Table 2. A basic set of constraints in both modules (LP and WGP supported by PF) is more or less the same (Table 2). The constraints presented differ only in mathematical sign when they are transformed into goals. The first module (LP) claims only satisfac- tion of minimum or maximum constraints. As stated earlier, this might lead to an ‘unrealistic’ solution. However, this simplification has been made due to the fact that the LP module is needed foremost to give a rough estimation of the lowest possible diet cost. Undisputedly, the cost of unbal- anced ration is lower, but on the one hand, this assures a feasible solution that is needed; on the other hand, WGP supported by PF is encouraged to draw near to a price that might in fact be reached. In the process of ration formulation, one should also consider other ‘non-nutritional’ constraints. For example, this could be quantity of feed that must or might be included in the diet. In our hy- pothetical case study, we assume a quite frequent example that might be met on beef farms in many central EU countries. Because of climate charac- teristics, the first or second grass mowing is usually gathered in hay and all the rest is gathered more or less in grass silage. This is why hay quantities are very restricted, and in all four fattening peri- Table 2. Nutrition requirements divided into four periods, presented as constraints (LP) and set of goals in WGP Fattening period First Second Third Fourth LP WGP I / II LP WGP I / II LP WGP I / II LP WGP I / II ME (MJ) >6311 6311 >6574 6574 >7547 7547 >9105 9105 MP (g) >46880 46880 >45228 45228 >48114 48114 >54260 54260 DM (kg) <632 632 <718 718 <920 920 <936 936 CF min (kg) >114 >129 >166 >168 CF max (kg) <164 <187 <239 <243 Ca (g) >4152 4152 >4368 4368 >4462 4462 >5200 5200 P (g) >2358 2358 >2596 2596 >2958 2958 >3300 3300 Mg (g) >730 >821 >1,002 >1,200 Na (g) >506 >592 >684 >850 K (g) >5689 >6461 >8279 >8423 Ca:P (%) (1.5-2):1 (1.5-2):1 (1.5-2):1 (1.5-2):1 K:Na (%) (5.5-10):1 (5.5-10):1 (5.5-10):1 (5.5-10):1 Price (cent) C1 C2 C3 C4 Hay (kg d-1) <2 <2 <2 <2 ME = metabolizable energy; MP = metabolizable protein; DM = dry matter; CF = crude fibre; LP = linear program (first module); WGP I = second module, first scenario; WGP II = second module, second scenario Table 1. Assumptions concerning growth pattern for beef cattle fattening Fattening period First Second Third Fourth Average weight gain (g d-1) 900 1100 1100 1000 Starting / Finishing live weight (kg) 200 /300 300 / 400 400 / 500 500 / 600 Fattening duration (day) 112 91 91 100 A G R I C U L T U R A L A N D F O O D S C I E N C E Žgajnar, J. et al. Multi-step beef ration optimisation 200 A G R I C U L T U R A L A N D F O O D S C I E N C E Vol. 19(2010): 193–206. 201 ods, maximal hay quantity is set to 2 kg per day (Table 2). Completely different conditions and, consequently, also technologies are met in other EU regions. The initial version of the WGP model involves six goals (Table 3) including deviation intervals. For this hypothetical case all the weights and de- viation intervals have been defined on the basis of expert judgement, however this might be done also with empirical methods, as pointed out in the lit- erature (e.g. analytical hierarchical process – AHP (Tamiz et al. 1998)). The importance of each goal is defined with weights ranging between 0 and 100. We assumed that, in all four periods, the relative importance of defined goals is the same. This might be an is- sue when more detailed and more numerous goals would be taken into consideration. The most im- portant goal in our case is satisfaction of protein requirements (100), while deviations from energy requirements are less penalised (for 30%). In both cases, deviation intervals are very restricted. Only 1% positive and negative deviations are allowed in the first stage and 5 to 10% in the second. Much lower weight is foreseen for the dry matter intake that presents consumption capacity. In this case, deviation intervals are defined only for undera- chievement of the goal, while over-achievement is for practical reasons (consumption capacity) not allowed. At first glance, it seems that both mineral goals (Ca, P) are, because of low weights, almost neglected. However, this is not true. The developed model includes several safety nets that prevent mineral deficits, and also their toxic concentrations, in the ration. Nutritionist doctrine says that it is more important to satisfy ratios between Ca and P and also between K and Na than it is to fully meet the estimated mineral requirements (McDonald et al. 1995). Because both modules (LP and WGP with PF) require linearity, these non-linear ratios must be transformed with appropriate mathemati- cal techniques into linear equations. The applied approach of WGP with PF has been tested with varying extensions of cost devia- tion intervals (PF). In this paper, it manifests in two scenarios (Table 3). In the first scenario, the price of an obtained ration (WGP I) might deviate from a set target value for at the most 4% to be penalised within the first stage (s1) and at maximum of 15% within the second stage (s2). In the second scenario (WGP II), both margins are relaxed (10% and 15% respectively). We assumed that, within both scenarios, the penalty coefficients remain the same (s1=1 and s2=5). In the analysed hypothetical case, we assumed that both modules might choose between seven different feeds and four different mineral-vitamin components (Table 4). The described feed charac- teristics are mostly dependent on soil structure, fer- tilisation management and intensity of production. Consequently, high variability in nutrition quality might arise in practice. Due to this fact, chemi- Table 3. Weights of defined goals and penalty function intervals for two scenarios Penalty function intervals Goal weights Goal Interval 1 Interval 2 (wi) pi1 - pi1+ pi2 - pi2 + unit SI SII SI SII SI SII SI SII ME (MJ) 1% 1% 5% 10% 70 MP (g) 1% 1% 5% 10% 100 DM (kg) 2% 0% 20% 0% 33 Ca (g) 2% 5% 20% 30% 5 P (g) 2% 5% 20% 30% 5 Price (cent) 8 4% 10% 8 10% 15% 90 ME = metabolizable energy; MP = metabolizable protein; DM = dry matter; SI / SII = first / second scenario; pi1-, pi1+, pi2-, pi2+ - penalty intervals at the first and the second stage A G R I C U L T U R A L A N D F O O D S C I E N C E Žgajnar, J. et al. Multi-step beef ration optimisation 202 A G R I C U L T U R A L A N D F O O D S C I E N C E Vol. 19(2010): 193–206. 203 cal analysis for each feed used (when analysing a practical case) should be performed to prevent the possibility that the formulated ration might be completely wrong. We assumed that all voluminous forage (hay, grass silage and maize silage) is grown on the farm. Since these forages are usually not traded, we esti- mate the production cost on the basis of ‘standard farm cost calculations per production activities’ prepared by Agricultural institute of Slovenia (KIS 2007). All other forage at the disposal of the end user could be purchased at market prices (Table 4). Results and discussion A hypothetical case has been chosen to test a developed approach of combining LP and WGP techniques, supported by a PF system. The beef fattening horizon has been divided into four periods with different daily weight gains (0.9 kg, 1.1 kg, 1.1 kg and 1.0 kg respectively). Formulated rations for all four periods are presented in Table 5. However it has to be noted that the tool is from the economic viewpoint restricted just to minimise feed costs and not to maximise returns on beef production. Between three analysed cases (LP, WGP I and WGP II), there are significant differences in formu- lated rations, but in all three cases they are quite simple. The major differences occur as result of allowed deviations in WGP compared to LP, and because of the changes in penalty intervals between both WGP analyses (scenario I and II). In all three cases, rations consist of hay, maize silage, grass silage (except in LP’s diet with zero grass silage) and soya meal. The only difference is in quanti- ties of maize silage, grass silage and soya meal, dependent on economic parameters, while the hay quantities are the same in all three cases, and are at the highest level allowed (2 kg d-1). From the results obtained, it is obvious that soya meal and grass silage are substitutes to cover metabolizable protein requirements. Soya meal is included in the ration when prices are more impor- tant (LP, WGP I and then WGP 2). This shows in fact that soya meal has inspite of high market price, good nutrition value for money. Obtained results might be different if ratio between grass silage cost Table 4. Nutritive value of assumed feed DM, ME, MP,2 CF Ca P Mg Na K Price or TC1 g kg-1 MJ kg-1 DM g kg-1 DM g kg-1 DM cent kg-1 Feed at disposal Hay 860 9.93 85 270 5.70 3.50 2.00 0.35 18.25 15.3 Maize silage 320 10.76 45 200 7.06 6.00 1.91 0.12 10.76 3.7 Grass silage 350 9.50 62 260 6.00 3.51 2.20 0.35 21.30 6.1 Grain maize 880 13.42 83 0 0.23 4.09 1.25 0.23 3.75 30.0 Wheat 880 13.47 88 0 0.57 3.86 1.59 0.45 5.00 32.0 Rapeseed cake 900 12.31 125 0 2.89 7.00 2.78 2.22 10.00 37.0 Soya meal 880 13.19 215 0 3.41 7.84 2.61 1.14 20.00 46.0 Mineral and vitamin components Limestone 950 0 0 0 400 0 0 0 0 16.4 MVM 13 930 0 0 0 160 110 6 100 0 68.3 MVM 23 930 0 0 0 160 100 36 120 0 67.6 Salt 950 0 0 0 0 0 0 400 0 50.0 1Total cost 2Only the lowest value of metabolizable protein (MP) for each feed is considered 3Commercial names of mineral – vitamin mixtures are Bovisal-common and Bovisal-summer DM = dry matter; ME = metabolizable energy; MP = metabolizable proteins; CF = crude fibre A G R I C U L T U R A L A N D F O O D S C I E N C E Žgajnar, J. et al. Multi-step beef ration optimisation 202 A G R I C U L T U R A L A N D F O O D S C I E N C E Vol. 19(2010): 193–206. 203 Ta bl e 5. O bt ai ne d re su lts a nd d ai ly ra tio ns fo rm ul at ed w ith L P an d co st p en al ty fu nc tio n sc en ar io s Fa tte ni ng p er io d (d ai ly ra tio n) W ho le p er io d (3 94 d ay s) Fi rs t Se co nd T hi rd Fo ur th L P W G P I W G P II L P W G P I W G P II L P W G P I W G P II L P W G P I W G P II L P W G P I W G P II D ur at io n (d ay s) 11 2 91 91 10 0 39 4 Fe ed u se d (k g d- 1 ) H ay 2. 00 2. 00 2. 00 2. 00 2. 00 2. 00 2. 00 2. 00 2. 00 2. 00 2. 00 2. 00 78 8. 0 78 8. 0 78 8. 0 M ai ze s ila ge 8. 81 3. 71 2. 86 14 .9 3 7. 07 1. 71 21 .1 7 9. 11 5. 84 19 .3 9 13 .0 0 10 .6 8 63 89 .6 27 99 .3 15 91 .2 G ra ss s ila ge 0. 00 6. 68 7. 65 0. 00 8. 30 15 .0 3 0. 00 9. 72 13 .7 5 0. 00 8. 37 11 .1 8 0. 0 33 59 .1 48 50 .8 So ya m ea l 0. 77 0. 37 0. 35 0. 72 0. 34 0. 00 0. 41 0. 19 0. 00 0. 62 0. 12 0. 00 22 9. 8 10 7. 6 38 .7 M in er al c om po ne nt s us ed (g d -1 ) L im es to ne 13 .3 9. 9 9. 8 6. 1 10 .4 6. 6 0. 0 9. 8 0. 0 0. 0 15 .8 7. 8 20 38 39 34 16 93 Sa lt 15 .3 21 .3 22 .2 20 .1 26 .7 32 .2 24 .5 30 .3 33 .9 23 .5 31 .1 33 .6 82 34 10 60 6 11 90 0 Pr ic e (c en t d -1 ) 99 .5 6 10 3. 54 10 5. 27 11 9. 97 12 4. 77 13 1. 07 12 9. 04 13 4. 20 13 8. 34 14 5. 07 15 0. 87 15 4. 47 Pr ic e (E U R p er p er io d) 11 1. 50 11 5. 96 11 7. 90 10 9. 17 11 3. 54 11 9. 27 11 7. 43 12 2. 13 12 5. 89 13 2. 01 13 7. 29 14 0. 57 47 0. 12 48 8. 92 50 3. 63 R eq ui re m en ts d ev ia tio ns (% ) M E 0. 0 0. 0 0. 0 6. 4 1. 0 1. 0 14 .3 0. 0 0. 0 0. 0 0. 0 0. 0 M P 0. 0 -1 .0 0. 0 0. 0 -1 .0 0. 0 0. 0 -1 .0 0. 0 0. 0 -1 .0 0. 0 D M -7 .1 -0 .8 0. 0 -9 .3 -8 .5 -4 .1 -1 2. 2 -1 8. 5 -1 6. 6 -9 .3 -4 .3 -2 .9 C a 0. 0 0. 0 0. 0 0. 0 0. 4 0. 0 20 .1 12 .4 5. 8 6. 7 21 .4 16 .1 P 34 .2 13 .5 10 .6 39 .0 12 .6 -2 .0 52 .3 13 .0 5. 0 44 .0 27 .5 22 .0 To ta l d ev ia tio n 41 .2 15 .3 10 .6 54 .6 23 .5 7. 1 98 .8 44 .9 27 .4 60 .0 54 .1 41 .0 Pr ic e de vi at io n (% ) 0. 0 4. 0 5. 7 0. 0 4. 0 9. 3 0. 0 4. 0 7. 2 0. 0 4. 0 6. 5 R at io b et w ee n m in er al s C a: P 1. 8 1. 6 1. 6 1. 7 1. 5 1. 7 1. 5 1. 5 1. 5 1. 6 1. 5 1. 5 K :N a 10 .0 10 .0 10 .0 10 .0 10 .0 10 .0 10 .0 10 .0 10 .0 10 .0 10 .0 10 .0 Ph ys ic al ra tio n at tr ib ut e C F (k g d- 1 ) 1. 03 1. 31 1. 34 1. 42 1. 67 1. 94 1. 82 1. 93 2. 09 1. 87 2. 26 2. 38 C F (% ) 20 23 24 20 23 26 20 23 25 20 23 24 D M (k g d- 1 ) 5. 2 5. 6 5. 6 7. 2 7. 2 7. 6 8. 9 8. 2 8. 4 9. 3 9. 8 10 .0 L P = so lu tio n ob ta in ed b y th e fir st m od ul e; W G P I = s ol ut io n ob ta in ed b y th e se co nd m od ul e, fi rs t s ce na ri o; W G P II = s ol ut io n ob ta in ed b y th e se co nd m od ul e, s ec on d sc en ar io ; M E = m et ab - ol iz ab le e ne rg y; M P = m et ab ol iz ab le p ro te in ; D M = d ry m at te r; C F = cr ud e fib re A G R I C U L T U R A L A N D F O O D S C I E N C E Žgajnar, J. et al. Multi-step beef ration optimisation 204 A G R I C U L T U R A L A N D F O O D S C I E N C E Vol. 19(2010): 193–206. 205 and its nutritive value would be improved. Since the quality and consequently nutritive value of grass silage is assumed to be high, ratio might be im- proved through decreased production costs. More restricted cost deviations (Scenario 1) have signifi- cant impact on the inclusion of grass silage. Due to the high importance of the cost goal (Table 3), deviations never exceed defined goals enough to be in the second interval of over-achievement, nor in the second scenario where intervals are extended. This is not the case for other goals (dry matter intake, Ca and P), where the second (s2) penalty scales also operate. In all three formulated diets (LP, WGP I and WGP II), mineral requirements are covered only with limestone and salt. This is due to the rich mineral content in the feed stuffs used. However, one could have completely legitimate doubts about satisfying nutrition requirements of microelements and vitamins that are not included as constraints in tested version of our tool. This issue might be simply solved by setting new constraints for minimal incorporation of any mineral-vitamin mixture components (e.g. Bovisal- common or Bovisal-summer) into the ration. Their quantities are usually prescribed by the manufac- turer. Another, but more complex alternative to mitigate this drawback would be incorporation of additional nutrient requirements for micro-miner- als and vitamins. Such an approach would yield a twofold problem. On the one hand, animal re- quirements must be estimated accurately, and on the other hand, one would need to make special fodder analyses, which are very expensive. From a nutrition quality aspect, we can con- clude that WGP supported by a penalty function yields a more balanced ration than LP. This also confirms the absolute sums of total relative devia- tions from nutritional requirements (Table 5). The latter has been observed as one of those parameters that measure the ‘quality’ of obtained results. This significantly manifests itself in the first three fat- tening periods where, from a nutrition viewpoint, the obtained diets of WGP are much better than LP’s rations. The most important advantage of this approach is proven in the second and third fattening period (WGP I and especially WGP II in both cases), where the penalty system significantly reduces energy surpluses. This fact is especially important in practice, namely the energy surpluses could affect carcass fatness and hence affect the carcass value. An important issue which must be taken into account in the penalty function is that the energy and protein surpluses, or deficiencies, can affect weight gains. The penalty system enables one to control de- viations from set target values (goals). The more severe cost penalty system in the first scenario has a significant impact on all four fattening periods and on nutrition quality of the rations. Even though WGP I rations are more balanced in all four pe- riods, they are only 4% more expensive then the least-cost ration (LP). This fact is even more pow- erfully manifested in the second scenario, where intervals for cost deviation are relaxed. As a result, they increase in comparison to the first scenario from 1.7% to 5.3%, but total deviations as a quality parameter, decrease from 4.7% and up to 17.5% respectively. This could be understood as a contra- diction between nutrition quality and economics. However, when rations are not balanced—even if individual parameter requirements are fulfilled— one cannot expect to achieve anticipated daily gains, resulting in higher per unit production costs. With proper definition of weights, deviation in- tervals, and penalty coefficients, one can improve diet without significantly influencing a ration’s cost (Table 5). Despite a slight price increase, cost efficiency is improved through numerous factors. On the one hand, surpluses cost money in terms of increased pollution, but usually also in terms of higher private production cost. Unbalanced rations influence animals’ health and also have negative impacts on daily gains. An example could be ex- cessive protein intake resulting in necessary ad- ditional energy to eliminate excessive nitrogen. That costs money to both the producer and society due to increased pollution by nitrogen excretion. It might also manifests as a longer fattening period. Finally, more balanced rations might also reduce GHG emissions (Brink et al. 2001). A G R I C U L T U R A L A N D F O O D S C I E N C E Žgajnar, J. et al. Multi-step beef ration optimisation 204 A G R I C U L T U R A L A N D F O O D S C I E N C E Vol. 19(2010): 193–206. 205 Conclusions From the results obtained, it is apparent that a combination of deterministic linear programming technique and weighted goal programming sup- ported by system of penalty functions seems to be a promising approach to be applied at the farm level. It tackles the problem of common least-cost approach for nutrition management. It enables one to formulate least-cost rations without taking too much of a risk in worsening the ration’s nutritive value in the sense of its quality, which is the main common drawback of LP. Obtained results show that one could formulate more balanced rations with minor increases in ration cost. However, Rehman and Romero (1987) have shown under different conditions that with this approach, it is possible to achieve even additional reductions in ration cost comparing to the least-cost ration. The same result has been achieved by Lara and Romero (1994) with interactive multigoal—STEM approach. Refined control is possible through a penalty function system that differs between different de- viation sizes and separately for each goal. These parameters should be set before the program starts to solve the problem (ex-ante principle); however, Lara and Romero (1994) have applied interactive ways of solving this type of problem, where pos- sible relaxations are elicited through computer- ized dialogue. This ‘super control’ is becoming increasingly important in nutrition management, and seems to be emphasised in line with general globalisation impacts such as input price increases and environmental as well as climate change as- pects. Deficiencies in applying the tool developed here is that one could optimise only those types of multi-criteria decision-making problems that have known ‘target’ values. And for a practical applica- tion it is major challenge to determine valid numer- ical values of weights used in the penalty function. However, in the case of ration formulation, one should also deal with other types of goals. An ex- ample might be feed preferences, when one knows only that individual feeds should be incorporated into the ration, but does not know in what quanti- ties. An everyday example is also to give priority to fodder in storehouses or fodder with shorter expira- tion periods. Common to the mentioned problems is that the decision maker does not know the target quantities of feed; but knows only that for certain ones, ‘the more the better’, while for others ‘the less the better’. If this proves to be an important issue, another MCDM technique should be used (e.g., compromise programming). Rations calculated with the tool are directly applicable, assuming that there is ‘perfect’ infor- mation for input data (price, quantity, quality) at the disposal of the end-user. As pointed out before, this is not usually the case due to numerous fac- tors. Therefore, one can address questions such as: ‘How does variability in feedstuff affect the deci- sions we make in formulating rations?’ or ‘How should a beef farm adapt to the unavoidable con- sequences of climate change?’ For the short term, such questions could be addressed with more fre- quent ration calculations, while for the medium and long term, one could obtain practical answers only by strategic planning of the whole farming busi- ness. These issues should be addressed by more complex approaches. In the modelling sense, this means to move from deterministic to stochastic concepts and from static to dynamic problems where ration formulation is based on the use of a dynamic growth model. Acknowledgements. Thanks are due to M.Sc. Ajda Kermauner Kavčič for her review of obtained ra- tions. The authors are also grateful to two anonymous reviewers for helpful suggestions contributing to improvement of the manuscript. References Balkhausen, O., Banse, M., Grethe, H. & Nolte, S. 2005. Modelling the Effects of Partial Decoupling on Crop and Fodder Area and Ruminant Supply in the EU: Current State and Outlook. In: Modelling Agricultural Policies: State of the Art and new Challenges. Proceedings of the 89th European Seminar of the European Association of Agricultural Economics. Parma. p. 565–587. Binfield, J., Donnellan, T., Hanrahan, K. and P. Westhoff. A G R I C U L T U R A L A N D F O O D S C I E N C E Žgajnar, J. et al. Multi-step beef ration optimisation 206 2004. CAP Reform and the WTO: Potential Impacts on EU Agriculture. Selected Paper prepared for presenta- tion at the American Agricultural Economics Association Annual Meeting, Denver, Colorado, July 1 – 4 Brink, C., Kroeze, C. & Klimont, Z. 2001. Ammonia abate- ment and its impact on emissions of nitrous oxide and methane in Europe—Part 1: method. Atmospheric En- vironment 35: 6299–6312 Darmon, N., Ferguson, E. & Briend, A. 2002. Linear and nonlinear programming to optimize the nutrient densi- ty of a population's diet: an example based on diets of preschool children in rural Malawi. American Journal of Clinical Nutrition 75: 245–253 De Cara, S., Houze,́ M. & Jayet, P.A. 2005. Methane and nitrous oxide emissions from agriculture in the EU: a spatial assessment of sources and abatement costs. Environmental and Resource Economics 32: 551–583 Ferguson, E.L., Darmon, N., Fahmida, U., Fitriyanti, S., Harper, T.B. & Premachandra, I.M. 2006. Design of Optimal Food-Based Complementary Feeding Recom- mendations and Identification of Key »Problem Nutri- ents« Using Goal Programming. The Journal of Nutri- tion 136: 2399–2404 Gass, S. 1987. The setting of weights in linear goal-pro- gramming problems. Computers and Operations Re- search 14: 227–229 Hazell, P.B.R & Norton, R.D. 1986. Mathematical program- ming for economic analysis in agriculture. New York: Macmillan: p. 400 Lara, P. 1993. Multiple objective fractional programming and livestock ration formulation: A case study for dairy cow diets in Spain. Agricultural Systems 41: 321–334 Lara, P. & Romero, C. 1994. Relaxation of Nutrient Require- ments on Livestock Rations through Interactive Multig- oal Programming. Agricultural Systems 45: 443–453 McDonald, P., Edwards, R.A., Greenhalgh, J.F.D. & Mor- gan, C.A. 1995. Animal nutrition. 5th ed. New York: J. Wiley & Sons. p. 607 Romero C. 2004. A general structure of achievement func- tion for a goal programming model. European Journal of Operation Research 153: 675–686 Rehman, T. & Romero, C. 1984. Multiple-criteria decision- making techniques and their role in livestock ration for- mulation. Agricultural Systems 15: 23–49 Rehman, T. & Romero, C. 1987. Goal Programming with penalty functions and livestock ration formulation. Agri- cultural Systems 23: 117–132 Rehman, T. & Romero, C. 1993. The Application of the MCDM Paradigm o the Management of Agricultural Systems: Some Basic Considerations. Agricultural Sys- tems 41: 239–255 Tamiz, M., Jones, D. & Romero, C. 1998. Goal program- ming for decision making: An overview of the current state-of-the-art. European Journal of Operational Re- search 111: 569–581 Tozer, P.R. & Stokes, J.R. 2001. A multi-objective program- ming approach to feed ration balancing an nutrient man- agement. Agricultural Systems 67: 201–215 Waugh, F.V. 1951. The minimum-cost dairy feed. Journal of Farm Economics 33: 299–310 Zeller, H. & Häring, A.M. 2007. Farming in eastern Germa- ny: From Food to Energy Crop Production?. In: O’Reilly S., Keane M., Enright P. (eds.). A Vibrant Rural Econo- my – The Challenge for Balance. Proceedings of 16th International Farm Management Association Congress, Cork, 15–20 July 2007. p. 157–163 Žgajnar, J., Kermauner, A. & Kavčič, S. 2007. Model za ocenjevanje prehranskih potreb prežvekovalcev in op- timiranje krmnih obrokov. In: Kavčič S. (ed). Slovensko kmetijstvo in podeželje v Evropi, ki se širi in spreminja. 4. konferenca DAES. Moravske toplice, 8–9 November 2007. p. 279–288 (In Slovene). Abstract: Estimation of ruminants’ nutritional requirements and livestock ra- tion optimisation. Multi-step beef ration optimisation: application of linear and weighted goal programming with a penalty function Introduction Material and methods Weighted goal programming with a penalty function Modelling tool for beef ration optimisation Mathematical formulation of the first and second modules Input data Results and discussion Conclusions References