Advanced Optimization in AMTS.Cattle.Professional
Author: Samuel Fessenden, PhD
The advanced optimizer in AMTS.Cattle.Pro uses a genetic algorithm to create, evaluate, and evolve rations that are more cost effective at meeting the nutrient requirements. Essentially, the optimizer is trying to breed a better ration within the specified ingredient and nutrient constraints.
To visualize the task we are asking the optimizer to perform, take a look at the depiction of a partially submerged mountain range below. The total mountain range represents all possible rations within the specified ingredient constraints (amount of Corn silage, MML etc). The portion above water are the rations that satisfy the nutrient, i.e. ration output constraints (ME, MP, etc.). Our goal is to find the formulation that corresponds to the tallest peak.

First, we create a random population of candidate rations, represented by green stars, and place them on the mountain range. Their X-Y coordinates in the mountain range are determined by the ingredient composition. Then we measure their altitude, or ability to meet the nutrient constraints. In the optimizer, this is called the fitness value. Some, if not most, will probably be underwater, meaning they do not meet the minimum fitness. Next, we select the individuals with the highest fitness value and breed them to produce many offspring, each with a different combination of characteristics. We also throw some random mutation in there for good measure.
This breeding creates a new generation of rations which are placed on the mountain range, again based on their ingredient composition (X-Y coordinates). Hopefully, some of this new generation will have a better fitness (higher altitude) than the previous generation! This process repeats a specified number generations. At the end, the individuals that met the minimum fitness value (above the water line) are displayed as solutions. The user can then sort these rations in a variety of ways. This is typically done based on economic considerations like ration cost or IOFC.
A linear optimizer, for comparison, would essentially draw a straight line across the mountain range. The highest peak on that line is called the ‘optimal’ solution. However, it is quite easy to see that you may miss a higher peak nearby depending on where you drew the original line.

With any optimizer, the best way to improve search efficiency is through careful constraint selection. For the ingredients, I typically advise people to set forage constraints based on inventories, while purchased ingredients and concentrates will be based on producer, nutritionist and mill preferences. Examples of ingredients that may have conservative maxes may be distiller’s, molasses, supplemental fat, or animal proteins.Setting constraints
It is usually best to encourage use of specific ingredients by setting minimum inclusion rates, not by reducing ingredient cost. To ‘lock in’ certain ingredients like mineral mixes, set the min and max to the desired inclusion amount, as shown with MinVit below.


Helpful Speed Hint: Before optimizing, it is a good idea to make sure you do not have any nested composites (ie, a mineral pack composite nested in another composite). These can slow down the optimizer considerably!

Nutrient constraints are set using the Min/Max and Safe Min/Max values in the ration output screen, as shown below. To include a nutrient in the optimization, make sure the “In Opt.” box is checked. Think of the Min/Max constraints as guidelines, and the Safe Min/Max as hard and fast boundaries.
Be thoughtful about your DMI constraints. Sometimes, you can let the optimizer find solutions in a wide range of DMI. If there are management considerations on the farm that prevent higher intakes, you may consider keeping the constraints closer to the actual DMI observed on farm. When in doubt, set the safe max DMI to < 0.5 lb. above actual DMI. The example below shows a moderate range on the DMI constraint.
The same principle applies to ME and MP constraints. If you set a high Safe Max (over 108% of req.) with tight DMI constraints, the optimizer will tend to pull in feeds that provide concentrated sources of ME and MP such as supplemental fat and animal protein, if available.


