I was recently at the Wiper and True brewery in Bristol sampling some of their fantastic beers. While I was sitting there in their taproom, which is a roped off space in their brewery, I noticed a whiteboard with their planned operations for the next week. It looked something like the following
Now, theirs was much more complicated and realistic, but this is an example that I could quickly come up with. When I saw this timetable of tasks, my first thought was “Wow, that is an optimisation problem waiting to be solved”. I am not going to solve that optimisation problem, but I am going to explain what they are trying to achieve.
To discuss the problem faced by a brewery, we must embark on a journey into the world of machine scheduling, or job shop scheduling. This optimisation problem can be defined as
- Given a set of jobs that need to be scheduled, say job1, job2, job3, …, jobN, with each job having a different processing time,
- and a set of machines that the jobs can be processed on, machine1, machine2, machine3, …, machineM
Find an assignment of jobs to machines so that the total time to process all jobs in minimised. This type of problem is similar to the teacher scheduling problem encountered previously.
This is all very general, and is a little complicated. So I will provide an example.
If you think about a large share house, say with 5 residents, and “some” bathrooms. Everyone has to catch the same bus in the morning. So that people don’t have to get up too early, you want to optimise the use of the bathroom(s). The jobs in the case would be to shower in the morning and the machine is the bathroom. If there is only 1 bathroom, this problem is easy. Whatever order of jobs you come up with, then total time will still be the same. Now, if there were two bathrooms, then this is where it gets interesting. Since everyone takes a different amount of time to shower, you want to assign people to bathrooms in a particular order so that the total time to complete every to shower is minimal.
Scheduling in a brewery
You may be asking, why am I telling you about this? The reason is that scheduling in a brewery can be seen as a job shop scheduling problem. As opposed to our example with the bathroom in a share house, there are many different “machines” that perform different jobs. Also, the jobs take different amounts of time. The most obvious is the brewing of the beer. If we consider brewing to be just a single job, then brewing of an IPA, Pale Ale or Stout could take different amounts of time. Now, brewing is not a single job, but made up of multiple smaller jobs. However, considering this would make this blog a little too complicated.
So, in our small example provided above we have the following:
- Jobs: Prepare the brew, brew the beer, pack the beer and transport the beer to the sellers.
- Machines: Prefermentation tank, fermentation tank, people to do the packing and people to do the transportation
In this case, we want to minimise the time it takes from starting a brew to getting it to the sellers. This hopefully translates into higher sales. So, as you can see, this problem fits quite well into the job shop scheduling problem. So there is a wonderful optimisation problem at a great brewery in Bristol.
Similar to the share house example, if there is only one fermentation tank, then it would be difficult to change the time from the start to the end of the process. Fortunately, there are multiple fermentation tanks, so that means we get much more of the Kaleidoscope for us to drink at the tap room and various places around Bristol.
More optimisation in brewing
Another optimisation problem, which may or may not be solved in reality, is in relation to the International Bittering Unit (IBU). The IBU of a beer is a function of
- The amount of hops added to the boil and their alpha acid value
- The amount of beer being made
- The amount of time the hops are in the boil
When I used to brew, I used to pick the hops that I wanted to use and then set a target IBU value. I would then embark on a manual process of using the IBU formula adjusting the weight of hops and the length of boil until I reached my desired value. Now, I also used some intuition in regards to what hops to add at what times, but I was all the time trying to hit a target IBU value (which was arbitrarily set by myself).
This process, while I was performing manually, is actually another optimisation problem. It can be formulated as: given hops A, B and C, find the amount of each to add to the boil to achieve a target IBU, such that the total grams of hops used is minimised. At the time, I was only early into my PhD, so I didn’t solve this problem. Now I think that I would probably formulate and solve such a problem when brewing. As to whether actual brewers solve this problem, you should ask you friendly brewer next time you are in a taproom.