The farming industry is facing a number of key challenges over the next few years and decades. The industry is being required to feed and support a growing global population. However, there is also more pressure on land and resources thanks to that growing population. This means that significantly more efficient means of production are required. However, the factory farming methods of the 1970s are not necessarily fit for purpose in the 2020s and beyond.
Part of the reason for this is the growing pressure from consumers on farmers and supermarkets to deliver better animal welfare on farms. In some countries, this consumer pressure has all but eliminated the worst factory farming practices, replacing them with higher welfare practices. There are questions about where campaigners may next turn their attention. However, many farmers are already finding that it is advisable to stay ahead of the game on animal welfare, not least because happier animals tend to be more productive.
At the same time, climate change means that existing farming methods are no longer sustainable. Animals that have thrived in and even been bred for particular locations are now finding it harder to cope there. The changing climate is putting more strain on their bodies with changes in heat and humidity. In the dairy industry, this is crucial. Both heat and humidity affect the health of cows and the quality of milk. This therefore limits the productivity of cows, and will only become more important as climate change advances.
Harnessing science to solve the conundrum
Scientists, however, have come up with a solution or rather, they have started to look at various technologies that may offer a series of solutions. A combination of molecular and digital technologies is now beginning to provide ways to improve the sustainability of milk production. For example, if you can identify the genes that allow cows to resist heat stress in difficult climates, you could identify cows that are better suited to particular locations. In the right location, they would be more comfortable, and therefore produce more milk.
This might seem like a long-term project after all, breeding cows to produce milk takes a few years. However, in the shorter term, it will allow farmers to tailor environmental conditions in barns to suit their individual animals. This is the issue that the team Two Tech Innov chose to bring to the 2024 SAS Hackathon. Their initial aim was to look at the genetics of heat stress and resistance to it in cows.
The team also drew on real-time data from Internet of Things (IoT) sensors within barns used for cows. These sensors provided a huge amount of data about individual cows, including their yield of milk, behaviour, body temperature and water consumption. In other words, this data gave a clear picture of how comfortable the cows were in the barn, and the effect of this on their milk yield.
The team then brought this data together with genetic and climatic information to build models on SAS Viya to predict milk yield under various conditions. These models were designed to support real-time adjustment of internal barn conditions, through environmental control systems such as fans and water sprinklers. This, in turn, allowed the team to set up a system for reducing the caloric stress on cows, and therefore improving their productivity or milk yield.
The team was able to identify key genetic markers associated with higher heat stress resistance. They then classified cows into low, medium and high stress groups by their resistance to heat stress. This made it possible to optimise the environmental conditions for each group to minimise stress and therefore maximise milk yield. The team could then calculate the financial return from optimising milk production and minimising energy consumption to show the real effect on farms.
Delivering sustainability and improving animal welfare
The Two Tech Innov solution looks like delivering the ‘holy grail’ of animal farming: higher yield coupled with better animal welfare. It has huge potential to improve the sustainability of dairy farming, even with the challenges of climate change. It seems like it might make it possible to reduce energy consumption while also optimising milk production.
Guillermo Luna-Nevárez, the team leader of Two Tech Innov said simply, “The future of milk is here.” This does not seem like an exaggeration given the potential impact of this work on the dairy industry.
From my perspective working in analytics and AI across retail and service industries, what stands out is not just the technology itself, but how it’s applied. Two Tech Innov show how combining deep domain expertise with digital platforms allows organisations to move from reactive management to proactive optimisation.
In other sectors, this same approach is being used to sense demand shifts earlier, anticipate operational stress, and automatically adjust processes in near real time. The specifics may differ, genes and barn sensors here, transactional and behavioural data elsewhere, but the outcome is the same:
This is where modern analytics platforms prove their value: enabling organisations to act on insight continuously, not just analyse it retrospectively.
From smarter decisions to more sustainable outcomes, it all starts with the right skills- join the SAS Hackathon Boot Camp to learn more.
Really interesting project, I love the focus on increasing productivity while animal wellbeing is in focus. The food industry can be ruthless, and it is encouraging that there is a different way of doing things. Excited to see "The future of milk"!
Really compelling example of how AI can move sustainability from theory to execution. What stands out is the combination of genetics + real-time IoT data to enable continuous optimisation, not just one-time improvements. This kind of approach—predict, adjust, learn—feels like the future across industries.
Also refreshing to see a solution where productivity and animal welfare are not trade-offs but actually reinforce each other. That’s where true sustainability happens.
Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.
Explore Now →Latest updates from the SAS Hackathon Desk.
Looking for inspiration? Check out:
• Past SAS Hackathon Team Profiles.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Join us at the 2025 SAS Hackathon Sept. 15 – Oct 10. Visit the SAS Hackathon homepage.
Check it out!