# Mathematical optimization in the agricultural industry

## Mathematical optimization in the agricultural industry

Managing uncertainty in farm management with mathematical optimization procedures

When I was a child, one of my favorite programs on TV was “The Little House on the Prairie” which followed the fate and fortunes of a small farming family in the American prairie during the late 19th century. The famous Ingalls family endured a great many hardships on their farm: the backbreaking toil of tilling the fields due to the lack of modern equipment, extreme weather conditions, failed crops, as well as the logistical difficulties of getting their crop yield to the nearest towns and cities.

If the Ingalls could see the vast cattle stations on the land they formerly tilled, or the state-of-the-art tractors, combine harvesters and sprayers, etc. that farmers use today, they would be astounded and most likely deeply envious. However, appearances can be deceptive and farmers today have challenges of their own, some of which are no much different to those of farmers 100-150 years ago – above all, the matter of unpredictability and therefore uncertainty.

In this article, we look at how uncertainty within this industry can be managed more effectively with efficient farm management using digital solutions such as mathematical optimization.

### Agriculture: Where uncertainty prevails

Like any other industry, the agricultural industry has come a long way in the last century. Much of the work is automated: milk machines in dairy farming, agricultural machinery that is fully equipped with GPS systems, sensors, etc. Fertilization practices are far more advanced and efficient; for example fertigation methods which combine fertilizing and irrigating for better results.

Yet despite the progress, the sector still remains one of the most unpredictable of all. The main challenges that dominate the industry are:

• changing weather conditions with climate change bringing extremes such as droughts and flooding and an endangered biodiversity into the bargain,
• sudden diseases which can affect entire livestock or crops,
• a volatile supply chain and changing consumer demands.

However, agriculture is an essential part of a country’s infrastructure and, of course, the source of our global food supply. Therefore, maximum productivity must be upheld in the industry while ensuring sustainability at the same time. But how can this be achieved when so much uncertainty prevails?

Are you interested in our factsheet?

### Efficient crop management is essential

Uncertainty can be reduced to a large extent with efficient crop management. Just like in other industries, this involves devising strategies and methods to help keep a farm productive and profitable, for example by improving crop yields and saving resources. In crop management, the following aspects have to be taken into account:

#### Planting

This includes preparing the seedbed to ensure that it has the right soil moisture and temperature for the respective crops and that it is free from weeds which can impair crop growth. Once the preparations have been done, the seeds can be planted. Here, a farmer needs to know what to plant, when to plant and where.

#### Fertilizing and pest control

Here, it is essential to determine how much fertilizer and what type of fertilizer should be used (e.g. liquid, gas, dry solids). Farmers must know when to apply it and how (deep placement, broadcast, row, strip or variable rate). The use of pesticides must also be taken into account. Just like fertilizers, it is important to ensure that the right amounts are distributed. Prolonged use of the same pesticide often means that they become pest-resilient after a while so at some point different methods must be applied. In this case, it is necessary to know how long a pesticide should be used and at which intervals to make a switch.

#### Irrigation

The agricultural sector is responsible for  70% of global water consumption. In an era in which water is one of our most precious resources, which we can no longer afford to waste, farm managers must get the balance right. They need to ensure that their crops get the right amount of water to improve yield but reduce its consumption at the same time. Over-watering is not only wasteful but can also lower the nutrient level in the soil and result in poor crop yield. Efficient irrigation systems like micro-sprinklers can be scheduled to save large amounts of water. Even so, unpredictability in weather conditions can make it difficult to manage irrigation as desired.

#### Harvesting

The timing must be accurate to prevent severe yield loss. Individual crops are subject to varying harvesting conditions ranging from moisture levels to temperatures, etc. The harvested crop must also be stored properly. For example, the recommended moisture content for each crop must be observed for maximum quality and to reduce the risk of pest infestation.

Thanks to precision (or smart) farming over the last decades, much of the equipment and machinery deployed in agriculture is equipped with advanced technologies such as sensors and GPS systems. Many farms also use drones for many of their operations. These advanced methods can gather important data that farmers need to manage the procedures above. Soil data on PH levels, moisture and nutrient levels, etc, data from irrigation systems and weather stations are just some of the data that can help farmers determine and plan planting, fertilizing, irrigation and harvesting schedules.

### Feed management: finding the optimal balance.

Feed management concerns developing diets for livestock and poultry which contain the right quantity and quality of nutrients so that feed is not wasted and animals are not over or under-fed. The FCR (feed conversion ratio) is of major significance here. This measures the efficiency with which livestock convert the feed into output (e.g. for dairy cows, this would be milk).

However, FCR alone is not necessarily the only solution. Even if you achieve a good FCR, it may be that, once you have taken the cost of the feed itself into consideration as well as delivery costs, a farmer may establish that he has not profited in the long run. Because feed prices are rising or tend to fluctuate heavily, it is all the more important for farmers to determine how much of which feed livestock or poultry has to consume to meet the minimum recommended nutritional and dietary requirements at the lowest possible cost.

Here, specific data on the animals’ weight, breed and genetics is required but also data on prices, feed availability, delivery, storage, etc.

