Professional Documents
Culture Documents
Production Planning For Fermentation Tanks at Wineries
Production Planning For Fermentation Tanks at Wineries
Wineries
Carlos Monardesa,b,∗, Alejandro Mac Cawleya , Jorge Veraa , Susan
Cholettec , Sergio Maturanaa
a
Industrial and Systems Engineering Department, Pontificia Universidad Católica de
Chile, Santiago, Chile
b
School of Engineering, Universidad Católica del Norte, Coquimbo, Chile
c
College of Business, San Francisco State University, San Francisco, CA, USA
Abstract
This article proposes two Binary Integer Programming Models for planning
the use of wineries fermentation tanks. These models support the winemaker
in the decision to harvest and to assign grapes lots to fermentation tanks.
The decisions are made based on the expected yield of the blocks where
the grapes grow, harvest dates and fermentation times. One of the proposed
models is a time-indexed formulation while another one is not. To reduce the
dimensionality problem in the first formulation, the second one eliminates the
time index of the decision variables. This reformulation turns out to be much
simpler in its formulation and resolution. The Constraint Generation method
used in the resolution gets efficient response times. The results obtained allow
the winemaker to get optimal production plans in short computational times.
Keywords: Binary Integer Programming, Fermentation Tanks, Wineries
Planning
1 1. Introduction
2 The wine sector is one of the most worldwide valued ones inside the agri-
3 cultural industry. In 2017, the wine sector reached 107.9 million of hectoliters
∗
Corresponding author
Email addresses: cmonardes@ucn.cl (Carlos Monardes), amac@ing.puc.cl
(Alejandro Mac Cawley), jvera@ing.puc.cl (Jorge Vera), cholette@sfsu.edu (Susan
Cholette), smaturan@ing.puc.cl (Sergio Maturana)
2
41 with the skins, seeds and other residual solids that remain from the pressing.
42 Fermentation vessels can be made of stainless steel, wood or epoxy-lined
43 concrete, and sometimes fermentation takes place in oak barrels or other
44 smaller containers. However, most wines are fermented in large tanks.
45 Fermentation tanks need to be filled in a specific range of its capacity.
46 The fermentation process transforms sugars into alcohol changing the volume
47 inside the tank due to C02 releasing and other chemical effects. For this
48 reason and other ones, the tank filling volume has minimum and maximum
49 bounds. Usually, this range varies from 50% to 85%. The unused volume
50 inside the tank is called head-space or ullage. These tanks are often acquired
51 by wineries over time and from different sources, resulting in a heterogeneous
52 mix of tank sizes and other attributes (e.g., opentopped or closed, straight-
53 sided or slightly inverted cones, with or without agitators, etc.)
54 The problem faced by the winemaker before and during the harvest sea-
55 son, is the harvesting lots assignment to the fermentation tanks, in order to
56 keep the uniqueness of the lots and at the same time have an efficient usage
57 of the tanks. He also needs to deal with the uncertainty produced by the
58 climatic factor, which impacts the volume and the harvest dates, as well as
59 the duration of the harvest.
60 Harvested grapes are the raw materials of the fermentation process and
61 must be processed as soon as possible due to its very short duration. Simi-
62 larly, if the grapes are harvested before or after their optimal time, the quality
63 of them will probably be affected [5]. The oenologist has the flexibility to
64 anticipate the harvesting process, to allow more time for the collection and
65 processing of the grapes, with the cost of probably having a lower produc-
66 tion and quality. Furthermore, it also has the possibility of subcontracting
67 external fermentation tanks to process all the harvested grapes and not to
68 lose part of them.
69 At the time of planning, the winemaker has a limited number of fer-
70 mentation tanks, which do not necessarily have the same capacity, but they
71 can be used more than once during the harvest. Depending on the capac-
72 ity constraints and the tanks availability, it may be necessary to mix grapes
73 harvested from different blocks, so that these can be assigned to the same
74 fermentation tank. Only same kind of grape is allowed to be mixed inside
75 the same fermentation tank. The fermentation time of the processed grapes
76 in the tanks is subject to uncertainty as different conditions (e.g. ambi-
77 ent temperature, residual sugar in the tanks, kind of grape, etc.) affect its
78 duration.
3
79 The aim of this work is to provide an efficient technological tool to support
80 tactical/operational decisions to be made in wineries. In order to show its
81 efficiency, two different Binary Integer Programming (BIP) models are pre-
82 sented and tested to solve Fermentation Tanks Planning Problem. Therefore,
83 the main objectives of this paper are: (1) to demonstrate how BIP models
84 can be used to solve a real complex problem from the wine industry, and (2)
85 to show there are different BIP formulations from time-indexed ones which
86 can be more efficient to solve realistic instances in reasonable computational
87 times.
88 The paper is structured as follows. In Section 2 we present a review
89 of the production planning problems in agricultural and wine industries. In
90 Section 3 we present two different BIP formulations to solve the Fermentation
91 Tanks Planning Problem in wineries, and we explain the main differences
92 between them. In Section 4 we present the implementation process of both
93 models, which includes the algorithms used to solve the models. In Section
94 5 we discuss and present results of different instances which characterizes an
95 average winery at central zone of Chile. Finally, we state our conclusions in
96 Section 6.
4
115 winemaking process [10, 11, 12] but they solve that problems with. There
116 are researches based-on MIP contributions related to harvest operations [5],
117 bottling operations [13], cellar operations [14], marketing operations [15].
118 Specifically, for the Fermentation Tanks Planning Problem, we found two
119 conference papers [16, 17], one M.Sc. thesis [14], and one submitted paper
120 [18] which addressed this problem. The conference paper [16] details the
121 creation of a MIP intended to maximize the profits of a hypothetical South-
122 eastern winery in the U.S.A. based on operational constraints which include
123 operations sequence and capacity limits on tanks. The decision variables are
124 related to the number and type of tanks that every wine to produce would re-
125 quire in each step process. The conference paper [17] proposes a MIP model
126 which seeks to minimize a combination of total tank usage and wasted space
127 within tanks that are used. The decision variables are a binary variable which
128 turns on when assigns a lot in a tank, the volume assigned to that tank and
129 the wasted space after that assignment. This MIP is a non-time indexed
130 formulation which introduces a way to protect from overlapping assignments
131 in every tank. Both conference papers models do not decide the best date to
132 harvest each block, taking off the flexibility to arrange the schedule.
133 The M.Sc. thesis [14] intend to integrate the whole winemaking process
134 through algorithms in a DSS. A MIP formulation for the cellar scheduling
135 problem is given but is solved using Tabu Search metaheuristic, instead of
136 exact methods as Branch & Bound and Decomposition Methods. Finally,
137 the paper [18] presents a Dynamic Programming formulation to optimize the
138 use of pressing tanks at wineries. The formulation considers uncertainty in
139 the delivery time of grape trucks that arrive at a Portuguese winery. The
140 pressing process is a prior step to the fermentation only for white grapes,
141 not for red ones [11]. The red grapes are fermented with their skin, and
142 only after that are separated and pressed. So, the approach contribution is
143 limited to white grapes, instead of all kind of grape. To keep in mind, in
144 Chile 74% of vineyards are for red grapes, and 26% for white ones [2]. This
145 characterization of vineyards is not more different in California and the rest of
146 the world. By another hand, In our best knowledge pressing process is not the
147 bottleneck inside winery during harvest season. Fermentation tanks could be
148 more complicated to manage due to fermentation times variability and also
149 their heterogeneity. So, to contribute to winery capacity management, a
150 better focus would be on fermentation vats.
151 While a winemaker may create a schedule that assigns lots to tanks at
152 the start of the harvest season (or even before that date), this schedule is
5
153 likely to need revision as the season progresses. Weather patterns affect
154 both the time at which grapes are ready to be harvested and the size of the
155 harvest, resulting in significant variations between years, one of the problems
156 within the fresh fruit supply chain that has been well-documented [7]. Grape
157 sugar levels and ambient temperatures may also cause fermentation times to
158 deviate from the planned schedule. Tanks must be available when the harvest
159 is ready, and if grapes are harvested earlier or later than is ideal, wine quality
160 may suffer [5].
161 In addition to having to react to changing conditions, winemakers may
162 also have an opportunity to take advantage of unused tank capacity. While
163 some wineries produce wines from grapes harvested from their own vineyards,
164 others source many of their grapes through contracts with outside growers.
165 Procurement is often handled through multi-year contracts, but a significant
166 spot market for grapes may exist. In years when grape production is more
167 bountiful than usual, growers may seek additional markets for their excess
168 grapes, and wineries that have sufficient production capacity may able to
169 purchase these grapes at bargain prices.
170 For all that reasons, during harvest season, the winemaker could need to
171 test the supporting tool until three times per day. So, the optimization model
172 efficiency is a crucial issue for it real using at wineries. Unfortunately, the
173 efficiencies could not be found on all the reviewed models. In our research
174 efficiency is one of the main objectives to reach.
175 The objective function proposed in this work (for both formulations) seeks
176 to maximize the quality of wine to be produced, considering the available
177 capacity. We consider that this approach could be a reasonable deal between
178 the enologist and the winemaker. To reach that goal, the models to be
179 presented minimizes the total amount of mixed (blended) lots in the planning
180 horizon. A mixed lot is compound by more than one block of the same kind
181 of grapevine. This situation is undesirable (for uniqueness), but sometimes
182 necessary by capacity limitations. The next section describes both proposed
183 models.
184 3. Models
185 This section presents two different BIP models which takes into account
186 the most relevant issues related to the planning of fermentation tanks during
187 harvesting period at wineries. The main difference between them is the way
188 to incorporate the time concept in decision making inside each model. The
6
189 first model to be presented, which is called Network Design Model (NDM),
190 is a time-indexed formulation, i.e. a model where the decision variables
191 incorporate in a explicit manner the time to make a decision. By the other
192 hand, the second model to be presented, which is called Set Partitioning and
193 Exclusion Model (SPEM), is a model which the time to make a decision is
194 incorporated in an implicit manner inside the generation lots process.
195 The objective function in both models measures in a similar manner the
196 wine quality, through the minimization the total amount of blended lots,
197 which is a quality measure in the Wine Industry. Each block wine grape
198 must be the same to allow mixing blocks inside a fermentation tank. The
199 simplifications with respect to realistic Fermentation Planning Problem are
200 as follows: (1) the same day which each block is harvested, arrives at the
201 winery and it is ready to be processed inside some fermentation tank, (2) the
202 fermentation time is fixed and it depends on only wine grape to be processed
203 inside tanks, (3) the expected harvest yield for each block is fixed, (4) the
204 cleaning time for each tank after they are uncovered is negligible, (5) the
205 block expected yield and the tank capacity are measures in grape tonnage,
206 and (6) the grape transformation process from the blocks to the tanks has
207 no losses (in reality is around 8%).
213 Sets
I set of wine grapes blocks to be harvested (indexed by i)
J set of fermentation tanks (indexed by j)
214 K set of kinds of wine grapes (indexed by k)
Ik set of blocks with kind of wine grape k (indexed by i)
T set of days of the planning horizon (indexed by t)
215 Parameters
7
tFk expected fermentation time for wine grapes k
si beginning of harvest window for block i
ei ending of harvest window for block i
216 Qi expected yield for block i
Cj capacity of tank j
aj minimum filling capacity percentage for tank j
bj maximum filling capacity percentage for tank j
217 Variables
1, if block i is harvested on day t to begin fermentation on tank j
Xi,j,t =
218 0, otherwise
1, if tank j begins a fermentation of wine k on day t
Yj,k,t =
otherwise
0,
1, if tank j is still fermenting on day t
Zj,t =
0, otherwise
1, if tank j is uncovered on day t
219 Wj,t =
0, otherwise
1, if tank j begins a mixed block fermentation process on the day t
Mj,t =
0, otherwise
Formulation
XX
min Mj,t
t∈T j∈J
8
subject to:
X X
Xi,j,t = 1 ∀i ∈ I (1)
j∈J t∈T :si ≤t≤ei
X
Xi,j,t − |Ik | · Yj,k,t ≤ 0 ∀j ∈ J, k ∈ K, t ∈ T (2)
i∈Ik
X
aj Cj · Yj,k,t − Xi,j,t · Qi ≤ 0 ∀j ∈ J, k ∈ K, t ∈ T (3)
i∈Ik
X
bj Cj · Yj,k,t − Xi,j,t · Qi ≥ 0 ∀j ∈ J, k ∈ K, t ∈ T (4)
i∈Ik
X
Yj,k,t + Zj,t−1 − Wj,t − Zj,t = 0 ∀j ∈ J, t ∈ T (5)
k∈K
X
Yj,k,t + Zj,t−1 ≤ 1 ∀j ∈ J, t ∈ T (6)
k∈K
t+tFk −1
X
(tFk − 1)Yj,k,t − Zj,τ ≤ 0 ∀j ∈ J, k ∈ K, t ∈ T (7)
τ =t
X
Yj,k,t ≤ 1 ∀j ∈ J, t ∈ T (8)
k∈K
X
Xi,j,t − 1 − |Ik | · Mj,t ≤ 0 ∀j ∈ J, k ∈ K, t ∈ T (9)
i∈Ik
Zj,0 =0 ∀j ∈ J (10)
Xi,j,t ∈ {0, 1} ∀i ∈ I, j ∈ J, t ∈ T : si ≤ t ≤ ei (11)
Yj,k,t ∈ {0, 1} ∀j ∈ J, k ∈ K, t ∈ T (12)
Zj,t , Wj,t , Mj,t ∈ {0, 1} ∀j ∈ J, t ∈ T (13)
220 The constraints explanation is given as follows. The constraint (1) states
221 that each block i must be harvest once, and only inside its harvest window.
222 The constraint (2) states a logical relationship between the total amount of
223 harvested blocks of wine k on day t to be processed at fermentation tank
224 j, and the beginning of the fermentation process in tank j. The constraints
225 (3) and (4) allow to manage capacity limits of each tank j. The constraint
226 (5) states a balance between each possible state of tank j at day t. The
227 constraint (6) establishes that for each day t, each tank j could be starting
9
228 a fermentation process (when some Yj,k,t = 1), continuing a fermentation
229 process previously started (Zj,t−1 = 1) or empty and waiting for starting a
230 new fermentation (when left hand side of this constraint equals zero). The
231 constraint (7) activates the fermentation variables on tank j during the fer-
232 mentation process, which expected lasting tFk from day t and for wine k, only
233 if a fermentation process starts in tank j and on day t (Yj,k,t = 1). The con-
234 straint (8) establish for each day t and each tank j if a fermentation process
235 starts only could mix wine grapes of the kind k. The constraint (9) allows to
236 activate mixing block variables Mj,t when different blocks of the same wine
237 grapes are put together inside the tank j on the day t. The constraint (10)
238 represents a logical initialization of the state of each tank j. Finally, the
239 constraints (11), (12) and (13) state the binary nature of decision variables.
240 The Figure 1 is an example of this model. In this graph there are different
241 levels of nodes, which represent blocks, tanks and tank status. The node
242 numbers represent a day to make a decision or to describe tank status. For
243 example, the graph shows in i = 1 level, the block i = 1 is harvested on
244 day t = 2 and assign to tank j = 1 (X1,1,2 = 1) to begin its fermentation
245 (Y1,k,2 = 1) for tFk = 10 days. At j = 1 status level, the graph shows
246 tank j = 1 is in fermentation process from day t = 2 until day t = 11
247 (Z1,2 = · · · = Z1,11 = 1), uncovering it at day t = 12 (W1,12 = 1). In the
248 same way, the block i = 2 is harvested on day t = 18 and assign to tank
249 j = 1 (X2,1,18 = 1) to begin its fermentation (Y1,k,18 = 1) for tFk = 10 days.
250 3.2. Set Partitioning and Exclusion Model for Fermentation Planning
251 The model to be presented needs different stages to build it. All feasible
252 lots are built at first. Feasible lot considers tank capacity and kind of grape
253 wine for each block. Each lot could harvest one or more blocks of the same
254 kind of grape wine. Lots are characterized by harvested block(s), harvest
255 day, expected yield, fermentation time and kind of grape wine. Then, an
256 Incidence Set is created, which gives the relations between the generated
257 lots and harvested blocks in each lot. In order to not assign overlapped
258 lots at the same tank, a Conflict Set is created in next stage. The last stage
259 creates the Feasible Matching Set, which determines the possible assignments
260 between lots and tanks due to lot size and tank capacity limits. The closest
261 analog wine-related publication [15] matches wineries seeking markets for
262 their wines with specialty distributors looking to represent them based on
263 mutual attributes and preferences of each. Sets, parameters, variables, pre-
264 modeling calculations, formulation and constraint explanation is given as
10
Figure 1: Network Design Model Example
265 follow. Bold set and parameters mean that they are built during the pre-
266 modeling process. We will not rewrite the sets and the parameters already
267 define in NDM.
268 Sets
L set of generated grape lots (indexed by l)
Il set of grape blocks harvested by the generated lot l (indexed by i)
269 IS set of pairs (i, l) for block i harvested by the generated lot l (indexed by (i, l))
CS set of pairs (l1 , l2 ) of generated lots which are in conflict (indexed by (l1 , l2 ))
MS set of pairs (l, j) for lot l which fits in tank j (indexed by (l, j))
270 Parameters
Wi kind of wine grapes from block i
Al expected yield of lot l once it is generated
271 Hl harvest date of lot l once it is generated
pl quantity of blocks in lot l once it is generated
Fl expected fermentation time for lot l once it is generated
272 Variables
1, if lot l is matched to tank j
273 ml,j =
0, otherwise
274 Pre-modeling Calculations
11
275 The needed stages to build the model are explained as follow.
276 Stages
277 1. To group blocks i by harvest windows [si , ei ] and kind of grape wine
278 Wi = k to create lots l.
279 2. To generate all possible lots l ∈ L by daily combinations T of blocks.
280 The lot harvest date Hl is determine by one day in i∈I l [si , ei ] for
281 multi-block lots and by one day in [si , ei ] for single-block lots. The
282 lot fermentation time Fl is determine by tFk for both multi-block and
283 single-block lots.
3. To calculate the Incidence Set which represents the relationship be-
tween generated lots and blocks, and it is defined as follows:
IS = {(i, l) : i ∈ I, l ∈ L | i ∈ I l }
284 4. To calculate the expected yield per lot Al , and the number of blocks
285 harvested per lot pl .
5. To calculate the Conflict Set, which manages incompatible assignments,
and it is defined as follows:
CS = {(l1 , l2 ) : l1 , l2 ∈ L, Hl1 + Fl1 ≥ Hl2 | Hl1 ≤ Hl2 , l1 6= l2 }
6. To calculate the Feasible Marching Set, which determines all the pos-
sible matchings between generated lots and available tanks, and it is
defined as follows:
MS = {(l, j) : l ∈ L, j ∈ J | aj Cj ≤ Al ≤ bj Cj }
Formulation
X
min (pl − 1)ml,j
(l,j)∈MS
subject to:
X X
ml,j = 1 ∀i ∈ I (1)
(i,l)∈IS (l,j)∈MS
12
286 The constraints explanation is given as follows. The constraint (1) allows
287 to harvest each block i only once, choosing just one lot l (ml,j = 1) of the
288 many available possibilities to do it, and assigning that lot l to tank j. The
289 constraint (2) is an exclusion one, which excludes to match two lots l1 and
290 l2 in conflict at the same tank j. The constraint (3) gives the binary nature
291 of decision variables but only for feasible matchings between lot l and tank
292 j. It is important to remark that not all constraints (2) are necessary to get
293 an optimal solution. We explain in detail this approach to solve this model
294 in Section 4.
317 4.2. Implementation issues for Set partitioning and exclusion Model
318 The SPEM was implemented in Gurobi 7.5.1 with Python interface. Its
319 main contribution instead of NDM, is its tractable size, even when SPEM
13
320 was tested on large instances. Moreover, not all the constraints need to be
321 added at the beginning of the modeling process. A Separation Algorithm
322 was created to guide the optimal solution search. This algorithm adds con-
323 straints (cuts) by the time its needs by feasibility in incumbent solution. The
324 algorithm is described as follows.
337 1. To solve the set partition model (SPM), i.e., SPEM without conflict
338 constraints. The SPM is a relaxation of SPEM, because only contain
339 a subset of the constraints of SPEM.
345 3. To add all the exclusion constraints (per tank) found in Step 2 and
346 solve the new SPEM. Return to Step 2.
347 It is important to remark when exclusion constraints ((2)) are not added
348 to the SPEM, the model works as a Set Partition one, which has the quasi-
349 integrality property [23], improving the search algorithm at the beginning of
350 the process (first iterations), before adding the exclusion constraints. The
351 results are shown in the next Section.
14
352 5. Results
353 The proposed models are tested on instances created with the information
354 given by a medium size winery in Chile. Some of the wine grape used are red
355 (Cabernet Franc, Cabernet Sauvignon, Carménère, Syrah, Merlot and Pinot
356 Noir) and other ones are white (Chardonnay and Sauvignon Blanc). The
357 harvest season uses to begin in February and last until May. Most of time
358 white wine grapes are harvest before red ones. White wine grapes use to have
359 tighter harvest windows than red ones, meaning an average of 3-4 weeks for
360 the first ones versus 6-8 weeks for the last ones. Even though, historically it
361 uses to be one optimal week to harvest each wine grape when it reaches the
362 maximum quality (the perfect combination for acidity, tannins, alcohol, and
363 sweetness).
15
374 5.2. Results for Network Design Model
375 5.3. Results issues for Network Design Model
376 6. Conclusions
377 Constructing and implementing a tool such as this is an iterative process.
378 We plan to improve the functionality and usability of the tool based on user
379 feedback from the current subjects and that from additional wineries to we
380 plan to enroll. Other Future Work to be fleshed out follows, shown in list
381 form only for now:
382 1) To incorporated the uncertainties related with biological and climate
383 factors, in order to get more robust planning as a solution. To do that, we
384 can use Stochastic Programming or Robust Optimization as a toll. 2) The
385 assignment of lots to tanks is but one process in the complex and lengthy
386 journey of grapes into bottles of wine. Most agri-food supply chain studies
387 to date lack integration between processes [8] and focus on tactical rather
388 than strategic decisions [7].
389 We plan to address this shortcoming by integrating the tank-planning
390 tool into a broader suite of tools encompassing further production processes,
391 such as harvesting and bottling. Expanding the modeling frame would allow
392 for additional concerns to influence previously localized decisions.
393 While global demand for wine is trending upward, the supply of wine
394 is growing even faster, forcing producers to become even more competitive.
395 Wineries will continue to need to improve their asset utilization, and ineffi-
396 cient usage of tanks increases operating and opportunity costs alike. Relying
397 on business-as-usual scheduling will become less viable as both supply and
398 demand grow evermore stochastic. Being able to re-optimize on the fly during
399 the season will allow wineries to limit problems arising from unanticipated
400 changes and take advantage of unforeseen production opportunities. Oper-
401 ations research models such as the one we describe can help winemakers in
402 their quest to improve profitability.
403 References
404 [1] International Organisation of Vine and Wine (OIV), State of the Vi-
405 tiviniculture World Market: April 2018, State of the vitiviniculture
406 world market (2018) 1–14.
16
407 [2] C. Buzzetti, Boletı́n del vino: producción, precios y comercio exterior,
408 Technical Report, Oficina de Estudios y Polı́ticas Agrarias (Odepa) del
409 Ministerio de Agricultura, Gobierno de Chile, Santiago, Chile, 2018.
410 [3] L. Moccia, Operational Research in the Wine Supply Chain, INFOR:
411 Information Systems and Operational Research 51 (2013) 53–63.
412 [4] O. Ahumada, J. R. Villalobos, Operational model for planning the har-
413 vest and distribution of perishable agricultural products, International
414 Journal of Production Economics 133 (2011) 677–687.
17
437 [12] A. V. D. Merwe, F. V. Dyk, J. V. Vuuren, Decision support for grape
438 harvesting at a South African winery, ORiON 27 (2011) 83–100.
442 [14] A. van der Merwe, A decision support system for scheduling the har-
443 vesting and wine making processes at a winery, Master’s thesis, 2009.
444 [15] S. Cholette, A novel problem for a vintage technique: Using mixed-
445 integer programming to match wineries and distributors, Interfaces 37
446 (2007) 231–239.
461 [20] J. Lee, A first course in combinatorial optimization, volume 36, Cam-
462 bridge University Press, 2004.
18
468 [23] E. Rönnberg, T. Larsson, Integral simplex methods for the set parti-
469 tioning problem: Globalisation and anti-cycling, in: Open Problems in
470 Optimization and Data Analysis, Springer, 2018, pp. 285–303.
19