Generating Efficient Breeding Plans for Thoroughbred Stallions David N. Blake David Blake Consultants, PO Box 479 Manurewa, Auckland, New Zealand. Abstract This paper outlines a heuristic method for generating efficient breeding plans for thoroughbred stallions. Given that the breeding season is only approximately 90 days per year, stud farm managers are faced with the problem of having their stallions fertilise as many mares as possible. Complications arise due to sub-fertility of some stallions, ovulation (estrus) cycles o f mares, and the stochastic nature o f the problem. 1 Introduction The horse racing industry is by definition an extremely competitive and (possibly) lucrative business. Colts with good racetrack performance and/or pedigree are often sought after as breeding stallions. In turn these individuals command high stud fees. The breeders seek to have their mares bred by these stallions in the hope o f breeding a champion. The managers of stud farms are generally responsible for preparing their idea of the best breeding schedule for a stallion over the breeding season. They would aim to maximise the utilisation of the stallion to gain the best return possible in terms of stud fees. This therefore means a better breeding schedule could directly result in an increased profit for the stud farm. To this end, this paper outlines a heuristic which seeks to quickly generate breeding schedules that maximise the income returned by each stallion. This generally means maximising the number of mares in foal such that various constraints are met. This is the first attempt at such an optimisation the author is aware of. As the next section will show, the real-world factors inherent in this problem make the solution difficult. 2 Problem Description The breeding season for horses is approximately 90 days long. Given that a mare has an estrus cycle of approximately 21 days length, there are 3-4 chances for her to conceive in a 87
season. At the beginning of the season a mare is either in foal from the previous season (she will give birth and be ready to be bred at some point), barren (she did not get in foal the previous season, so she can be bred as soon as she starts cycling) or a maiden mare (this is her first breeding season, so she is also ready to be bred as soon as she starts cycling). Each mare is booked in to be serviced by one stallion only, so each stallion can be scheduled separately. These factors are important because when a stallion mates a mare, the outcome is unknown until approximately 16 days later when a veterinarian can perform an ultrasonographic pregnancy examination on the mare. The best that can be done then, is to maximise the probability that a pregnancy will occur. The calculation of this probability is not straight forward though because factors such as fertility rates are hard to measure and quantify (there is some debate on what a normal fertility rate is in the first place). What is available, however is past data for stallions and mares reaching back several years. From this, initial estimates of parameters can be made. Some of the quantities that are important are: Stallion fertility rates. By this I mean an average chance that a foal will result when a stallion and mare breed. In this problem 3 positive rates are used for a stallion, corresponding to whether the stallion is bred zero, once, twice or three times in a day. Mare fertility rate: This is similar to a stallions fertility rate except that a mare is generally only bred once a day, so there is one fertility rate for each mare. Fertility rate can be affected by age, number of previous foalings, clinical status and reproductive history. Goal fertility rate: This is an estimate of the probability of a pregnancy resulting from any given breeding under ideal circumstances. This is generally less than 1. Stallion work function: This is a function which reflects how a stallion s fertility rate declines with increased workload. Previous work has found that the fertility rate of subfertile stallions can be greatly influenced by the number of breedings per day. This function is different for each stallion, and takes a measure of the amount of work performed by the stallion (density of the schedule - see below) as a parameter. Schedule density: This is a measure of how many times the stallion has been bred in the recent past at a specific point within the schedule. As stated above, estimates of these quantities can be derived from historical data but this will in the end limit the accuracy o f any solution. The chronological nature of this problem adds a certain amount of complexity also. As the breeding season progresses, new information comes to light. This usually means the schedule needs to be rebuilt, with the new information in place. Some examples will illustrate this best. A mare needs to be bred within 48 hours prior to ovulation, but since it is never known exactly when a mare will ovulate, she may be scheduled in and bred with the stallion a day or two early. A couple of days later the mare can be tested to see if she has ovulated, if she hasn t then she needs to bred again, hence the schedule is changed and will need (in part at least) to be recalculated. 88
If a mare is bred by a stallion, the outcome is not known for approximately 16 days. If the mare is in foal then she will not need to be bred with the stallion again, hence she will not re-appear in the schedule. However, if she is not in foal, she needs to be reinserted into the schedule at a later point in time. So after the test is performed, there is new information which can be used. The pool of mares booked in to be bred to a stallion will change in size as the season progresses. If a lot of mares conceive early in the season, then more mares can be booked in, conversely if mares are remaining barren some may need to be dropped. The latter situation is bad in terms of the perceived fertility rate of the stallion. This could result in mare owners ( who don t want their mares going unfertilised (barren) for a season because they won t produce a potentially valuable foal) deciding to book their mares into a different stallion with a higher perceived fertility rate per cycle (number of mares cycles needed for the mare to conceive). So if the size of the pool of mares changes, this could drastically effect the schedule, therefore it would have to be re-built. The objectives o f the problem are as follows: Maximise the number o f mares fertilised, hence maximise profits. Maximise the stallion fertility rate per cycle, hence decrease the stallions workload. Minimise the costs associated with each breeding due to drugs, travel, veterinary fees, tests etc. However, these objectives are all encapsulated by the single objective: Maximise the number o f pregnancies from minimum breedings. The aim of the heuristic therefore is to maximise each probability of fertilisation and produce a schedule of the stallion s activities into the future. 3 Heuristic Outline Since there are approximately 90 days in the breeding season and a stallion is usually bred 0,1,2 or 3 times a day, there are potentially 270 slots or time periods in which the stallion can be worked, see Figure 1. Dayl Day 2 Day3 Day 88 Day 89 Day 90 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 Figure 1: The Breeding Slots. Each of the 270 slots represents a time when a mare can be scheduled to be bred with the stallion. The heuristic then schedules each mare into each slot and which she is ovulating. This is done in such a way that all legal combinations are considered and each 89
combination (called a line o f work - LOW) is given a score. The highest scoring LOWs can then be presented to the user as the solution(s). The main-line o f the heuristic is shown in Figure 2. It is essentially an iterative implementation o f depth-first search through the tree o f legal LOWs. periodnun = 1 bestsofar - -10000 Call generateauailables(periodnun, auailables(), nunauailableso) Do If nunauailables(periodnun) > 6 And periodnun <«nunperiods Then Call addnextauailable(periodnun, availables()( nunauailableso) Call ScoreLOU(bestSoFar) Call generateauailables(periodnun, auailableso, nunauailableso) Else renoueauailable periodnun If periodnun - 0 Then Exit Do Loop Figure 2: The Main-line of the Heuristic. There are four functions in the above diagram which drive the search, they are: 1. GenerateAvailables(i) - this function goes through the list of all mares and finds those who are ovulating just after the slot i. Each of these available mares is recorded in a list along with the number of them. 2. AddNextAvailable(i) - this function chooses the first available mare on the list of available mares for slot i and inserts her into the LOW. PeriodNum is incremented. 3. RemoveAvailable(i) - if there are no untried available mares left in slot i then step back to slot i - 1 and try the next available there. 4. ScoreLOW - the score assigned to each LOW is a measure of how good or desirable each LOW is. This is where all decisions are made and it s the complex part of the heuristic. This function goes through each slot in the LOW and for each breeding calculates the probability of a fertilisation resulting. The score assigned to each LOW is simply the sum of these probabilities. The higher the score the more desirable the LOW is. This function is described in detail in the next section. 4 The Scoring Function The score function is shown in Figure 3 (next page), where fertilisation_probability(i) = stallion_fertility_rate(i) x mare_fertility_rate(i) 90
score - B For j - 1 To nunperiods If L0U(j) > 0 find LOU(j) <> 999 Then score - score + fertilisationprob(lou(j ), j) Next j If score > bestsofar Then For j - 1 To nunperiods solution(j) * LOW(j) Next j bestsofar «score Figure 3: The Scoring Function. The stallion fertility rate for slot(i) is calculated from the stallions historical fertility rates for breeding once, twice, and three times a day. See Figure 4. Figure 4: The Stallion Work Function. The shape of this function is different for each stallion. Some stallions fertility rate are greatly effected by work load, others are not. This function is called a work function and takes the density of the LOW as a parameter. The density(i) of the LOW is a measure of how many breedings have been performed recently as at slot(i). This is calculated as follows: density(i) = a x, + (l- a)density(i-l) for a * 0.7-0.9 This places a high weighting on the events in the most recent past, with a lesser weighting on more distant events. This means, the number of breedings in the last two to three days are more important than the number of breedings 10-11 days ago. 9I
The mares fertility rate is the product of her historical fertility rate and the probability of her ovulating two to three days after the breeding. mare fertility rate(i) = historicalfertilityrate x probabilityofim inentovulation 5 Other Issues and Enhancements 1) The idea of a goal fertility rate was introduced in the Problem Description section. If it s likely that a breeding between a mare and a stallion falls well short of this then it may be desirable to give the mare drugs to delay her ovulation to a time when the stallion will have less work to do and therefore (possibly) a higher fertility rate probability. This requires an adjustment of the GenerateAvailables function. Essentially another available is added 7-8 days later, so that both LOWs will be considered. Whichever combination has the higher score will determine whether or not the mare should be given the drugs. 2) As discussed in the Problem Description section, when a mare and stallion breed, the outcome is unknown until approximately 16 days later. This means a decision has to be made when scheduling mares to the stallion. If it is decided that all breedings will result in a conception then the schedule produced will be far from the real situation. What happens in practice is that some mares do not conceive and therefore need to be bred to the stallion again. The difficulty lies in deciding which mares will conceive and which won t. Again a cut off probability can be used and again requires a change to the GenerateAvailables function. Essentially if a mares probability of conceiving the first time she is bred is low then she will be recycled back in later. This means the score for the LOW will decrease because the costs associated with breeding the mare are subtracted twice from the LOW score. 6 Conclusions This paper has outlined a heuristic which could easily be incorporated into a software package (the author is currently doing this). This software package could be used by an equine consultant or farm manager in the day to day management of stallions on a stud farm, maximising the potential of the farm s stallions. Integrated with an in-depth database and diagnostic tests (also under development), such a program would have enormous use and economic value in terms o f competitive advantage gained by those using it. Acknowledgements I would like to thank Dr Patrick Casey (Director Andrology Services, Research Centre in Reproductive Medicine, Dept of Obstetrics and Gynaecology, Auckland, New Zealand) for his enthusiasm and pragmatic approach to this problem. Thanks also to Dr Dave Ryan (Engineering Science Dept. Auckland University) for some initial ideas on how to solve the problem. 92
References [1] R. Yanagimachi, Sperm capacitation and gamete interaction. J. Reprod. Fert. (Suppl.), 38 (1989), pp 27-33. [2] J.M. Bedford, Sperm capacitation o f fertilization in mammals. Biol. Reprod. (Suppl.2), (1970), pp 128-158. [3] R.P. Aman, Can the fertility potential of a seminal sample be predicted accurately? J Androl (1989), pp 10:99-107. [4] J.W. Barnes, M.Laguna. A review and synthesis o f Tabu Search Applications to Production Scheduling Problems, Technical Report ORP91-05, University of Texas at Austin (1991). [5] F.S. Hiller, G.J. Lieberman. Introduction to Operations Research, McGraw-Hill (1990). 93