Evaluation of Replacement Policies in Sow Farms Using ArenaTM Simulation Software

This paper presents an application of the simulation of discrete events (SED) using ARENATM in the management of large-scale breeding farms. The main objective of the simulation model is to find a policy of replacement, to ensure the best economic performance of a farm. The only variant analyzed of replacement policy was the number of cycles set in permanency for a sow in the herd. Considered incomes come from the sale of piglets and unproductive sows, and costs are due to the feeding of animals, replacement sows purchases, and the operation expenses of the farm. For this analysis, the production process was divided into three major stages called: mating, pregnancy or gestation and lactation. The sow’s movement from one stage to other was modeled by cycle-dependent transition probabilities. Considering the daily utility, as response variable, the model shows the best number of cycles to maintain the sows.


Introduction
The correct administration of an intensive farm of reproductive sows is a fundamental part for the success of the supply chain of meat product derived from pigs. Chavas et al. [1] admitted the importance of the dynamics of productive systems when growing pigs in farms. Moreover, it is necessary to consider the economical aspect of the process because the products might be commercialized at any moment. Glen [2] makes a review of the imple-mentation of models of operations research in the management of crops and cattle farms, emphasizing that its use was accessible only for investigators and units of support. The rise of microcomputers might have promoted that farmers use models like the above. With these conditions, a first model for the replacement of sows was proposed by Huirne et al. [3], on which Jalvingh et al. [4] based his thesis, concluded that the replacement of sows was a tactic decision problem. Huirne's [3] proposal was based on a dynamic programming model while Jalvingh's [4] used a Markovian chain model, both models considered performance economic measures like the annual net returns. The same problem was solved by Rodríguez et al. [5] [6], using stochastic linear programming in two phases for a medium-term planning horizon. Plá [7] makes a review of the mathematical models used in the management of the porcine farms, concluding that simulation, linear programming and dynamic programming models were the most used. It is convenient to highlight the need for models which consider the behavior of the system in the transition state and non-homogeneity of the parameters. The simulation [8] and semi-Markovian chains models [9] have been used to plan the pigs' facilities, but without including economic considerations. Kristensen and Sollestad [10] proposed a sows replacement model to predict the performance of the production using Markovian hierarchical multi-level processes and efficient methods of estimation of parameters. However, it was pointed out that this estimate is difficult at herd level because of the lack of sufficient data. In the same way, Plá [11] presents a formulation of a semi-Markov linear programming model, which tries to solve the problem of planning facilities, where the replacement of sows becomes instant.

Problem Formulation and Model Conceptualization
The problem of replacement a sow in porcine farms consists on determining when is the best moment in which the sow is no longer reproductive and it must be replaced. That is, to find an ideal replacement politics of sows to keep them in the porcine herd. The productive cycle of a multiplier sow essentially consists of three stages: copulation or mating, gestation, and lactation (see Figure 1). A sow will follow these stages if there is no fall for illnesses, death or bad performance.
The number of cycles a sow must stay in the herd is an important question for the farmer, since, when a sow is eliminated, it has to be replaced. As there is no choice, farmers may consider the replacement as a losing of a reproductive unit of piglets. However, not all the reproductive stages are the same. The prolificacy increases in the first cycles and reaches the best production in the fourth or fifth, and then it drops steadily as the sow gets older. In general, the older sows are, the less productive they become. Thus, farmers face the problem to determine the exact moment when the expected prolificacy-since this is the main income-is not enough to support the costs of maintaining a sow in the porcine herd. If this happens, it is better to replace the adult sow by a younger one with better productive expectations.
The time a sow remains in each stage can be described by variables of continuous randomness. The productive life of a reproductive sow will be the base of the simulation model presented in this paper. It begins with the introduction of a lot of sows to the pest house in the farm. Here, they remain in a quarantine period, isolated from the rest of the herd in order to avoid introducing possible diseases to the farm. Afterwards, they are inseminated. The copulation used to be a natural mount but, nowadays it is done by artificial insemination. Today the boars are only used to stimulate the zeal in sows. The semen application is done in three doses, every twelve hours. After three weeks, the sow is diagnosed to verify pregnancy. If it is not pregnant, the process will recur up to three or four times. But if any attempt fails, the sow will be replaced by a new animal. During the productive life of the animals, it is possible that some sows develop illnesses, which makes necessary to remove them from the herd. The sows that get pregnant are taken to gestation parks. If there was an abortion event in this stage, it is possible that the sow died. But if not, the sow can even develop serious illness provoking a reaction of immediate substitution.
The final stage of gestation is the birth giving way to the lactation. There, the sow stays about 3 and 5 weeks with its litter. Here, the farmer considers the appropriate time the piglets have grown for the weaning. The lactation finishes with the weaning, marking the end of the finished reproductive cycle. After the weaning, the sow initiates a recess. Here the sow remains until its biological cycle makes her enter again "heat" and predispose it to a new artificial insemination. Therefore, the causes of voluntary or involuntary retirement of sows are: the maximum number of authorized cycles; infertility; low productivity; abortions leading to deaths; accidents or illnesses. The hypothesis followed in this model for the replacements is an immediate substitution, i.e., when a sow is culled from the herd, a new one is available and ready to be introduced immediately. That is, the model is not considering the quarantine. The politics mentioned above are usually common practices in farms of small size, especially when they are administered by family groups.

