Strategies for getting better results from Non-Linear Optimization

 

Setting feed constraints

Most of the times, the results of optimization is a good compromise between values of the objective(s), meeting of the constraints and overall balancing of the recipe solution; if this does not happen, it could depend on how the constraints on the feeds amounts are set. Obviously, some constraints can reflect the actual availability of a certain feed, but possibly others could have been less or more arbitrarily set (e.g. above and below the current feed amount in the recipe that has to be optimized by a certain quantity) and can be reasonably changed, at least by small amounts. Changing a min or a max for a certain feed before re-optimizing, can sometimes improve the quality of the solutions; for example, reducing the min for feeds that have high costs, can result in solutions with an overall lower cost.

 

Ranges

During optimization the optimizer does a search for solutions, having their ingredients amounts within the ranges defined by their min and the max. It is possible to set open ranges for one or more feeds, avoiding setting a max for them; anyway, this kind of ranges could affect the performances of the optimizer, due to the increased computational complexity. Similarly, very wide ranges although giving more degrees of freedom to the search can result in a solutions space too ample to be sufficiently examined.

On the other hand, very narrow ranges could limit the action of the optimizer; for example, if the initial recipe that needs to be optimized is “bad” in terms of optimality and/or objective values, and the constraints on the feeds are set just under and over its current feeds amounts, it is highly likely that the optimizer will not find much better solutions.

 

Total DMI constraints

Another possible source of poor results can be how the constraints on the total DMI are set; for example, the max on the total DMI could be too low to allow the optimizer providing sufficient amounts for some feeds to meet the constraints on the analytical or biological values.

Notice that if the sum of the feeds min exceeds the max for the total DMI, a message will be prompted to inform that some constraints have to be changed; the same if the min for the total DMI exceeds the sum of the max for the feeds (all the feeds having a max).

 

Generating constraints automatically

As described above, NDS provides a feature to automatically generate constraints; this can be useful when optimization with user-defined constraints gives poor results since in this case the min and max for each feed are evaluated after performing an analysis to determine the “best” local values. After this step, it is possible to individually change those min and/or max that do not comply with initial nutritional or economical specifications.

 

Interpreting the results

After each optimization a set of solutions is displayed; at this point, one can compare the objective and constraints values of the results with those of the initial recipe to check if the search has produced results that improve the last one. Ideally, a result could overperform the initial solution in terms of objectives values and optimality, but there are cases where, for example, better optimality can only be achieved losing something in terms of objectives (e.g. higher cost or lower IOFC). Where a multi-objective optimization has been performed, the overall quality of each solution could be prone to subjective interpretation, especially when concurrent objectives are selected; consider, for example, two solutions that have different costs, the one with the higher cost also having a higher milk production; the trade-off is evident.

During this comparison is also recommended to check if the feeds amounts of the initial recipe are within the constraint ranges and if its total DMI value is also within the DMI range; sometimes the optimizer ends with solutions that are apparently worse than the initial recipe, but only because the current ranges prevent it from using certain amounts.

 

Improving a solution with sensitivity

If a result after optimization has some ingredient amounts set to the min or max of the related feed, there is a chance that the solution could be further improved by moving some of these the constraints. The sensitivity tool of NDS provides several features to describe what happens when the amounts of the individual feeds are set beyond their constraints and show how the recipe values change consequently.

If the case of a sub-optimal solution it is possible to move it toward optimality, reducing or zeroing its constraints violation, while an already optimal solution could similarly gain better objective values.

Sensitivity also offers a feature to re-balance current feeds constraints, based on an analysis performed on the selected solution data, that can be used before running further optimization with new boundary conditions.

 

Optimizing DCAD and uNDF

 

It is possible to define constraints on these parameters in both linear and non-linear optimization, ticking the related options in Settings:

 

 

After this step, the parameters appear in separate grids under the analytical constraints in the optimization screen:

 

 

The behavior of these parameters is very similar to that of the linear analytical parameters, with an exception for DCAD, that can assume negative values; consequently, it is possible to input negative constraints for it. A constraint on DCad can implicitly influence the values of the nutrients that contribute to its value in the solutions; so, if there are constraints for those nutrients, it is worth avoiding setting conflicting constraints on DCAD, that could preclude finding optimal solutions.

 

Optimizing minerals on % requirements

 

It is possible to optimize the mineral analytical parameters on % of requirements basis, ticking the related option in Settings.

 

 

This action determines a change in the list of the constraints on the analytical parameters, converting the current values and constraints for the minerals. In the following example, Ca and P have the following % values:

 

 

After activating the % on requirements option, they change as following:

 

 

The values of requirements used to obtain the displayed values are available in the Minerals tab of the recipe screen:

 

 

 

 

In this grid, the last column shows the current level of the recipe on % of requirements basis. With this option, it is possible that the non-linear optimization process takes more time to complete because of the additional calculations involved.

 

 

Solution versions

 

It is possible to take snapshots of individual solutions with the Catch the version command, available after clicking with the right mouse key on the caption of the column of a solution:

 

 

The command is available for optimal, sub-optimal and best (comparison) solutions.

The selected solution, including its constraints, is temporarily stored in a list; it is then possible to edit the automatic name, assigned by the procedure, in the panel that appears after clicking on the command:

 

 

Click on the name before editing the related text cell:

 

 

The list can be displayed later with the related command:

 

 

As an example, consider the solution in the first image; imagine that after several changes in the constraints and after running the optimizer more times, we want to restore the situation that produced that solution. After displaying the list, we can select the solution in the list named First snapshot:

 

 

To achieve this, click on the green arrow icon in the related row of the list. You will get a confirmation request.

 

 

Then confirm the action clicking on the yes button, after selecting the destination tab; it is possible to select the recipe tab or, as an alternative, the optimizer tab. At the end of the process, the solution values go in the current recipe and its constraints are restored. The procedure ends displaying the selected tab.

 

It is also possible to delete one or more versions from the list, clicking on the delete icon:

 

Confirm the resulting message to complete the operation:

 

 

After this step, the version is removed from the list.