Economic constraints (IOFC, Feed Cost, IOpurFC, Purchased Feed Cost) are also set on the ration output screen. There are a couple ways you can use these outputs to find more cost effective rations:
• If you are starting from a fairly acceptable ration already, try setting the Safe Min or Max for the economic constraint at the current value of the ration. This will force the optimizer to return rations that are at least as economical as the current ration.
• If the current ration is outside several of your constraints, try running it first without the economic constraint, and see where the acceptable rations end up. Then, set that value as as the Safe Min/Max for a second run.
Helpful Speed Hint: Optimization time can be sped up considerably if you start from a fairly good ration—i.e. one that meets most of the constraints. Overall, it is better to constrain a little tight to start, and then open up the Safe Min/Max if the optimizer fails to find solutions.
Linear optimizers typically work best when constrained on tabular items such as CP, NDF, and Starch % of DM, and perform poorly when constrained with highly integrated and non-linear outputs, such as ME and MP, fermentable CHO and Rumen NH3-N. The advanced optimizer handles these complicated output constraints easily.
Optimizing the ration
In the Adv. Optimizer tab, there are three types of searches you can use:
Fast: This is best for relatively simple diets that may not have many ingredients, or may be well balanced already.
Normal: This setting should be used for most optimizations. It provides a good balance of speed and ability to find solutions.
In-depth: This setting is best for difficult optimization problems, or diets that have may ingredients with fairly wide constraints.

Once you have chosen you search type, you can click optimize. While the tool is running, there are several places you can look to evaluate progress:

Trial and Generation counters: Use this to estimate run time.
Number of solutions: This is the number of rations that meet the minimum fitness.
Min Cost and Max IOFC: Display of the best economic ration(s) found so far.
Fitness running average, Last Gen. Fitness Average, and Min/Max Fitness: Generally, you want to see the running average and Last Gen. Average increase over time. Once there are rations that are within the Min/Max fitness, you will have solutions.

Troubleshooting difficult optimizations
If the Last Gen. Average Fitness seems to stall out before reaching the Min Fitness, there are several things you can do:
1) If you are using Fast or Standard search types, try using the In-depth search
2) Look at the green bars next to the nutrient constraints (example below). The one with the largest bar is the nutrient that is causing the issue. Try adjusting that constraint.
3) Consider bringing in alternative feedstuffs that may help alleviate the issue with the troublesome nutrient constraint(s).


Helpful Speed Hint: If you see that the optimizer has reached minimum fitness, and the solution number is increasing quickly, just click stop optimization and look at the solutions. It is unlikely that more trials will find a better ration, so you may be able to save a lot of time.
Choosing the final solution
Once the optimizer has run, the selected number of solutions will show on the screen. Below the Optimize Button is a Sort Solutions button. Here, you will be able to choose some sort options.


The default sort will control how results are shown when no other sort options are selected. The multi-level sort options can allow the user to apply a customized sort to the results, such as feed inclusion amount, DMI, economic considerations, etc.
Helpful Speed Hint: If you usually want to sort based on Cost of IOFC, set this as the default, and set the # of Solutions to show (on the main Adv. Optimizer tab) to 10. This way you will only see the 10 best rations for Cost of IOFC
So, how do I optimize?
On the constraint side, I typically include fermentable CHO and rumen NH3-N constraints to maximize microbial yield. I may also try to encourage home-grown feedstuffs use by including a constraint on income over purchased feed cost (IOpurFC). When balancing for AA using the relationship of AA:Mcal of ME, be aware that relatively open ME constraints may require unrealistically high supplementation with protected amino acids. I also tend to keep fairly tight DMI constraints. When reformulating a diet for a group of cows that I already understand, I am likely not going to change the diet a lot in one go. This means the actual DMI on farm is my best indicator of possible intake after the reformulation.
I typically start the optimizer with a ration that fits most of the constraints, Sometimes I will have already run it through the linear optimizer. I may perform several optimizations runs on a given ration to help guide the algorithm to a satisfactory answer. This typically means re-evaluation of constraints based on the behavior of the optimizer.
As with many things, experimentation with many types of rations will be the best way to establish your specific method of optimization. As you become more comfortable with the process, real savings for the producer can be realized. Users in the field typically find savings of $0.10 to $0.40 cents/head/day when switching from manual formulation to optimized formulations. We have even seen some realize economic benefits over $ 0.80.
How much are you leaving on the table?

Translate »