#### A brief digression into the history of optimization:While we are on the subject of the optimal diet...

The diet problem (also known as the Stigler Diet) involves selecting a set of foods to meet a set of daily nutritional requirements at minimum cost. The objective is to minimize cost and the constraints are to satisfy the specified nutritional requirements. The diet problem constraints regulate the number of calories and the amount of vitamins, minerals, fats, sodium, and cholesterol in the diet. The mathematical formulation is simple. However, the solution may not necessarily be palatable as the nutritional requirements can be met without regard for taste or variety.

The diet problem was one of the first optimization problems studied in the 1930s and 1940s. The problem was motivated by the US Army’s desire to minimize the cost of feeding GIs in the field while still providing with them a healthy diet. One of the early researchers to study the problem was George Stigler. He guessed that the cost of an optimal diet would be \$39.93 per year (going by prices in 1939). In the fall of 1947, Jack Laderman of the Mathematical Tables Project of the National Bureau of Standards used the newly developed simplex method to solve Stigler’s model. As the first “large scale” computation in optimization, the linear program consisted of nine equations in 77 unknowns. It took nine clerks using hand-operated desk calculators 120 man days to solve for the optimal solution of \$39.69. Stigler’s guess was off by only \$0.24 per year!

### Supply chains at risk in the agricultural industry

Another major challenge in agriculture is the risk to supply chains. Quality seed and feed are becoming harder to purchase. The war in the Ukraine has had a major effect on the industry as the country is one of the largest growers of wheat and sunflowers. Supply chain disruptions ultimately lead to delays in planting and harvesting if the necessary seeds, fertilizer or machinery are not available in time. This results in higher costs for both farmers and consumers.

Farm managers therefore need to rethink their supply chains and ensure they are more transparent and reliable. This involves making decisions on various issues – how and from where to buy seeds and feed at reasonable prices, how to ensure deliveries are reliable, etc.

More interesting articles

Peak loads can considerably drive up a company’s energy costs. These can be avoided with clever planning. We show you the possibilities that are available!

Interview with Dr Jonathan Fritzemeier, Product Manager at Kearney, on the challenges of modern production networks.

Mise en place is a term used to describe food preparation by professional chefs. We show you how to prepare the implementation of new software for production planning to ensure that nothing can go wrong.

### Smart farming combined with mathematical optimization: a solution to agricultural challenges

As mentioned earlier, precision or smart farming methods can collect relevant data that farmers need to give them valuable insights into their operations. However, particularly on large commercial farms, the mass of data can be overwhelming and without the right software, it is difficult to pinpoint where possible solutions may lie and make the right decisions.

This is where mathematical optimization can play a significant role. Software that applies mathematical optimization helps farmers understand their operations far better by turning the data acquired into essential knowledge. To do so, all of the relevant data from sensors, machines, GPS systems, drones, as well as external data on weather, historic data on disease outbreak, fertilization, pest control, etc. is integrated into the software where it can then be rapidly analyzed and calculated to provide valuable insights.

In  crop management: Soil data and weather data can be analyzed using mathematical optimization methods in order to help a farm decide when and where to plant or harvest and  draw up optimized planting and harvesting schedules. What-if scenarios can analyze various problems. What would happen if crop A were planted in field B? What if liquid fertilizer were applied instead of gas fertilizer? What would the consequences be of changing a major feed supplier, etc.? Being able to analyze many different scenarios can facilitate decision-making processes immensely.

In feed management:  Mathematical optimization  can help to find the best diet for livestock and poultry at the lowest cost for the farmer. Here, all of the relevant data on livestock (weight, breed, sex, genetics, etc) as well as different feed types and prices, nutritional levels, etc is entered into the software and evaluated. This is a classic mathematical optimization problem, commonly known as the Diet Problem (see above).

In this way, farmers receive targeted recommendations to support them in making informed decisions which not only maximize productivity at reduced costs but also ensure the welfare of their animals.

### Harvest optimal results with OPTANO

A software platform such as OPTANO deploys Machine Learning as a powerful Predictive Analytics technology to be able to make accurate forecasts on weather events, disease outbreak, price developments, product availability, etc. It then deploys mathematical optimization as a powerful Prescriptive Analytics tool in order to calculate the best results and provide targeted recommendations on which action to take. Combining both of these methods can benefit agricultural operations immensely.

### All's well that ends well

In “The Little House on the Prairie”, the Ingalls family were content and generally successful with their farming ventures. Of course they would surely have been glad of the technology at farmers’ disposal today but all in all, most of the episodes had a happy ending, despite the extreme ups and downs the family often had to encounter. With the right optimization software, today’s farmers can also master their own challenges and manage the unpredictability in agriculture successfully.

### Have you got your copy of our factsheet on this topic yet?

In our factsheet “What are the benefits of mathematical optimization?” we ask 5 questions to help you assess whether mathematical optimization brings benefits to your organization.

To obtain our factsheet, all you need to do is enter your contact details in the space below. A pop-up window will then open to download the whitepaper. Please note that by providing us with your email address, you agree that we may contact you on this topic. You may revoke this agreement at any time by contacting privacy@optano.com.

Alisa Temme

Denise Lelle