First of all, as with all questions regarding theses, what ultimately matters is what your supervisor and doctoral committee is comfortable with. So, my answer (and any other answer that you might find helpful) must be understood with the caveat that it is subject to what is acceptable to your thesis committee.
With that understood, you are asking about a literature review. So, the primary point of clarification to help you decide what is best is: which literature do you hope to contribute to in your thesis? That is, is your thesis only a contribution to the computer science literature, or do you also hope to contribute to the dairy farming literature? Note that I am not asking about contributions to dairy farming practice (let's take it for granted that your thesis is a practical contribution to dairy farming); I am only focusing on the question of contribution to dairy farming scholarly literature. From the details in your question, I think we can take for granted that you want to contribute to the computer science literature, so let's focus on the dairy farming literature question.
If you hope that your thesis will also be a valuable contribution to scholars of dairy farming, then you should certainly review the relevant literature so that such scholars can appreciate where you contribution fits in. I would think that, in this case, you would focus on two main kinds of studies:
- Algorithmic approaches to solving problems in dairy farming: here you would remain in the scope of dairy farming literature but focus on any uses of computer algorithms to solve any problem in the domain.
- Similar algorithmic approaches to yours in animal husbandry: here you would broaden your scope to any topic in animal husbandry, but you would limit the algorithms that you review to those that are similar to what you will present in your thesis. (I don't know what "similar" means: you are the one who knows what that might mean because you know your algorithms best.)
Whichever of these approaches you adopt, then you could have two major sections in your literature review chapter, one for each literature domain (that is, one for computer science, the other for dairy farming). In addition, your abstract, introduction chapter, and conclusion chapter should devote ample space to presenting and discussing the contributions to dairy farming literature, in addition to the computer science literature.
If, in contrast, you are only interested in contributing to the computer science literature and your contribution to dairy farming is mainly practical, not mainly scholarly, then you do not need to do any sort of literature review of the dairy farming literature. All you need is a background explanation of the practical context so that computer scientists who read your work can understand the practical domain of application of the algorithm. For this, you do not need to cite any scholarlly literature at all. Scholarly literature is mainly to document new, proposed cutting-edge suggestions--it is not primarily for describing common practice.
In this case, it is perfectly acceptable to write one page or more of necessary background information off the top of your head, including only the dairy farming information that is necessary for a computer scientist to follow the rest of your thesis, nothing more. Then you should probably add one or two references to more detailed sources for computer scientists who want to know more about dairy farming, but these references should probably be guides for the general public, not scholarly literature, since the goal is not to describe the state of the art but rather to give the most useful background. For example, if it is sufficient, a reference to the Wikipedia article on the topic might do the job.
In this case, such background pages would only take one to three pages in the introduction chapter of the thesis. There should be nothing at all in the literature review chapter. Then you should probably add a few paragraphs in the conclusion chapter talking about the practical implications of your algorithm.