Development of the Computational Model
The simple representation of the system under study, shown in Figure 1, obviously gives a very superficial description. With the knowledge described in the preceding paragraphs about the system operation, then, it was possible to develop a flowchart (Figure 2). According to the previous flowchart, a pseudocode (Figure 3) was built as a step to create the ARENA model. For the construction of the computational simulation program, it was necessary to define the state variables, the parameters and the performance variables that appear below. The random variables of entry in this model are supposed, in some cases, dependent on the number of cycle and mount in which the sow is, which is logical to suppose since its fertility and other characteristics of performance turn out to be affected as the sow ages. Some of the reproductive parameters dependent of the cycle number, used as entries in the simulation model are characterized in Table 1. From the whole set of parameters of entry, some of them were the result of execute goodnessof-fit tests with the software Best Fit by Palisade, with available information in farms of Spain [12]. Others are reported in the works of Allen and Stewart [13], Marín et al. [14], Plá [15], Singh [8]. For example, Figure 4 shows the probability of distribution for the time up to the first estrus after having weaned the piglets.   The costs in € per animal-day related to the feeding of the animals which for this system were simulated 0.8, 0.8, 1.0, 0.12, for the sows in mating, gestation, lactation, and piglets in lactation, respectively, while the related one to the operation of the facilities and handling of animals was 0.5 in € per sow. The prices of purchase and sale of animals were: buy of new sow150 €, sale of piglet 30 € (7 -9 kg, 21 -28 days), sale of sow 120 €. The price for dose of artificial insemination was 6 €.
A set of submodels was constructed in ARENA TM to represent the dynamics of the typical productive system of a porcine farm (see Figure 5). These submodels are in correspondence with the stages defined previously of mating, gestation and lactation. In addition, two more submodels were added; one for the statistics compilation product of the culled sows; and, other for setting up the model with the economical and reproductive parameters.
The mating submodel (see Figure 6), shows the process of attempts that might be necessary to get a pregnant sow, or even the way to get it off the system. The gestation and lactation submodel (see Figure 7), represents how the sow in the gestation process could have an abortion event or, if the sow can reach the normal period of gestation for the farrow, the total number of piglets to be weaned. At the end of the process the sow has a new recovery period before trying another mating.
In order to reproduce the characteristics of farms operation and to look for the optimal number of cycles, a sow must remain for a better economical performance in behalf of the system. It was set a period of 6000 days (approximately 16 years) to study the behavior in steady state.
The initial distribution consisted on the introduction to the empty system an initial lot of 148 sows for mating. The model simulates simultaneously in an individual way the 148 animals and records every activity. The response variables can be recorded in a set of cards and can be seen graphically.

Verification and Validation and Analysis of the Model
The verification process in this model consisted of determining that several modules fulfilled their target. For example, when the deaths and culling were eliminated, the variables that tracked this were remaining in zero, pointing out that the sows with eight complete cycles initiate its substitution later to those of another number of the cycle, and that the utilities were appreciated until there was a sale of piglets or culling sows, etc. Also, with this model, it was verified that the hypothesis of equilibrium was fulfilled.
Thus, Figure 8 shows a typical realization of the sows number in the mating and gestation stages, where the size of the population in each of them tends to a state of steadiness. For example, it is possible to observe that the number of sows in the steady state of mating and lactation is approximately 25, and the biggest population is in the gestation stage, range about 90, which is logical to expect, since it is here where they spend more time. These population behaviors give an idea of the size of the facilities to be used.
The model validation mainly consisted of reflecting the conditions found in farms through visits in situ, porcine area expert's feedback and the obtaining of some parameters of entry reported in the literature.  In order to evaluate the replacement policies (changing the maximum number of allowable cycles in the herd), it was necessary to measure the economic performance. First, profit per day (UD t ) and the profit per piglet (UL t ) were selected. The final analysis was then to change the number of cycles (see Table 2) that it is allowed to remain maximum to a sow in the herd and to register some statisticians of the daily utility. For example the average value between replications; the confidence interval for the average to 95% of level of confidence, considering ten replies, under a period of simulation of 10,000 days. The results indicate that under the genetic conditions of fertility and mortality, costs, sale prices, etc., typical of the simulated farm, the average daily utility takes positive values from   the fifth cycle and reach the maximum value, when eight cycles are allowed for keeping the sows (see Figure 9). It is possible to do the extrapolation for some genetic parameters, or to cover experiments in situ with the real system for cycles bigger than eight, and to incorporate them in the simulation to see in which of them, it is obtained to optimize the variable of study. The results for every farm in particular can change depending on the  values of parameters used, as well as of the politics of handling.

Conclusions and Future Work
The contributions of the model are: 1) it solves the problem of getting an optimal replacement cycle for sows with no antecedent in previous simulation models like those of Allen and Stewart [13] and Sing [8], since the first one tries to find the optimal lactation periods and the second addresses only how to use the facilities of the farm in the best way, 2) the proposed model is built on a simulator, not simulation languages like those used by the authors mentioned above which in the past were very difficult to use for validation purposes , and 3) through the model it is possible to study a transient state of the system, important for decision making, for example for recognizing the payback period of the investment. The statistical analysis of the performance variable (average daily profit), of the proposed simulation model to replace sows showed that the optimum number of cycles to maintain in herd is eight. However, it will depend on the specific input parameters to each herd, including the animal genetics and prolificacy. It can be considered in a future model that the food prices and the sale and purchase prices of animals may have seasonal variations or trends. Some other performance variables to be considered could be the growth of animals and the quality of the product throughout the process. Also, the model can be used to study both how many sows are grouped for culling and how much waiting time is allowed for the replacement.