# Alternative Mathematical Models and Solution Approaches for Lot-Sizing and Scheduling Problems in the Brewery Industry: Analyzing Two Different Situations

Authors: Tamara A. Baldo; Reinaldo Morabito; Maristela O. Santos; Luis Guimarães
Journal: Mathematical Problems in Engineering
 (2017)

---

## Abstract

This research proposes new approaches to deal with the production planning and scheduling problem in brewery facilities. Two real situations found in factories are addressed, which differ by considering (or not) the setup operations in tanks that provide liquid for bottling lines. Depending on the technology involved in the production process, the number of tank swaps is relevant (Case A) or it can be neglected (Case B). For both scenarios, new MIP (Mixed Integer Programming) formulations and heuristic solution methods based on these formulations are proposed. In order to evaluate the approach for Case A, we compare the results of a previous study with the results obtained in this paper. For the solution methods and the result analysis of Case B, we propose adaptations of Case A approaches yielding an alternative MIP formulation to represent it. Therefore, the main contributions of this article are twofold: (i) to propose alternative MIP models and solution methods for the problem in Case A, providing better results than previously reported, and (ii) to propose new MIP models and solution methods for Case B, analyzing and comparing the results and benefits for Case B considering the technology investment required.


---

## Body

## 1. Introduction

The underlying manufacturing process in the brewery industry can be basically divided into two main production stages. Stage I prepares liquids using most of the time fermentation and maturation tanks. The time spent on this step is estimated for several days and each tank is for the liquid assigned to it from the beginning to the end of the fermentation and maturation processes. The tank can be refueled only when it is empty. Stage II bottles the liquids in the filling lines, making products with different liquids and package sizes and types, resulting in the final items. This stage can only start after the liquid is ready in the tanks, in other words, when Stage I has been completed, making the liquid ready to be bottled. A tank can simultaneously supply several filling lines, when they are bottling final items containing the same liquid type. In contrast, a filling line can only receive ready liquid from only one tank at each time.The main planning decisions in Stage I establish how much, when, and which liquid will be assigned to each tank in the course of the planning horizon in order to fulfill the demand required by Stage II, considering the limitations of the available resources and the required times to conclude the fermentation and maturation processes (i.e., lot-sizing problem). In Stage II, in addition to the problem of deciding when, which, and how many resources will be used for each item production during the planning horizon, it is also necessary to deal with the coupling of production scheduling in the problem. For each bottling line, the capacity available depends on both the lot sizes and the sequences of produced items. For example, when a single malt beer production lot has ended, the line needs to be prepared (cleaned and adjusted) in order to be able to start the production of a beer that contains corn grits in its composition. This preparation time is much less in the opposite way, that is, first the beer with corn grits and then the single malt. Concluding, Stage I and Stage II decisions are taken aiming to minimize the number of changeovers in the filling lines and also to minimize the inventory and backlog costs.Integrated lot-sizing and scheduling (sequencing) are a widely studied area [1, 2]. The recent literature reviews by Almada-Lobo et al. [3] and Copil et al. [4] highlight an increasing interest in simultaneous lot-sizing and scheduling problems in many companies, resulting in researches motivated by industrial practical applications, such as glass container [5], animal nutrition [6], soft drink [7], wood floor [8], pulp and paper mill [9], food [10], automotive applications [11], supermarkets [12], and thin film transistor and liquid crystal display [13]. In these studies different models are used to represent lot-sizing and scheduling problems with sequence-dependent setups. The two most widely used models are the general lot-sizing and scheduling problem (GLSP) [14] and the capacitated lot-sizing problem with sequence-dependent setup (CLSD) [15]. These models are also known for their complexity and loose bounds; therefore they need to be reformulated, seeking stronger models and better bounds. Examples for the lot-sizing problem include the network flow-based model proposed by Eppen and Martin [16] and the Simple Plant Location (SPL) model [17]. These reformulation efforts motivated the models presented in the following sections.Despite the vast literature, lot-sizing and scheduling in brewery facilities are still relatively understudied. Related research was carried out by Guimarães et al. [18], who studied the problem of annual production in a beverage company (soft drinks and beers), considering a multiplant environment, the seasonality of demand, and other particularities of this company, for example, permitting final item transferences between plants. However, this paper does not explicitly consider the decisions involving Stage I. Guimarães et al. [18] proposed a VNS (Variable Neighborhood Search) algorithm to find feasible solutions for this production problem.Another related study is presented in Baldo et al. [19], who propose a mathematical programming approach to solve the problem considering both stages simultaneously. This is the only study found in the literature that performs the integration of both stages to address this problem. Due to the difficulty of solving or even finding a feasible solution to the problem, two MIP-heuristics using relax-and-fix and fix-and-optimize strategies are proposed. The solutions are able to provide feasible production plans aimed at minimizing inventory costs and backlogs of final items (commercialized beers), while minimizing the number of setup changeovers in the filling lines. Preparation in such bottling lines is dependent on the production item sequences and tank swaps that provide ready liquid for the filling lines. That is, before starting the bottling process, the lines need to be adjusted for a specific item, to fill the right quantity of liquid in the packaging, and it must be connected to a single tank which supplies the liquid during production of the respective final item. Thus, each change of item or tank on the filling line results in a setup operation consuming the available production capacity.The present article proposes new approaches to deal with the lot-sizing and scheduling problems that occur in brewery facilities. The main integrated decisions in Stages I and II are considered and two different situations often found in brewing industry, according to the production process technology, are analyzed. These situations can be distinguished by the consideration (or not) of the operations responsible for swapping the tanks that feed the bottling lines when the production plan is being developed. In other words, at the end of the fermentation and maturation processes, the liquid is available in the tank to fill packages of final items, a process that occurs in the bottling lines. However, before starting a new production run, each line must be prepared, adjusted, and also connected to the respective tank that will supply it. Figures1(a)–1(c) illustrate the possibilities encountered in a case study, regarding the preparation of a filler. Figure 1(d) presents a summary of the pictures (a–c), introducing the information about the number of setup changeovers (last row of the table) that occur in the consecutive periods illustrated by the pictures. To sum up, Case A usually occurs in less automated breweries, while, in Case B, the automation of the plant results in a fast setup of the tank and this spending of time does not need to be considered.Figure 1
Difference between Cases A and B regarding the tank swaps to supply the bottling line.
(a)
First period
(b)
Second period
(c)
Third period
(d)Figure1(a) depicts the production in the first period, when a tank filled with ready liquid supplies the bottling line, producing a final item (glass bottle type). Figure 1(b) describes the continuous production of bottles in the second period, when the liquid tank illustrated in Figure 1(a) becomes empty and the line is switched to the tank that has the same liquid type available for supplying it. If this setup changeover is a time consuming operation (Case A), its explicit consideration is necessary for the preparation of realistic production plans. If the setup is close to immediate (Case B), as it happens in more automated filling lines, it can be disregarded (see Figure 1(d), Cases A and B, resp.). Figure 1(c) describes the third period, which illustrates a situation in which the production of bottles ends and the production of cans starts, in both Cases A and B. This changeover between final items generates a sequence-dependent preparation in the machine, regardless of the technology involved.This article aims to contribute to the literature by proposing the following:(a)
For Case A (with explicit setup changeover of tanks), it contributes the following:
(i)
an alternative mathematical formulation using SPL (Simple Plant Location) strategies [20], to represent both stages (I and II)(ii)
two other models, obtained by the combination of the SPL model and the model presented in Baldo et al. [19].(b)
For Case B (disregarding the setup changeover when swapping tanks), it contributes the following:
(i)
model adjustments from Case A to Case B(ii)
an alternative mathematical formulation for Stage II using strategies based on ATSP (Asymmetric Traveling Salesman Problem) [21].(c)
For both cases, a MIP-based heuristic that considers the lot-sizing and scheduling decisions in a sequential fashion is proposed. This MIP-heuristic method consists of two main steps:
(i)
(Step1) solve Stage I considering some information of Stage II (lot-sizing decisions).(ii)
(Step2) the solution obtained for Stage I is fixed and used during Stage II resolution.Several computational tests were run supported by an optimization solver and the analysis of the results shows that the new approaches proposed for Case A obtained better results than the ones previously reported in the literature [19]. The computational tests also quantify the benefits of using more advanced technology available for brewery production processes, in order to reduce the setup changeover times (consequently costs) of the tanks that supply the filling lines, when considering Case B.The remainder of this paper is organized as follows. Section2 briefly describes the beer production process and presents a detailed description of the problem. Section 3 includes a short explanation regarding the model described in Baldo et al. [19]. Section 4 describes the mathematical formulations proposed to represent Case A and Section 5 the mathematical models for Case B. Section 6 proposes the MIP-heuristics to solve both scenarios. The computational results are shown in Section 7. The conclusions and future research perspectives are discussed in Section 8.


## 2. Problem Description

In the context of this study, the production process in a brewery is considered divided into two main stages and there are several tasks that comprise them. They are described below.(i) Liquid Preparation (Stage I). This starts with the wort preparation (mashing and lautering). Mashing involves mixing the milled grain with water, which is then submitted to a heating process. During lautering, the mixture is filtered making it ready for boiling and adding the hops. The wort is cooled before adding the yeast, yielding green beer. All the previous processes take a few hours to complete. The wort and yeast cells are then placed into fermentation tanks to start the fermentation phase. At the end of the fermentation process, the yeast is separated by decanting, leading to the maturation phase. The fermentation and maturation processes occur inside the same tank and usually take several days to complete. Depending on the type and style of beer, these two phases can take from 3 to 41 days. The final step to create the ready liquid (beer) is filtration and carbonation. At this point, the beer is ready to be bottled. If the filling line is not available, the liquid can wait within its own fermentation and maturation tanks, or it can be filtered and kept at buffer tanks while waiting to be bottled. Nevertheless, after being filtered, the beer must be bottled within a few days.(ii) Bottling (Stage II). This is the final stage of the production process, where the beer is bottled in containers (glass bottles, aluminum cans, or barrels) and packed. The filling process occurs on a conveyor belt, moving the containers between procedures: washing and sterilizing returnable containers (this can be suppressed for cans, because they are purchased and sterilized), followed by filling, sealing, labeling, and packing. The filling lines are initially adjusted to produce beer of a given liquid and type of container/package and, in each changeover of liquid and/or container/package (depending on the situation, also the tank that supplies liquid) in the filling lines, a set of setup operations (cleaning and/or filling line adjustments) need to be performed, which depend on the production sequence.The production bottlenecks in each of these stages are the focus of this study. The bottleneck of Stage I is the fermentation/maturation process, because the tanks are busy for several days until the liquid becomes ready and available for bottling. Regarding Stage II, the main bottleneck is in the filling, because the speed at which the packages are filled with liquid directly influences the release (or not) of the tanks. In the production environment studied in this paper, the possibility of using buffer tanks between Stages I and II is not considered.To solve this problem, new mathematical models aimed at optimizing the main decisions involved in Stages I and II are proposed. The objective in the mathematical models is to minimize the inventory and backlog costs, as well as the number of setup changeovers in the filling lines (each change implies a small penalty in the objective function). The third term in the objective function is of a second order in comparison with the first two terms (observe that the value of alpha is a sufficiently small number; see function (1)). This small penalty aims at ensuring that, among the minimum cost solutions (first two terms), the optimal solution results in a small number of setup changeovers in periods with idle capacity. The models have a set of constraints that represent the main process limitations found in Stages I and II, as well as the decisions that integrate both stages. According to the literature, this paper deals with a multilevel lot-sizing problem with sequence-dependent setup times and costs between the production of different items in different parallels filling lines (Almada-Lobo et al. [3] and Copil et al. [4]). The logical structure of each mathematical model is shown in Figure 2(a).Figure 2
Different approaches used to mathematically represent the problem.
(a)
(b)Note in Figure2(a) that Stage I is represented by two different mathematical formulations: BSAM-I is described in Baldo et al. [19] (see Section 3) and SPL-I is presented in Section 4.1. SPL-I uses a Simple Plant Location problem strategy [20] for modeling production and inventory decisions in Stage I. For Stage II, when it comes to Case A, the problem can be modeled by two different approaches. The first was already presented in the literature using the GLSP (General Lot-sizing and Scheduling Problem [14]) in BSAM-II (see Section 3). The second approach, SPL-II, also uses a Simple Plant Location reformulation and is presented in Section 4.2. Still describing Stage II models, but now for Case B, BSAM-II and SPL-II models of Case A are adapted to this problem situation (BSAM′-II and SPL′-II), as well as an alternative proposal modeling (ATSP-II) using the Asymmetric Traveling Salesman Problem [21] to capture scheduling decisions, as presented in Section 5.2. For Case A, there are four possible modeling approaches, by combining Stages I and II models, and each complete model structure can be seen in Figure 2(b)-(A) (BSAM-I + BSAM-II, BSAM-I + SPL-I, SPL-I + BSAM-II, and SPL-I + SPL-II). For Case B, the combination of Stages I and II models is shown in Figure 2(b)-(B) (BSAM-I + BSAM′-II, BSAM-I + SPL′-I, BSAM-I + ATSP-II, SPL-I + BSAM′-II, SPL-I + SPL′-II, and SPL-I + ATSP-II).


## 3. Literature Mathematical Model

This section briefly presents the mathematical model described in Baldo et al. [19]. The mathematical model considers a planning horizon composed of a few weeks and each week is divided into periods corresponding to days or shifts. At Stage I, the periods add up to a total of |T| days. The decisions involved in Stage II need to be synchronized with the ones in Stage I; therefore for Stage II the |T| days are divided into two disjoint parts, T1 and T2, having a different time segmentation for each. Thus, each day t∈T is subdivided into a set λt consisting of s subperiods of flexible size (see Figure 3). For each t∈T1, |λt|≤Ω and, for t∈T2, |λt|=1; that is, the number of subperiods per day varies only in T1, keeping a similar division used for tanks in T2 (T=T1∪T2; T1∩T2=∅). Ω is a maximum number of preparations in a filling line in a period. The first part of the planning horizon, T1 first periods, provides greater detail at the beginning of the planning horizon.Figure 3
Splitting of the planning horizon [19].Sets
N: items (i,j∈N),
L: liquids (l∈L),
M: filling lines (m∈M),
O: tanks (o∈O),
T
1: periods in the first part of the planning horizon (t∈T1),
T
2: periods in the second part of the planning horizon (t∈T2),
T: periods in the planning horizon (T=T1∪T2, T1∩T2=∅),
γ
l: items that use liquid l in their composition,
μ
m: items that can be produced in filling line m.Parameters
Δ
l: number of periods required to process liquid l (duration of the fermentation/maturation plus tanks’ cleaning operations),
d
i
t: demand of item i in period t,
h
i
+: inventory cost for one unit of item i over one time period,
h
i
-: backlogging cost for one unit of item i over one time period,
a
m
i: production time of one unit of item i in filling line m,
C
m
t: total filling line m capacity in period t (time),
r
l
i: quantity of liquid l necessary for the production of one unit of item i,
b
m
j
i: required setup time in filling line m when switching from items j to i,
C
a
p
m
i
n
o: lower bound in the amount of liquid in tank o,
C
a
p
m
a
x
o: upper bound in the amount of liquid in tank o,
Ω: maximum number of preparations in each filling line in period t,
α: sufficiently small number,
B: sufficiently large number,
I
i
0
=
0: no stock of items i at the start of the planning horizon,
I
i
0
-
=
0: no backlog items i at the start of the planning horizon,
K
o
l
0
=
0: no ready liquid l inside tank o at the start of the planning horizon.Auxiliary
Ψ: defining the item production quantities depends on the Stage II model that is used.Varibles
Both: stages,
X
o
m
i
p: amount of item i produced in filler m at subperiod p with liquid supplied by tank o.Stage I
K
o
l
t: amount (i.e., inventory) of liquid l ready and available inside tank o at subperiod t,
Q
o
l
t: amount of liquid l that gets ready in tank o at subperiod t,
Y
o
l
t
I: 1, if liquid l gets ready in period t in tank o, 0 otherwise.Stage II
Y
o
m
i
p
I
I: 1 if filler m is liquid supplied by tank o and prepared to produce item i in subperiod p, 0 otherwise,
Z
m
j
i
p: 1 if a setup changeover in filler m from items j to i in subperiod p occurs, 0 otherwise,
I
i
t
-: Backlog number of items i at the end of period t,
I
i
t
+: inventory of item i at the end of period t.Objective Function: BSAM-II
(1)
M
i
n
i
m
i
z
e
∑
i
∈
N
∑
t
∈
T
h
i
+
I
i
t
+
+
∑
i
∈
N
∑
t
∈
T
h
i
-
I
i
t
-
+
∑
m
∈
M
∑
j
,
i
∈
μ
m
∑
p
∈
λ
t
∧
t
∈
T
1
α
Z
m
j
i
psubject to the following.BSAM-I
(2)
K
o
l
t
=
K
o
l
,
t
-
1
-
Ψ
+
Q
o
l
t
o
∈
O
;
l
∈
L
;
t
∈
T
(3)
∑
l
′
=
1
L
∑
t
′
=
1
Δ
l
+
1
K
o
l
′
,
t
-
t
′
≤
B
1
-
Y
o
l
t
I
o
∈
O
;
l
∈
L
;
t
∈
T
(4)
∑
l
∈
L
∑
t
′
=
0
Δ
l
Y
o
l
,
t
-
t
′
I
≤
1
o
∈
O
;
t
∈
T
(5)
C
a
p
m
i
n
o
Y
o
l
t
I
≤
Q
o
l
t
≤
C
a
p
m
a
x
o
Y
o
l
t
I
o
∈
O
;
l
∈
L
;
t
∈
T
.BSAM-II
(6)
∑
o
∈
O
∑
m
∈
M
,
i
∈
μ
m
∑
p
∈
λ
t
X
o
m
i
p
+
I
i
,
t
-
1
+
+
I
i
t
-
=
d
i
t
+
I
i
,
t
-
1
-
+
I
i
t
+
t
∈
T
;
i
∈
N
(7)
∑
o
∈
O
∑
i
∈
μ
m
∑
p
∈
λ
t
a
m
i
X
o
m
i
p
+
∑
j
∈
μ
m
∑
i
∈
μ
m
∑
p
∈
λ
t
:
t
∈
T
1
b
m
j
i
Z
m
j
i
p
≤
C
m
t
t
∈
T
1
;
m
∈
M
(8)
∑
o
∈
O
∑
i
∈
μ
m
∑
p
∈
λ
t
a
m
i
X
o
m
i
p
≤
C
m
t
t
∈
T
2
;
m
∈
M
(9)
X
o
m
i
p
≤
C
m
t
a
m
i
Y
o
m
i
p
I
I
o
∈
O
;
m
∈
M
;
i
∈
μ
m
;
p
∈
λ
t
;
t
∈
T
(10)
∑
o
∈
O
∑
i
∈
μ
m
Y
o
m
i
p
I
I
=
1
m
∈
M
;
p
∈
λ
t
;
t
∈
T
1
(11)
∑
o
∈
O
∑
i
∈
μ
m
Y
o
m
i
p
I
I
≤
Ω
m
∈
M
;
p
∈
λ
t
;
t
∈
T
2
(12)
∑
o
∈
O
Y
o
m
j
,
p
-
1
I
I
=
∑
i
∈
μ
m
Z
m
j
i
p
m
∈
M
;
j
∈
μ
m
;
p
∈
λ
t
;
t
∈
T
1
(13)
∑
o
∈
O
Y
o
m
i
p
I
I
=
∑
j
∈
μ
m
Z
m
j
i
p
m
∈
M
;
i
∈
μ
m
;
p
∈
λ
t
;
t
∈
T
1
(14)
X
o
m
i
p
≥
0
;
K
o
l
t
≥
0
;
Y
o
l
t
I
∈
0,1
;
I
i
t
+
≥
0
;
I
i
t
-
≥
0
;
Y
o
m
i
p
I
I
∈
0,1
;
0
≤
Z
m
j
i
p
≤
1
i
,
j
∈
N
;
o
∈
O
;
l
∈
L
;
m
∈
M
;
p
∈
λ
t
;
t
∈
T
.The objective function (1) minimizes the sum of the backlogging cost, the inventory cost, and a term proportional to the number of item changeovers in the filling lines during the horizon planning. Constraints (2) represent the tank liquid balance equality and integrate Stages I and II. The liquid demand l in each tank o and period t comes from the item production quantities defined by Ψ, and in this model Ψ=∑m∈M∑i∈γl∩μm∑p∈λtrliXomip. Constraints (3) ensure that, in order to prepare the liquid in t (Yolt=1), the fermentation/maturation process has to take place during the previous Δl periods. Constraints (4) ensure that, during any period of the fermentation/maturation process, the tank has no available liquid; that is, YoltI equals zero. Constraints (4) impose boundaries on the amount of ready liquid. Concerning Stage II, constraints (6) balance the inventory, backlogs, production, and demand. Constraints (7) and (8) ensure that the limited capacity of the filling lines is respected for ranges T1 and T2, respectively. During T1, the setup time contributes to the capacity consumption, contrary to T2. Constraints (9) ensure that the production of i only occurs in case the filling line is ready. Constraints (10) and (11) ensure that the filler must be prepared for a single item for each subperiod p∈λt (t∈T1) and the number of preparations of the filler to Ω in every subperiod p∈λt (t∈T2), respectively; in T2 the length of each subperiod is bigger than that of T1. Constraints (12) and (13) capture the changeover of items in the filling lines in T1, balancing the flow in and flow out of setups. Finally, constraints (14) define the domain of the variables.


## 4. Case A: Models

To model the problem at hand, consider the same sets and parameters described in Section3 and also the definitions given below. The mathematical models proposed in this section use the sets and the parameters explained before.Parameter
K
o
l
0
t
′
S
P
L
=
0: no ready liquid l inside tank o at the start of the planning horizon used in period t′.


### 4.1. Case A: Stage I

There are two approaches for representing Stage I of Case A with mathematical models, as shown in Figure2. One of them was presented in Baldo et al. [19] and it is called BSAM-I. The main variables that compose this model are Kolt, corresponding to the amount of ready liquid l available in tank o in period t, and Qolt, describing the total amount of liquid l that gets ready in tank o in period t, comprising a set of constraints (3)–(5).To describe Stage I of the present problem, we use reformulating and SPL strategies. This consists of replacing the variablesKolt and Qolt, resulting in variables Koltt′SPL. The definition of these new variables is given below and constraints (15)–(20) representing Stage I are defined later. Moreover, it is known in advance that an auxiliary symbol Ψ is used in constraints (15), which is defined later during the presentation of the models for Stage II.Variable: Stage I (SPL)
K
o
l
t
t
′
S
P
L: amount of liquid l available in tank o, which was prepared in period t and is used in period t′.SPL-I
(15)
∑
t
∈
T
,
t
≤
t
′
K
o
l
t
t
′
S
P
L
-
Ψ
≥
0
o
∈
O
;
t
′
∈
T
;
l
∈
L
(16)
C
a
p
m
i
n
o
Y
o
l
t
I
≤
∑
t
′
∈
T
,
t
′
≥
t
K
o
l
t
t
′
S
P
L
≤
C
a
p
m
a
x
o
Y
o
l
t
I
o
∈
O
;
t
∈
T
;
l
∈
L
(17)
∑
l
′
∈
L
,
l
′
≠
l
∑
t
′
=
0
,
t
-
t
′
>
0
Δ
l
Y
o
l
′
,
t
-
t
′
I
≤
1
-
Y
o
l
t
I
o
∈
O
;
l
∈
L
;
t
∈
T
(18)
∑
t
′
=
1
,
t
-
t
′
>
0
Δ
l
Y
o
l
,
t
-
t
′
I
≤
1
-
Y
o
l
t
I
o
∈
O
,
l
∈
L
,
t
∈
T
(19)
∑
l
′
∈
L
∑
t
′
=
1
t
-
1
∑
t
′
′
=
m
a
x
1
,
t
-
Δ
l
,
t
′
′
≥
t
′
t
K
o
l
′
t
′
t
′
′
S
P
L
≤
C
a
p
m
a
x
o
1
-
Y
o
l
t
I
o
∈
O
;
l
∈
L
;
t
∈
T
(20)
∑
l
′
∈
L
∑
t
′
=
1
t
-
1
∑
t
′
′
=
t
T
K
o
l
′
t
′
t
′
′
S
P
L
≤
C
a
p
m
a
x
o
1
-
Y
o
l
t
I
o
∈
O
;
l
∈
L
;
t
∈
T
(21)
K
o
l
t
t
′
S
P
L
≥
0
;
Y
o
l
t
I
∈
0,1
o
∈
O
;
l
∈
L
;
t
,
t
′
∈
T
.The set of constraints (15) engages Stages I and II, by ensuring that there is production of items during period t′, only if there is ready liquid available. The symbol Ψ corresponds to the amount of liquid in tank o used in the production of final items (Stage II); this is described in Sections 4.2 and 5.2.Stage I is exclusively represented by constraints (16)–(21). The maximum and minimum capacity for each tank must be respected and it is ensured by constraints (16). Constraints (17) and (18) guarantee that the fermentation/maturation periods are completed; that is, they prohibit during at least Δl periods that more than one liquid has been produced within the same tank. Constraints (19) and (20) ensure that, to have ready liquid in t, then YoltI=1, and the process of fermentation and maturation takes place during the Δl periods immediately preceding period t. The necessary time to complete the fermentation and maturation processes for liquid l is satisfied by restrictions (19), as Kolt∗t′SPL=0 (t∗∈{t-Δl,…,t-1}) during entire Δl periods immediately prior to t; that is, the tank is solely for liquid l processing. Constraints (20) ensure that there is no production before the liquid is ready. The domain of the variables is defined by the set of constraints (21).


### 4.2. Case A: Stage II

As depicted in Figure2, there are two ways to define a mathematical model for Case A considering Stage II. The first uses GLSP modeling strategies, described in Section 3, consisting of a set of constraints (6)–(14) whose main variables are as follows: Iit- refers to the backlog number of items i at the end of period t; Iit+ is the inventory of item i at the end of period t; and Xomip denotes the amount of item i produced in filling line m in subperiod p (p∈λt and t∈T), made by the liquid fed by tank o. In this research, the second way uses SPL strategies to reformulate Stage II, replacing the variables Iit-, Iit+, and Xomip, by the variables Xomipt′ and Iitbacklog. Thus, the definition of these new variables is given below.Variables: Stage II (SPL)
X
o
m
i
p
t
′: amount of item i produced in filling line m in subperiod p (p∈λt and t∈T), made of liquid fed by tank o, to fulfill the demand of period t′,
I
i
t
b
a
c
k
l
o
g: amount of item i required in period t which has not met at the end of the horizon of planning.The mathematical model SPL-II concerning Stage II of Case A is given by the following.Objective Function: SPL-II
(22)
Minimize
∑
o
∈
O
∑
m
∈
M
∑
i
∈
μ
m
∑
t
,
t
′
∈
T
,
t
>
t
′
∑
p
∈
λ
t
t
-
t
′
h
i
-
X
o
m
i
p
t
′
+
∑
o
∈
O
∑
m
∈
M
∑
i
∈
μ
m
∑
t
,
t
′
∈
T
,
t
<
t
′
∑
p
∈
λ
t
t
′
-
t
h
i
+
X
o
m
i
p
t
′
+
∑
m
∈
M
∑
j
,
i
∈
μ
m
∑
p
∈
λ
t
,
t
∈
T
1
α
Z
m
j
i
p
+
∑
i
∈
N
∑
t
∈
T
T
-
t
h
i
-
I
i
t
b
a
c
k
l
o
g
.SPL-II
(23)
∑
o
∈
O
∑
m
∈
M
∑
p
∈
P
X
o
m
i
p
t
=
d
i
t
-
I
i
t
b
a
c
k
l
o
g
i
∈
μ
m
;
t
∈
T
(24)
∑
j
∈
N
∑
i
∈
N
b
m
j
i
Z
m
j
i
p
+
∑
i
∈
N
a
m
i
X
o
m
i
p
t
′
≤
C
m
t
m
∈
M
;
p
∈
λ
t
;
t
∈
T
1
;
t
′
∈
T
(25)
∑
o
∈
O
∑
i
∈
N
a
m
i
X
o
m
i
p
t
′
≤
C
m
t
m
∈
M
;
p
∈
λ
t
;
t
∈
T
2
;
t
′
∈
T
(26)
X
o
m
i
p
t
′
≤
C
m
t
a
m
i
Y
o
m
i
p
I
I
o
∈
O
;
m
∈
M
;
i
∈
N
;
t
′
∈
T
(27)
∑
o
∈
O
∑
i
∈
μ
m
Y
o
m
i
p
I
I
=
1
m
∈
M
;
p
∈
λ
t
;
t
∈
T
1
(28)
∑
o
∈
O
∑
i
∈
μ
m
Y
o
m
i
p
I
I
≤
Ω
m
∈
M
;
p
∈
λ
t
;
t
∈
T
2
(29)
∑
o
∈
O
Y
o
m
j
,
p
-
1
I
I
=
∑
i
∈
μ
m
Z
m
j
i
p
m
∈
M
;
j
∈
μ
m
;
p
∈
λ
t
;
t
∈
T
1
(30)
∑
o
∈
O
Y
o
m
i
p
I
I
=
∑
j
∈
μ
m
Z
m
j
i
p
m
∈
M
;
i
∈
μ
m
;
p
∈
λ
t
;
t
∈
T
1
(31)
X
o
m
i
p
t
′
≥
0
;
0
≤
Z
m
j
i
p
≤
1
i
,
j
∈
N
;
o
∈
O
;
t
′
∈
T
;
Y
o
m
i
p
I
I
∈
0,1
m
∈
M
;
p
∈
λ
t
;
t
∈
T
.Objective function (22) aims to minimize the sum of the backlogging cost of unmet demand and the inventory cost of final products and a term proportional to the number of item changeovers in the filling lines and the cost of undelivered demand at the end of the horizon planning. For Stage II (bottling), constraints (23) ensure that the demand is being met and when there is a backlog or when the demand is not completely included in the horizon planning (backorder), it incurs penalties in the objective function. Constraints (24) and (25) ensure that the filler capacity limit is respected. In constraints (26), it is guaranteed that the production of i only occurs in case the filling line is ready. The set of constraints (27)–(31) is similar to (10)–(14), and, according to constraints (27), every filling line must be prepared for a single item for each subperiod p∈λt; t∈T1. Constraints (28) limit the number of preparations of the filler to Ω in every subperiod p∈λt; t∈T2. Remember that, in the second part of the horizon (T2), the size of each subperiod can be larger than T1, and scheduling decisions are not considered, but several lots (up to Ω) may be produced in the same filling line per subperiod. Constraints (29) and (30) capture the setup changeovers in the filling lines during T1. Finally, constraints (31) define the domain of the variables.It is worth remembering that constraints (15) and (2) introduce Ψ, which can be replaced by Ψ=∑m∈M∑i∈γl∩μm∑t′∈T∑p∈λtrliXomipt′ when it is used to represent the problem using this model.Table1 shows all the possibilities to generate the mathematical models by the combinations that comprise the parts in Figures 2(a) and 2(b), concerning Case A, using the defined constraints. Note on the left of Table 1 that Stage I can be modeled using the BSAM-I or SPL-I approach and also that Stage II (Case A) can be described using the BSAM-II or SPL-II, resulting in four possible combinations (Figure 2(b)). The possibilities of model compositions are described in the first column of Table 1 and are interpreted analogously to the BSAM-I + BSAM-II model, composed of the objective function (1), the constraints coupling Stages I and II (2), the Stage I constraints (3)–(5), and, finally, the set of constraints that make up Stage II (6)–(14).Table 1
Mathematical models for Case A.
Obj Func
Constraints
Stages I and II
Stage I
Stage II
BSAM-I + BSAM-II
(1)
(2)
(3)–(5)
(6)–(14)
BSAM-I + SPL-II
(22)
(2)
(3)–(5)
(23)–(30)
SPL-I + BSAM-II
(1)
(15)
(16)–(20)
(6)–(14)
SPL-I + SPL-II
(22)
(15)
(16)–(20)
(23)–(30)


## 4.1. Case A: Stage I

There are two approaches for representing Stage I of Case A with mathematical models, as shown in Figure2. One of them was presented in Baldo et al. [19] and it is called BSAM-I. The main variables that compose this model are Kolt, corresponding to the amount of ready liquid l available in tank o in period t, and Qolt, describing the total amount of liquid l that gets ready in tank o in period t, comprising a set of constraints (3)–(5).To describe Stage I of the present problem, we use reformulating and SPL strategies. This consists of replacing the variablesKolt and Qolt, resulting in variables Koltt′SPL. The definition of these new variables is given below and constraints (15)–(20) representing Stage I are defined later. Moreover, it is known in advance that an auxiliary symbol Ψ is used in constraints (15), which is defined later during the presentation of the models for Stage II.Variable: Stage I (SPL)
K
o
l
t
t
′
S
P
L: amount of liquid l available in tank o, which was prepared in period t and is used in period t′.SPL-I
(15)
∑
t
∈
T
,
t
≤
t
′
K
o
l
t
t
′
S
P
L
-
Ψ
≥
0
o
∈
O
;
t
′
∈
T
;
l
∈
L
(16)
C
a
p
m
i
n
o
Y
o
l
t
I
≤
∑
t
′
∈
T
,
t
′
≥
t
K
o
l
t
t
′
S
P
L
≤
C
a
p
m
a
x
o
Y
o
l
t
I
o
∈
O
;
t
∈
T
;
l
∈
L
(17)
∑
l
′
∈
L
,
l
′
≠
l
∑
t
′
=
0
,
t
-
t
′
>
0
Δ
l
Y
o
l
′
,
t
-
t
′
I
≤
1
-
Y
o
l
t
I
o
∈
O
;
l
∈
L
;
t
∈
T
(18)
∑
t
′
=
1
,
t
-
t
′
>
0
Δ
l
Y
o
l
,
t
-
t
′
I
≤
1
-
Y
o
l
t
I
o
∈
O
,
l
∈
L
,
t
∈
T
(19)
∑
l
′
∈
L
∑
t
′
=
1
t
-
1
∑
t
′
′
=
m
a
x
1
,
t
-
Δ
l
,
t
′
′
≥
t
′
t
K
o
l
′
t
′
t
′
′
S
P
L
≤
C
a
p
m
a
x
o
1
-
Y
o
l
t
I
o
∈
O
;
l
∈
L
;
t
∈
T
(20)
∑
l
′
∈
L
∑
t
′
=
1
t
-
1
∑
t
′
′
=
t
T
K
o
l
′
t
′
t
′
′
S
P
L
≤
C
a
p
m
a
x
o
1
-
Y
o
l
t
I
o
∈
O
;
l
∈
L
;
t
∈
T
(21)
K
o
l
t
t
′
S
P
L
≥
0
;
Y
o
l
t
I
∈
0,1
o
∈
O
;
l
∈
L
;
t
,
t
′
∈
T
.The set of constraints (15) engages Stages I and II, by ensuring that there is production of items during period t′, only if there is ready liquid available. The symbol Ψ corresponds to the amount of liquid in tank o used in the production of final items (Stage II); this is described in Sections 4.2 and 5.2.Stage I is exclusively represented by constraints (16)–(21). The maximum and minimum capacity for each tank must be respected and it is ensured by constraints (16). Constraints (17) and (18) guarantee that the fermentation/maturation periods are completed; that is, they prohibit during at least Δl periods that more than one liquid has been produced within the same tank. Constraints (19) and (20) ensure that, to have ready liquid in t, then YoltI=1, and the process of fermentation and maturation takes place during the Δl periods immediately preceding period t. The necessary time to complete the fermentation and maturation processes for liquid l is satisfied by restrictions (19), as Kolt∗t′SPL=0 (t∗∈{t-Δl,…,t-1}) during entire Δl periods immediately prior to t; that is, the tank is solely for liquid l processing. Constraints (20) ensure that there is no production before the liquid is ready. The domain of the variables is defined by the set of constraints (21).


## 4.2. Case A: Stage II

As depicted in Figure2, there are two ways to define a mathematical model for Case A considering Stage II. The first uses GLSP modeling strategies, described in Section 3, consisting of a set of constraints (6)–(14) whose main variables are as follows: Iit- refers to the backlog number of items i at the end of period t; Iit+ is the inventory of item i at the end of period t; and Xomip denotes the amount of item i produced in filling line m in subperiod p (p∈λt and t∈T), made by the liquid fed by tank o. In this research, the second way uses SPL strategies to reformulate Stage II, replacing the variables Iit-, Iit+, and Xomip, by the variables Xomipt′ and Iitbacklog. Thus, the definition of these new variables is given below.Variables: Stage II (SPL)
X
o
m
i
p
t
′: amount of item i produced in filling line m in subperiod p (p∈λt and t∈T), made of liquid fed by tank o, to fulfill the demand of period t′,
I
i
t
b
a
c
k
l
o
g: amount of item i required in period t which has not met at the end of the horizon of planning.The mathematical model SPL-II concerning Stage II of Case A is given by the following.Objective Function: SPL-II
(22)
Minimize
∑
o
∈
O
∑
m
∈
M
∑
i
∈
μ
m
∑
t
,
t
′
∈
T
,
t
>
t
′
∑
p
∈
λ
t
t
-
t
′
h
i
-
X
o
m
i
p
t
′
+
∑
o
∈
O
∑
m
∈
M
∑
i
∈
μ
m
∑
t
,
t
′
∈
T
,
t
<
t
′
∑
p
∈
λ
t
t
′
-
t
h
i
+
X
o
m
i
p
t
′
+
∑
m
∈
M
∑
j
,
i
∈
μ
m
∑
p
∈
λ
t
,
t
∈
T
1
α
Z
m
j
i
p
+
∑
i
∈
N
∑
t
∈
T
T
-
t
h
i
-
I
i
t
b
a
c
k
l
o
g
.SPL-II
(23)
∑
o
∈
O
∑
m
∈
M
∑
p
∈
P
X
o
m
i
p
t
=
d
i
t
-
I
i
t
b
a
c
k
l
o
g
i
∈
μ
m
;
t
∈
T
(24)
∑
j
∈
N
∑
i
∈
N
b
m
j
i
Z
m
j
i
p
+
∑
i
∈
N
a
m
i
X
o
m
i
p
t
′
≤
C
m
t
m
∈
M
;
p
∈
λ
t
;
t
∈
T
1
;
t
′
∈
T
(25)
∑
o
∈
O
∑
i
∈
N
a
m
i
X
o
m
i
p
t
′
≤
C
m
t
m
∈
M
;
p
∈
λ
t
;
t
∈
T
2
;
t
′
∈
T
(26)
X
o
m
i
p
t
′
≤
C
m
t
a
m
i
Y
o
m
i
p
I
I
o
∈
O
;
m
∈
M
;
i
∈
N
;
t
′
∈
T
(27)
∑
o
∈
O
∑
i
∈
μ
m
Y
o
m
i
p
I
I
=
1
m
∈
M
;
p
∈
λ
t
;
t
∈
T
1
(28)
∑
o
∈
O
∑
i
∈
μ
m
Y
o
m
i
p
I
I
≤
Ω
m
∈
M
;
p
∈
λ
t
;
t
∈
T
2
(29)
∑
o
∈
O
Y
o
m
j
,
p
-
1
I
I
=
∑
i
∈
μ
m
Z
m
j
i
p
m
∈
M
;
j
∈
μ
m
;
p
∈
λ
t
;
t
∈
T
1
(30)
∑
o
∈
O
Y
o
m
i
p
I
I
=
∑
j
∈
μ
m
Z
m
j
i
p
m
∈
M
;
i
∈
μ
m
;
p
∈
λ
t
;
t
∈
T
1
(31)
X
o
m
i
p
t
′
≥
0
;
0
≤
Z
m
j
i
p
≤
1
i
,
j
∈
N
;
o
∈
O
;
t
′
∈
T
;
Y
o
m
i
p
I
I
∈
0,1
m
∈
M
;
p
∈
λ
t
;
t
∈
T
.Objective function (22) aims to minimize the sum of the backlogging cost of unmet demand and the inventory cost of final products and a term proportional to the number of item changeovers in the filling lines and the cost of undelivered demand at the end of the horizon planning. For Stage II (bottling), constraints (23) ensure that the demand is being met and when there is a backlog or when the demand is not completely included in the horizon planning (backorder), it incurs penalties in the objective function. Constraints (24) and (25) ensure that the filler capacity limit is respected. In constraints (26), it is guaranteed that the production of i only occurs in case the filling line is ready. The set of constraints (27)–(31) is similar to (10)–(14), and, according to constraints (27), every filling line must be prepared for a single item for each subperiod p∈λt; t∈T1. Constraints (28) limit the number of preparations of the filler to Ω in every subperiod p∈λt; t∈T2. Remember that, in the second part of the horizon (T2), the size of each subperiod can be larger than T1, and scheduling decisions are not considered, but several lots (up to Ω) may be produced in the same filling line per subperiod. Constraints (29) and (30) capture the setup changeovers in the filling lines during T1. Finally, constraints (31) define the domain of the variables.It is worth remembering that constraints (15) and (2) introduce Ψ, which can be replaced by Ψ=∑m∈M∑i∈γl∩μm∑t′∈T∑p∈λtrliXomipt′ when it is used to represent the problem using this model.Table1 shows all the possibilities to generate the mathematical models by the combinations that comprise the parts in Figures 2(a) and 2(b), concerning Case A, using the defined constraints. Note on the left of Table 1 that Stage I can be modeled using the BSAM-I or SPL-I approach and also that Stage II (Case A) can be described using the BSAM-II or SPL-II, resulting in four possible combinations (Figure 2(b)). The possibilities of model compositions are described in the first column of Table 1 and are interpreted analogously to the BSAM-I + BSAM-II model, composed of the objective function (1), the constraints coupling Stages I and II (2), the Stage I constraints (3)–(5), and, finally, the set of constraints that make up Stage II (6)–(14).Table 1
Mathematical models for Case A.
Obj Func
Constraints
Stages I and II
Stage I
Stage II
BSAM-I + BSAM-II
(1)
(2)
(3)–(5)
(6)–(14)
BSAM-I + SPL-II
(22)
(2)
(3)–(5)
(23)–(30)
SPL-I + BSAM-II
(1)
(15)
(16)–(20)
(6)–(14)
SPL-I + SPL-II
(22)
(15)
(16)–(20)
(23)–(30)


## 5. Case B: Models

For the definition of the mathematical models proposed for Case B, consider the notation introduced in Section4.


### 5.1. Case B: Stage I

The main difference between Cases A and B is found in Stage II. Therefore, the mathematical modeling of constraints describing BSAM-I and SPL-I for Stage I are valid to Case B.


### 5.2. Case B: Stage II

The proposed mathematical models to represent Stage II in Case A can be adapted to translate Case B. The machine preparation variables (YomipII) lose the index referring to tanks (o, with o∈O) making YmipII. As a consequence, fine adjustments in the model were made since changes in the tank that supply each filling line are no longer tracked. This representation of the problem reduces the number of variables, but the problem is still difficult to solve.The adjustments of the BSAM-II model occur in constraints (9)–(13), which are replaced by (32) while constraints (6) and (7) are kept. This new model is referred to as BSAM′-II. In the SPL-II model, constraints (23)–(26) do not change, but (27)–(30) are permuted by (33). These changes give rise to model SPL′-II.B
S
A
M
′-II. Equations (6) and (7) undergo no change:(32)∑o∈OXomip≤CmtamiYmipIIm∈M;i∈μm;p∈λt;t∈T∑i∈μmYmipII=1m∈M;p∈λt;t∈T1∑i∈μmYmipII≤Ωm∈M;p∈λt;t∈T2Ymj,p-1II=∑i∈μmZmjipm∈M;j∈μm;p∈λt;t∈T1YmipII=∑j∈μmZmjipm∈M;i∈μm;p∈λt;t∈T1.S
P
L
′
-
I
I. Equations (23)–(26) undergo no change:(33)∑i∈μmYmipII=1m∈M;p∈λt;t∈T1∑i∈μmYmipII≤Ωm∈M;p∈λt;t∈T2Ymj,p-1II=∑i∈μmZmjipm∈M;j∈μm;p∈λt;t∈T1YmipII=∑j∈μmZmjipm∈M;i∈μm;p∈λt;t∈T1.In addition to the adjustments to the previous models, a new formulation proposal is made for Stage II based on the ATSP (Asymmetric Traveling Salesman Problem); see Figure2. In this reformulation of the Stage II model, the concept of subperiods is dropped. In this model, each period in the first part of the planning horizon corresponds to one day, but the details regarding the scheduling remains in the first T1 periods. Consider the following settings for the model.Variables: Stage II (ATSP)
Y
m
i
t
I
I: 1, if in filling line m a setup for item i in the beginning of period t occurs, 0 otherwise,
Z
m
j
i
t: 1, if in filling line m a setup changeover from j to i in period t occurs, 0 otherwise,
V
m
i
t: number corresponding to the order production sequence of item i of bottling line m during period t.Objective Function: ATSP-II
(34)
Minimize
∑
i
∈
N
∑
t
∈
T
h
i
+
I
i
t
+
+
∑
i
∈
N
∑
t
∈
T
h
i
-
I
i
t
-
+
∑
m
∈
M
∑
j
,
i
∈
μ
m
∑
t
∈
T
1
α
Z
m
j
i
t
.ATSP-II
(35)
∑
o
∈
O
∑
m
∈
M
,
i
∈
μ
m
X
o
m
i
t
+
I
i
,
t
-
1
+
+
I
i
t
-
=
d
i
t
+
I
i
,
t
-
1
-
+
I
i
t
+
i
∈
N
;
t
∈
T
(36)
∑
o
∈
O
∑
i
∈
μ
m
a
m
i
·
X
o
m
i
t
+
∑
i
∈
μ
m
∑
j
∈
μ
m
b
m
i
j
·
Z
m
i
j
t
≤
C
m
t
∀
m
∈
M
;
t
∈
T
1
(37)
X
o
m
i
t
≤
C
m
t
a
m
i
·
∑
j
∈
μ
m
Z
m
j
i
t
+
Y
m
i
t
I
I
∀
o
∈
O
,
m
∈
M
,
i
∈
μ
m
;
t
∈
T
1
(38)
∑
i
∈
μ
m
Y
m
i
t
I
I
=
1
∀
m
∈
M
;
t
∈
T
(39)
Y
m
i
t
I
I
+
∑
j
∈
μ
m
Z
m
j
i
t
=
∑
j
∈
μ
m
Z
m
i
j
t
+
Y
m
i
,
t
+
1
I
I
∀
m
∈
M
;
i
∈
μ
m
;
t
∈
T
1
(40)
∑
i
∈
μ
m
∑
j
∈
μ
m
Z
m
i
j
t
<
Ω
∀
m
∈
M
;
t
∈
T
1
(41)
V
m
j
t
≥
V
m
i
t
+
1
-
N
·
1
-
Z
m
i
j
t
-
N
·
Y
m
i
t
I
I
∀
m
∈
M
;
i
,
j
∈
μ
m
,
j
≠
i
;
t
∈
T
1
.adding constraints (32) and the same domain to (14), with YmitII.The objective function (34) minimizes the sum of the backlogging cost, the inventory cost, and a term proportional to the number of item changeovers in the filling lines during the horizon planning.The set of constraints (35) and (36) is similar to (6) and (7), respectively. Constraints (35) ensure the inventory and production balance of the final items. The capacity limit for each filler during the first T1 periods is ensured by constraints (36). Constraints (37) only allow the production of item i at period t if the filler is prepared for it, either by a changeover setup operation (the bottling line is prepared for the production of item j and is changed to item i, and then Zmjit=1) or by the inheritance of the previous period setup state (when the machine in period t-1 is already prepared to produce item i and this preparation was taken to t, YmitII=1). At the beginning of each period, the machine must always be prepared for one item as imposed by constraints (38). The flow of changes and preparations for each filling line are captured by constraints (39). The left side is equal to 1 if there is a preparation and the filler is prepared for item i in period t (YmitII=1) or if there is at least one changeover in the filling line from items j to i (∑jZmjit=1). Therefore, the machine setup is sent to t+1, Ymi,t+1II=1, or there is a setup changeover from items i to any other j during period t (∑j′Zmij′t=1). The same logic applies when both sides are equal to zero. The maximum number of changeovers in each filler m for each period t is limited to Ω (40).By using this model (ATSP-II), the coupling constraints need to be changed by replacingΨ=∑m∈M∑i∈γl∩μmrliXomit.Before going to the next section, note that BSAM-II constraints (11)-(12) were replaced by (39) in the ATSP-II model. This change was motivated by the computational results of various tests conducted, considering both sets of constraints (also adding subtour elimination constraints to the model). The tests did not distinguish the computational performances between the two alternatives and it was decided to use constraints (39).The solutions provided by the solution of this model without constraints (41) enable the existence of subtours and, therefore, it is invalid in practice. These constraints (41) were proposed by Miller et al., therefore named MTZ constraints [22]. To generate constraints (41), MTZ, in order to obtain a feasible solution, it should be imposed that there is only one component connected to the corresponding arc of the YmitII variable, whose constraints (41) achieve this by using variables Vmit, that is, by analyzing the filling line status through any sequence. A similar mathematical modeling strategy is known as the Traveling Salesman Problem [23].The mathematical modeling alternatives for the integrated lot-sizing and scheduling problem in the brewery industry, specifically for Case B, are summarized in Table2. The reading and interpretation of this table are similar to Table 1.Table 2
Mathematical model for Case B.
Obj Func
Constraints
Stages I and II
Stage I
Stage II
BSAM-I + BSAM′-II
(1)
(2)
(3)–(5)
(6)-(7) and (32)
BSAM-I + SPL′-II
(22)
(2)
(3)–(5)
(23)–(26) and (33)
SPL-I + BSAM′-II
(1)
(15)
(16)–(20)
(6)-(7) and (32)
SPL-I + SPL′-II
(22)
(15)
(16)–(20)
(23)–(26) and (33)
BSAM-I + ATSP-II
(34)
(2)
(3)–(5)
(35)–(41) and (10)–(14)
SPL-I + ATSP-II
(34)
(15)
(16)–(20)
(35)–(41) and (10)–(14)


## 5.1. Case B: Stage I

The main difference between Cases A and B is found in Stage II. Therefore, the mathematical modeling of constraints describing BSAM-I and SPL-I for Stage I are valid to Case B.


## 5.2. Case B: Stage II

The proposed mathematical models to represent Stage II in Case A can be adapted to translate Case B. The machine preparation variables (YomipII) lose the index referring to tanks (o, with o∈O) making YmipII. As a consequence, fine adjustments in the model were made since changes in the tank that supply each filling line are no longer tracked. This representation of the problem reduces the number of variables, but the problem is still difficult to solve.The adjustments of the BSAM-II model occur in constraints (9)–(13), which are replaced by (32) while constraints (6) and (7) are kept. This new model is referred to as BSAM′-II. In the SPL-II model, constraints (23)–(26) do not change, but (27)–(30) are permuted by (33). These changes give rise to model SPL′-II.B
S
A
M
′-II. Equations (6) and (7) undergo no change:(32)∑o∈OXomip≤CmtamiYmipIIm∈M;i∈μm;p∈λt;t∈T∑i∈μmYmipII=1m∈M;p∈λt;t∈T1∑i∈μmYmipII≤Ωm∈M;p∈λt;t∈T2Ymj,p-1II=∑i∈μmZmjipm∈M;j∈μm;p∈λt;t∈T1YmipII=∑j∈μmZmjipm∈M;i∈μm;p∈λt;t∈T1.S
P
L
′
-
I
I. Equations (23)–(26) undergo no change:(33)∑i∈μmYmipII=1m∈M;p∈λt;t∈T1∑i∈μmYmipII≤Ωm∈M;p∈λt;t∈T2Ymj,p-1II=∑i∈μmZmjipm∈M;j∈μm;p∈λt;t∈T1YmipII=∑j∈μmZmjipm∈M;i∈μm;p∈λt;t∈T1.In addition to the adjustments to the previous models, a new formulation proposal is made for Stage II based on the ATSP (Asymmetric Traveling Salesman Problem); see Figure2. In this reformulation of the Stage II model, the concept of subperiods is dropped. In this model, each period in the first part of the planning horizon corresponds to one day, but the details regarding the scheduling remains in the first T1 periods. Consider the following settings for the model.Variables: Stage II (ATSP)
Y
m
i
t
I
I: 1, if in filling line m a setup for item i in the beginning of period t occurs, 0 otherwise,
Z
m
j
i
t: 1, if in filling line m a setup changeover from j to i in period t occurs, 0 otherwise,
V
m
i
t: number corresponding to the order production sequence of item i of bottling line m during period t.Objective Function: ATSP-II
(34)
Minimize
∑
i
∈
N
∑
t
∈
T
h
i
+
I
i
t
+
+
∑
i
∈
N
∑
t
∈
T
h
i
-
I
i
t
-
+
∑
m
∈
M
∑
j
,
i
∈
μ
m
∑
t
∈
T
1
α
Z
m
j
i
t
.ATSP-II
(35)
∑
o
∈
O
∑
m
∈
M
,
i
∈
μ
m
X
o
m
i
t
+
I
i
,
t
-
1
+
+
I
i
t
-
=
d
i
t
+
I
i
,
t
-
1
-
+
I
i
t
+
i
∈
N
;
t
∈
T
(36)
∑
o
∈
O
∑
i
∈
μ
m
a
m
i
·
X
o
m
i
t
+
∑
i
∈
μ
m
∑
j
∈
μ
m
b
m
i
j
·
Z
m
i
j
t
≤
C
m
t
∀
m
∈
M
;
t
∈
T
1
(37)
X
o
m
i
t
≤
C
m
t
a
m
i
·
∑
j
∈
μ
m
Z
m
j
i
t
+
Y
m
i
t
I
I
∀
o
∈
O
,
m
∈
M
,
i
∈
μ
m
;
t
∈
T
1
(38)
∑
i
∈
μ
m
Y
m
i
t
I
I
=
1
∀
m
∈
M
;
t
∈
T
(39)
Y
m
i
t
I
I
+
∑
j
∈
μ
m
Z
m
j
i
t
=
∑
j
∈
μ
m
Z
m
i
j
t
+
Y
m
i
,
t
+
1
I
I
∀
m
∈
M
;
i
∈
μ
m
;
t
∈
T
1
(40)
∑
i
∈
μ
m
∑
j
∈
μ
m
Z
m
i
j
t
<
Ω
∀
m
∈
M
;
t
∈
T
1
(41)
V
m
j
t
≥
V
m
i
t
+
1
-
N
·
1
-
Z
m
i
j
t
-
N
·
Y
m
i
t
I
I
∀
m
∈
M
;
i
,
j
∈
μ
m
,
j
≠
i
;
t
∈
T
1
.adding constraints (32) and the same domain to (14), with YmitII.The objective function (34) minimizes the sum of the backlogging cost, the inventory cost, and a term proportional to the number of item changeovers in the filling lines during the horizon planning.The set of constraints (35) and (36) is similar to (6) and (7), respectively. Constraints (35) ensure the inventory and production balance of the final items. The capacity limit for each filler during the first T1 periods is ensured by constraints (36). Constraints (37) only allow the production of item i at period t if the filler is prepared for it, either by a changeover setup operation (the bottling line is prepared for the production of item j and is changed to item i, and then Zmjit=1) or by the inheritance of the previous period setup state (when the machine in period t-1 is already prepared to produce item i and this preparation was taken to t, YmitII=1). At the beginning of each period, the machine must always be prepared for one item as imposed by constraints (38). The flow of changes and preparations for each filling line are captured by constraints (39). The left side is equal to 1 if there is a preparation and the filler is prepared for item i in period t (YmitII=1) or if there is at least one changeover in the filling line from items j to i (∑jZmjit=1). Therefore, the machine setup is sent to t+1, Ymi,t+1II=1, or there is a setup changeover from items i to any other j during period t (∑j′Zmij′t=1). The same logic applies when both sides are equal to zero. The maximum number of changeovers in each filler m for each period t is limited to Ω (40).By using this model (ATSP-II), the coupling constraints need to be changed by replacingΨ=∑m∈M∑i∈γl∩μmrliXomit.Before going to the next section, note that BSAM-II constraints (11)-(12) were replaced by (39) in the ATSP-II model. This change was motivated by the computational results of various tests conducted, considering both sets of constraints (also adding subtour elimination constraints to the model). The tests did not distinguish the computational performances between the two alternatives and it was decided to use constraints (39).The solutions provided by the solution of this model without constraints (41) enable the existence of subtours and, therefore, it is invalid in practice. These constraints (41) were proposed by Miller et al., therefore named MTZ constraints [22]. To generate constraints (41), MTZ, in order to obtain a feasible solution, it should be imposed that there is only one component connected to the corresponding arc of the YmitII variable, whose constraints (41) achieve this by using variables Vmit, that is, by analyzing the filling line status through any sequence. A similar mathematical modeling strategy is known as the Traveling Salesman Problem [23].The mathematical modeling alternatives for the integrated lot-sizing and scheduling problem in the brewery industry, specifically for Case B, are summarized in Table2. The reading and interpretation of this table are similar to Table 1.Table 2
Mathematical model for Case B.
Obj Func
Constraints
Stages I and II
Stage I
Stage II
BSAM-I + BSAM′-II
(1)
(2)
(3)–(5)
(6)-(7) and (32)
BSAM-I + SPL′-II
(22)
(2)
(3)–(5)
(23)–(26) and (33)
SPL-I + BSAM′-II
(1)
(15)
(16)–(20)
(6)-(7) and (32)
SPL-I + SPL′-II
(22)
(15)
(16)–(20)
(23)–(26) and (33)
BSAM-I + ATSP-II
(34)
(2)
(3)–(5)
(35)–(41) and (10)–(14)
SPL-I + ATSP-II
(34)
(15)
(16)–(20)
(35)–(41) and (10)–(14)


## 6. MIP-Based Heuristics: Decomposition of Stages

Using both case models, several computational tests were conducted using different MIP-heuristic methods to find good solutions for the problem, which are not accomplished by the exact methods found in standard commercial optimization solvers.In the design of the MIP-heuristics, a hierarchical decomposition method is followed. By decoupling stages, the method aims to disaggregate the most difficult decisions of each stage, while providing relevant information from one stage to the other. The MIP-heuristics first solve Stage I and then Stage II. In other words, first the tank filling plans are defined, and this information is used to develop the bottling plans. Basically, Stage I defines which liquids, periods, and the corresponding amount of these fluids that will be ready in each one of the tanks during the planning horizon. This information is then used to develop the production plan for Stage II. The order in which each stage is solved was defined after several preliminary tests. As a matter of fact, when Stage II was solved first followed by Stage I, there were many cases in which the heuristics were unable to find feasible solutions. This fact occurs mainly by establishing impracticable production plans due to unforeseen tank capacity issues resulting in ready liquid absence to manufacture the expected items. This situation does not occur if Stage I is solved first and then Stage II, since Stage II can always adapt its schedule to the available ready liquid, even if it implies backlogging some demand.Thus, the proposed MIP-heuristic can be described in two main steps: one describing the Stage I solution and the other tailored to solve Stage II.Step 1 (Stage I).
When disengaging stages during Stage I solution, some constraints of Stage II and other relevant information have to be considered to prevent some solutions, such as having all the liquids ready at the same time, overwhelming the filling lines. Other constraints follow the same definitions of their mathematical models previously described.
MIP-Heuristic: Stage I
(42)
Minimize
∑
i
∈
N
∑
t
∈
T
h
i
+
I
i
t
+
+
∑
i
∈
N
∑
t
∈
T
h
i
-
I
i
t
-
(43)
∑
i
∈
N
Y
m
i
t
≤
Ω
t
∈
T
;
m
∈
M
(44)
X
o
m
i
t
I
≤
m
i
n
∑
t
′
=
t
T
d
i
t
′
,
C
m
t
a
m
i
Y
m
i
t
o
∈
O
;
m
∈
M
;
i
∈
μ
m
;
t
∈
T
(45)
∑
o
∈
O
∑
i
∈
μ
m
a
m
i
X
o
m
i
t
I
≤
C
m
t
m
∈
M
;
t
∈
T
(46)
∑
o
∈
O
∑
m
∈
M
,
i
∈
μ
m
X
o
m
i
t
I
+
I
i
,
t
-
1
+
+
I
i
t
-
=
d
i
t
+
I
i
,
t
-
1
-
+
I
i
t
+
t
∈
T
;
i
∈
N
(47)
K
o
l
t
+
∑
m
∈
M
∑
i
∈
γ
l
∩
μ
m
∑
p
∈
λ
t
r
l
i
X
o
m
i
p
=
K
o
l
,
t
-
1
+
Q
o
l
t
o
∈
O
;
l
∈
L
;
t
∈
T
,adding Stage I constraints (BSAM-I or SPL-I).
The Stage I solution is intended to provide the tank fill planning, searching to supply liquid in the filling lines in order to avoid the (expected) backlog and inventory costs of the final items. Therefore, the objective function (42) aims at minimizing the sum of possible costs incurred by inventory and/or backlog of final items. The set of constraints (43)–(46) is responsible for including some information about Stage I regarding Stage II, avoiding infeasible solutions. Constraints (44) ensure that production occurs only if the filler is prepared. Constraints (45) ensure that production must respect the maximum capacity of the filler available for the period. The balance of inventory and production are ensured by (46). Other constraints need to be added according to the model being solved. In BSAM-I, constraints (3)-(4) are added to the set of previous constraints. However, if in SPL-I, the previous constraints are combined with constraints (16)–(21); that is, constraints (43)–(47) are not modified regardless of the model used. The planning decisions concerning tanks obtained from this model are saved on the amounts corresponding to Qolt and YoltI and are kept in Qcopyolt and YcopyoltI, respectively. This information is sent to Stage II solution (MIP-heuristic, Stage II) and strictly followed in the next step.Step 2 (Stage II).
The information received from Step1 (Qcopyolt and YcopyoltI) is maintained and respected during the solution of Stage II. Furthermore, the objective function is the same as that defined in Stage II models both for Cases A and B.
MIP-Heuristic: Stage II
Objective Function
Case A: BSAM-II or SPL-II or
Case B: BSAM′-II or SPL′-II or ATSP-II:(48)Kolt=Kol,t-1-Ψ+Qolto∈O;l∈L;t∈T(49)∑l′=1L∑t′=1Δl+1Kol′,t-t′≤B1-YcopyoltIo∈O;l∈L;t∈T(50)QcopyoltYcopyoltI≤Qolt≤CapmaxoYcopyoltIo∈O;l∈L;t∈Tusing the correspondents Ψ, according to Case A or B and also the model that one wants to use to represent Stage II.
Stage II
Case A: BSAM-II or SPL-II or
Case B: BSAM′-II or SPL′-II or ATSP-II.In this step, the MIP-heuristic solves Stage II considering the information received from Stage I (Qcopyolt and YcopyoltI). This is achieved using the set of constraints (48)–(50), which is responsible for the definition of the tanks plan in Stage II. The production only occurs if there is ready liquid available for the filling, as guaranteed by constraints (48). Constraints (49) ensure the tank will be empty in order to receive the liquid that will ferment and mature and also that it will be exclusively for this liquid while fermenting and maturing. Moreover, constraints (50) ensure that the maximum and minimum tank limits are respected.The MIP-heuristics used to solve Cases A and B follow the modeling approach defined in Tables1 and 2. To distinguish them from the original model solution, these heuristics are named using “H:” in front of the respective model name, for example, H:BSAM-I + BSAM-II.


## 7. Computational Results

The solution approaches were implemented in C++ using ILOG Concert libraries and were solved using the solver Cplex (version 12.6). The test bed consisted of the same testing instances introduced in Baldo et al. [19], composed of 20 instances randomly generated based on real data. The numbers of items (N=35,40) and filling lines (M=5) have dimensions that correspond to industrial settings usually found in brewery companies. The tests were performed using a PC with a 3.4 GHz Core i7 2600 processor (four cores, 2 threads each) and 16 GB of RAM memory. The running time of each solution approach was limited to one hour, which is an acceptable time in order to support planning decisions in practical settings. For the MIP-heuristics, the maximum execution time was divided by the two steps as follows: a maximum of 45 minutes for the solution of Stage I model and the remaining time for the Stage II model.For each instance, the values of GAP—defined in (51), RATIO—calculated as (52), the amount of undelivered demand at the end of the planning horizon, and the execution time were analyzed. In the definitions of GAP and RATIO, OF represents the current value of the analyzed objective function, LB is the best lower bound found for the instance during the runtime limit, and OFBest is the best objective function value found for the problem. (51)GAP=OF-LBOF%(52)RATIO=OF-OFBestOF%.The results are presented in Subsections 7.1, 7.2, and 7.3. Subsection 7.1 contains the results of Case A shown in this sequence: the holistic model and the MIP-heuristic results, the latter was compared with the best model performances, and then a summary was compiled and is shown in Table3. Subsection 7.2 presents the results of Case B using the same layout introduced for Case A. Then, Subsection 7.3 compares both Cases A and B. In Subsections 7.1 and 7.2, the comparison charts are based on the study presented in Dolan and Moré [24]. In the charts in Figures 4 and 5, two or more methods can be compared by analyzing the relation of a performance parameter (e.g., OF, RATIO, and GAP) in a finite set of instances. The deviations between the solution value of each procedure and the best solution of all methods are calculated for each instance. Then, a chart based on Dolan and Moré is complied based on the quantity of solutions that presents deviations smaller than τ. This is done for all methods and it is analyzed in relation to the percentage of the entire set of test instances solved. In this paper, the objective function (OF) values are used as the performance parameter.Table 3
Case A: comparison in relation to GAP values of MIP-heuristics and between the models with the best performance.
Instance
Models
H:BAL14
H:BSAM-I + BSAM-II
H:BSAM-I + SPL-II
H:SPL-I + BSAM-II
H:SPL-I + SPL-II
|
N
|
=
35
98.46%
27.33%
22.68%
27.33%
5.59%
8.26%
98.70%
18.50%
25.68%
93.62%
8.35%
93.62%
99.12%
18.11%
94.01%
11.38%
5.63%
12.58%
99.22%
15.15%
2.68%
4.83%
52.18%
54.87%
98.77%
15.15%
61.08%
7.81%
24.43%
9.32%
99.62%
20.98%
4.37%
13.70%
6.34%
23.96%
99.92%
13.71%
28.16%
28.16%
5.16%
5.10%
98.95%
17.42%
21.07%
7.22%
4.27%
8.51%
99.79%
14.50%
4.27%
11.05%
5.18%
5.33%
99.93%
15.21%
4.32%
15.90%
52.11%
15.60%
|
N
|
=
40
99.82%
40.57%
51.19%
18.67%
11.26%
6.63%
99.93%
35.73%
7.75%
7.21%
7.13%
5.53%
99.93%
34.18%
19.90%
37.59%
5.63%
15.82%
99.54%
20.21%
8.36%
83.15%
85.30%
22.03%
99.93%
83.87%
13.87%
14.63%
14.63%
1.18%
99.93%
29.76%
91.47%
91.61%
4.66%
5.44%
99.93%
20.60%
11.50%
12.01%
20.60%
20.60%
99.92%
88.64%
8.59%
12.07%
7.68%
4.34%
99.93%
50.04%
46.49%
12.88%
82.32%
7.14%
99.76%
58.47%
7.04%
16.67%
71.23%
6.34%
Average
99.56%
31.91%
26.72%
26.37%
23.98%
16.61%Figure 4
Case A: (i) performance profile and (ii) boxplot graphic summarizing the results of the RATIO.
(a)
Mathematical models
(b)
MIP-heuristicsFigure 5
Case B: (i) performance profile and (ii) boxplot graphic summarizing the results of the RATIO.
(a)
Mathematical models
(b)
MIP-heuristicsThe chart based on Dolan and Moré depictsP(log2(rp,s)≤τ:1≤s≤nS) values, which represent the cumulative distribution function for the performance profile associated with a given value τ, that is, the fraction of problems solved by the method within a factor τ of the best performance obtained. All charts use a logarithmic scale to present the results.The computational results for the first, second, and third parts are presented in Sections7.1, 7.2, and 7.3, respectively. For the graph interpretation, summarizing, the y-axis is the fraction of solved examples and the x-axis is given by τ. Thus, the performance of each procedure is represented by one curve in these graphs. The curve should be analyzed in relation to the origin—the closer the origin is in the x-axis and the further it is in the y-axis, the greater the number of problems solved considering the best performance by this procedure is. If the curve is in y-axis, finding level 1 means that all instances have been resolved by the method.


### 7.1. Computational Results: Case A

As already mentioned, all computational tests were solved using CPLEX 12.6. However, we used the results published in Baldo et al. [19] for BSAM-I + BSAM-II model MIP-heuristic Pro_Inc (the method with the best performance in the literature and named here as H:BAL14), that is, using the version of CPLEX 12.4. It is worth remembering that, in the referred paper, the comparison of the results was analyzed using only RATIO values, while in this present research we are using RATIO values (calculated in relation to the methods presented here) and other comparison parameters.The mathematical models described in Table1 obtained feasible solutions for all the 20 test instances within the specified time limit. Figure 4(a)-(i) presents the results of the performance profiles expressed as suggested in Dolan and Moré [24], using the OF as the comparison metric. Figure 4(a)-(ii) depicts the RATIO values through a boxplot, whose interpretation should be made in relation to the y-axis. The closer the boxplot extremes are to zero, that is, its quartiles, the closer the solutions are to the best solution found for the instances.Note also in Figure4(a)-(ii) that, next to each boxplot, the set of points representing each individual instance is also depicted. The closer the points are to zero, the better the quality of the evaluated solutions is. Analyzing Figure 4(a)-(i), the models BSAM-I + SPL-II, BSAM-I + BSAM-II, SPL-I + GLSP-II, and SPL-I + SPL-II obtained the best OF values for 60%, 30%, 15%, and 5%, respectively. Note that the sum of these percentages is equal to 110%, which means that there was a draw in 10% of the best solutions. The SPL-I + GLSP-II and SPL-I + SPL-II models had poor performances for 90% of the test instances when compared to BSAM-I + BSAM-II and BSAM-I + SPL-II models, which alternated (or tied) in yielding the best performances. These results can be reaffirmed by observing Figure 4(a)-(ii). Therefore, in general, it can be affirmed that model SPL-I + SPL-II had the less satisfactory performance, while the most satisfying one alternated between models BSAM-I + BSAM-II and BSAM-I + SPL-II, with the latter producing a higher percentage of the best solutions. The amount of demand not delivered at the end of the planning horizon was quite high for all models, with an average of 73.3%, 71.8%, 78.8%, and 95.0% to models BSAM-I + BSAM-II, BSAM-I + SPL-II, SPL-I + GLSP-II, and SPL-I + SPL-II, respectively.Concerning the GAPs, all the models obtained a value higher than 98% and, to compare the performances of the mathematical models with the MIP-heuristics, we used the best value ofOF obtained regardless of which model was provided for each of the instances. Thus, in the second column of Table 3 (models), the GAP of the best OF values among all the analyzed models is shown.The results obtained using the MIP-heuristics are presented in Figure4(b) and Table 3, and the interpretation is similar to Figure 4(a). All the MIP-heuristics obtained a feasible solution for the 20 test instances using less than 3500 seconds in 100% of the tests. In Figure 4(b)-(i), the values obtained by the models, even with the best results among them, were clearly worse than any of the MIP-heuristics. These results are reinforced by the representation shown in Figure 4(b)-(ii), as the boxplot corresponding to the best objective among all models is far from the origin on the y-axis. Moreover, the points designating the RATIO are all close to 100%. Regarding the MIP-heuristics, it can be seen that H:BAL14, H:BSAM-I + BSAM-II, H:BSAM-I + SPL-II, H:SPL-I + BSAM-II, and H:SPL-I + SPL-II showed the best OFs to 0%, 30%, 5%, 35%, and 35% of the instances, respectively. H:BAL14 was the MIP-heuristic that provided the best results reported in the literature; however it had a poor performance for 75% of the instance resolutions when compared to the newly introduced MIP-heuristics. Overall, H:SPL-I + SPL-II showed the best performance in 95% of the cases, as shown in Figure 4(b)-(i), for 90% of the instances, as its RATIO was less than 25% (see Figure 4(b)-(ii)). The amount of demand not delivered at the end of the planning horizon was practically zero for all the heuristics, with an average of 0.00%, 0.02%, 0.03%, 0.00%, and 0.00% for H:BSAM-I + BSAM-II, H:BSAM-I + SPL-II, H:SPL-I + BSAM-II, and H:SPL-I + SPL-II, respectively.Concerning the GAPs, Table3 shows that H:BAL14 obtained higher values than the other MIP-heuristics, with an average GAP of 31.91%. For all 20 instances, H:BSAM-I + BSAM-II, H:BSAM-I + SPL-II, H:SPL-I + BSAM-II, and H:SPL-I + SPL-II presented the best GAP values with 30%, 5%, 30%, and 35%, respectively. Furthermore, the best average GAP value was H:SPL-I + SPL-II with 16.61%. To sum up, when considering Case A, the MIP-heuristics from the literature did not obtain as good results as the MIP-heuristics proposed here.


### 7.2. Computational Results: Case B

The computational tests for Case B were conducted with the same instances used in Case A. The results of the mathematical models proposed for Case B described in Table2 are shown in Figure 5(a). The models provided feasible solutions for all instances within the computational time available. Models BSAM-I + BSAM′-II, BSAM-I + SPL′-II, BSAM-I + ATSP-II, SPL-I + BSAM′-II, SPL-I + SPL′-II, and SPL-I + ATSP-II showed the best OF values for 45%, 5%, 50%, 0%, 0%, and 0%, respectively. The model that had the overall worst performance was SPL-I + SPL′-II. Models SPL-I + ATSP-II and SPL-I + BSAM′-II, despite having better performances than SPL-I + SPL′-II, underperformed the others and had a performance close to BSAM-I + SPL′-II. The amount of demand not delivered at the end of the planning horizon averaged 16.69%, 61.92%, 15.02%, 70.80%, 99.32%, and 52.19% to BSAM-I + BSAM′-II, BSAM-I + SPL′-II, BSAM-I + ATSP-II, SPL-I + BSAM′-II, SPL-I + SPL′-II, and SPL-I + ATSP-II, respectively. The best performance was obtained from model BSAM-I + ATSP-II, followed by BSAM-I + BSAM′-II. Regarding the GAPs, in the vast majority of the instances, the models had GAP values over 70%, a few cases differ from this result. Regarding the comparison with the MIP-heuristic results, again the best OF values obtained for each of the instances were selected, regardless of which model provided this value. These GAPs are given in Table 4 in the column named models.Table 4
Case B: comparison in relation to GAP values of MIP-heuristics and among the models with the best performance.
Instance
Models
H:BSAM-I + BSAM′-II
H:BSAM-I + SPL′-II
H:BSAM-I + ATSP-II
H:SPL-I + BSAM′-II
H:SPL-I + SPL′-II
H:SPL-I + ATSP-II
|N|=35
40.89%
20.49%
4.21%
20.40%
1.48%
1.62%
1.33%
47.28%
4.13%
47.28%
3.75%
2.02%
2.12%
1.51%
95.14%
1.16%
3.31%
1.08%
1.28%
1.05%
1.07%
98.82%
1.17%
3.48%
0.94%
1.61%
1.31%
1.22%
44.94%
1.11%
2.46%
0.95%
1.07%
1.19%
1.23%
35.22%
1.76%
3.75%
20.90%
1.59%
1.65%
1.58%
86.07%
22.76%
86.07%
1.67%
1.20%
1.73%
1.07%
10.78%
0.57%
3.45%
0.40%
0.64%
0.59%
0.38%
29.51%
1.15%
2.59%
0.99%
1.29%
1.35%
1.01%
17.40%
1.32%
2.92%
1.42%
2.01%
2.08%
1.75%
40.73%
2.39%
4.39%
2.50%
1.84%
1.86%
1.94%
|N|=40
71.44%
1.44%
3.53%
1.22%
1.52%
1.74%
1.30%
48.41%
2.48%
4.43%
1.88%
2.65%
2.70%
1.80%
18.39%
1.87%
18.79%
1.67%
1.96%
1.88%
1.77%
95.62%
2.01%
5.44%
1.30%
1.61%
1.61%
5.44%
92.36%
1.66%
5.06%
1.44%
1.51%
1.55%
1.76%
91.04%
1.65%
14.53%
1.55%
14.53%
14.53%
14.53%
45.05%
1.30%
14.61%
1.19%
1.09%
14.61%
1.08%
50.76%
1.94%
14.09%
1.74%
1.65%
1.67%
1.41%
98.04%
2.23%
5.36%
1.39%
1.35%
1.51%
1.13%
Average
57.89%
3.73%
12.49%
3.42%
2.19%
2.92%
2.22%The MIP-heuristic results are shown in Figure5(b) and Table 4. The performances of the models in obtaining good solutions were lower than the MIP-heuristics, followed by a not very satisfactory H:BSAM-I + SPL′-II performance. For the remaining MIP-heuristics, the results showed very similar performances; see Figure 5(b)-(i). In a more detailed analysis of Figure 5(b)-(ii), it may be noted that the MIP-heuristics with RATIOS less discrepant were H:SPL-I + BSAM′-II, H:SPL-I + ATSP-II, H:SPL-I + SPL′-II, H:BSAM-I + ATSP-II, H:BSAM-I + BSAM′-II, and H:BSAM-I + SPL′-II, respectively. The amount of undelivered demand at the end of the planning horizon was close to zero for all procedures. Regarding the GAP values shown in Table 4, the MIP-heuristics H:BSAM-I + BSAM′-II, H:BSAM-I + SPL′-II, H:BSAM-I + ATSP-II, H:SPL-I + BSAM′-II, H:SPL-I + SPL′-II, and H:SPL-I + ATSP-II presented the best values for 5%, 0%, 40%, 5%, 5%, and 45%, respectively. The best average GAP was H:SPL-I + BSAM′-II, with a value of 2.19%. Therefore, it can be stated that the best performances were obtained using the MIP-heuristics H:BSAM-I + BSAM′-II, H:SPL-I + BSAM′-II, and H:BSAM-I + ATSP-II.


### 7.3. Results: Case A versus Case B

In order to analyze the benefits of investing in the production process in order to change the situation from Case A to Case B, that is, automating the changeover process of the tanks that are supplying the filling lines, the results for all instances in both scenarios were compared. However, due to the large number of results and the similar behavior between these instances, only two of them were chosen to be reported here: one of the class of 35 items (|N|=35) and the other of 40 (|N|=40), both with 5 fillers.Figure6(a) depicts the comparison of the instance with 35 items, showing the best performance obtained by the models that were presented in Tables 3 and 4, as well as the new MIP-heuristics, highlighting the procedures with the best and the worst GAP values, that is, models SPL-I + BSAM-II and BSAM-I + BSAM′-II and MIP-heuristics H:BSAM-I + SPL-II, H:BSAM-I + SPL′-II, H:BSAM-I + BSAM-II, and H:BSAM-I + BSAM′-II. The RATIOS were analyzed by comparing the results of all mentioned methods in Figure 6(a). Note that the models’ solutions have shown backlogs on the demand deliveries, while this does not occur for the MIP-heuristics. Furthermore, the solution of Case A had a much higher delay in comparison to Case B. Analyzing the MIP-heuristics, even the results of that underperformance for Case B (0.38%) exceeds the best of Case A. Comparing only the best performances of both scenarios, Case A implies a higher cost, almost better than 1.35%, when compared to Case B. This is because the solution of Case B was able to keep a smaller amount of items in the inventory throughout the planning horizon.Figure 6
Results obtained from comparing Cases A and B to an instance with|N|=35 and |N|=40, respectively.
(a)
|
N
|
=
35
(b)
|
N
|
=
40The results of the 40-item instance are shown in Figure6(b) and were analyzed similarly to Figure 6(a). The solution obtained by the model of Case A (BSAM-I + SPL-II) had a high cost of delay, which does not occur in the solution of BSAM-I + ATSP-II for Case B. Regarding the MIP-heuristics, even the worst solution of Case B is better than the best of Case A. Furthermore, using the best solution of Case A implies a cost increase of over 4% in comparison to the best solution obtained for Case B.


## 7.1. Computational Results: Case A

As already mentioned, all computational tests were solved using CPLEX 12.6. However, we used the results published in Baldo et al. [19] for BSAM-I + BSAM-II model MIP-heuristic Pro_Inc (the method with the best performance in the literature and named here as H:BAL14), that is, using the version of CPLEX 12.4. It is worth remembering that, in the referred paper, the comparison of the results was analyzed using only RATIO values, while in this present research we are using RATIO values (calculated in relation to the methods presented here) and other comparison parameters.The mathematical models described in Table1 obtained feasible solutions for all the 20 test instances within the specified time limit. Figure 4(a)-(i) presents the results of the performance profiles expressed as suggested in Dolan and Moré [24], using the OF as the comparison metric. Figure 4(a)-(ii) depicts the RATIO values through a boxplot, whose interpretation should be made in relation to the y-axis. The closer the boxplot extremes are to zero, that is, its quartiles, the closer the solutions are to the best solution found for the instances.Note also in Figure4(a)-(ii) that, next to each boxplot, the set of points representing each individual instance is also depicted. The closer the points are to zero, the better the quality of the evaluated solutions is. Analyzing Figure 4(a)-(i), the models BSAM-I + SPL-II, BSAM-I + BSAM-II, SPL-I + GLSP-II, and SPL-I + SPL-II obtained the best OF values for 60%, 30%, 15%, and 5%, respectively. Note that the sum of these percentages is equal to 110%, which means that there was a draw in 10% of the best solutions. The SPL-I + GLSP-II and SPL-I + SPL-II models had poor performances for 90% of the test instances when compared to BSAM-I + BSAM-II and BSAM-I + SPL-II models, which alternated (or tied) in yielding the best performances. These results can be reaffirmed by observing Figure 4(a)-(ii). Therefore, in general, it can be affirmed that model SPL-I + SPL-II had the less satisfactory performance, while the most satisfying one alternated between models BSAM-I + BSAM-II and BSAM-I + SPL-II, with the latter producing a higher percentage of the best solutions. The amount of demand not delivered at the end of the planning horizon was quite high for all models, with an average of 73.3%, 71.8%, 78.8%, and 95.0% to models BSAM-I + BSAM-II, BSAM-I + SPL-II, SPL-I + GLSP-II, and SPL-I + SPL-II, respectively.Concerning the GAPs, all the models obtained a value higher than 98% and, to compare the performances of the mathematical models with the MIP-heuristics, we used the best value ofOF obtained regardless of which model was provided for each of the instances. Thus, in the second column of Table 3 (models), the GAP of the best OF values among all the analyzed models is shown.The results obtained using the MIP-heuristics are presented in Figure4(b) and Table 3, and the interpretation is similar to Figure 4(a). All the MIP-heuristics obtained a feasible solution for the 20 test instances using less than 3500 seconds in 100% of the tests. In Figure 4(b)-(i), the values obtained by the models, even with the best results among them, were clearly worse than any of the MIP-heuristics. These results are reinforced by the representation shown in Figure 4(b)-(ii), as the boxplot corresponding to the best objective among all models is far from the origin on the y-axis. Moreover, the points designating the RATIO are all close to 100%. Regarding the MIP-heuristics, it can be seen that H:BAL14, H:BSAM-I + BSAM-II, H:BSAM-I + SPL-II, H:SPL-I + BSAM-II, and H:SPL-I + SPL-II showed the best OFs to 0%, 30%, 5%, 35%, and 35% of the instances, respectively. H:BAL14 was the MIP-heuristic that provided the best results reported in the literature; however it had a poor performance for 75% of the instance resolutions when compared to the newly introduced MIP-heuristics. Overall, H:SPL-I + SPL-II showed the best performance in 95% of the cases, as shown in Figure 4(b)-(i), for 90% of the instances, as its RATIO was less than 25% (see Figure 4(b)-(ii)). The amount of demand not delivered at the end of the planning horizon was practically zero for all the heuristics, with an average of 0.00%, 0.02%, 0.03%, 0.00%, and 0.00% for H:BSAM-I + BSAM-II, H:BSAM-I + SPL-II, H:SPL-I + BSAM-II, and H:SPL-I + SPL-II, respectively.Concerning the GAPs, Table3 shows that H:BAL14 obtained higher values than the other MIP-heuristics, with an average GAP of 31.91%. For all 20 instances, H:BSAM-I + BSAM-II, H:BSAM-I + SPL-II, H:SPL-I + BSAM-II, and H:SPL-I + SPL-II presented the best GAP values with 30%, 5%, 30%, and 35%, respectively. Furthermore, the best average GAP value was H:SPL-I + SPL-II with 16.61%. To sum up, when considering Case A, the MIP-heuristics from the literature did not obtain as good results as the MIP-heuristics proposed here.


## 7.2. Computational Results: Case B

The computational tests for Case B were conducted with the same instances used in Case A. The results of the mathematical models proposed for Case B described in Table2 are shown in Figure 5(a). The models provided feasible solutions for all instances within the computational time available. Models BSAM-I + BSAM′-II, BSAM-I + SPL′-II, BSAM-I + ATSP-II, SPL-I + BSAM′-II, SPL-I + SPL′-II, and SPL-I + ATSP-II showed the best OF values for 45%, 5%, 50%, 0%, 0%, and 0%, respectively. The model that had the overall worst performance was SPL-I + SPL′-II. Models SPL-I + ATSP-II and SPL-I + BSAM′-II, despite having better performances than SPL-I + SPL′-II, underperformed the others and had a performance close to BSAM-I + SPL′-II. The amount of demand not delivered at the end of the planning horizon averaged 16.69%, 61.92%, 15.02%, 70.80%, 99.32%, and 52.19% to BSAM-I + BSAM′-II, BSAM-I + SPL′-II, BSAM-I + ATSP-II, SPL-I + BSAM′-II, SPL-I + SPL′-II, and SPL-I + ATSP-II, respectively. The best performance was obtained from model BSAM-I + ATSP-II, followed by BSAM-I + BSAM′-II. Regarding the GAPs, in the vast majority of the instances, the models had GAP values over 70%, a few cases differ from this result. Regarding the comparison with the MIP-heuristic results, again the best OF values obtained for each of the instances were selected, regardless of which model provided this value. These GAPs are given in Table 4 in the column named models.Table 4
Case B: comparison in relation to GAP values of MIP-heuristics and among the models with the best performance.
Instance
Models
H:BSAM-I + BSAM′-II
H:BSAM-I + SPL′-II
H:BSAM-I + ATSP-II
H:SPL-I + BSAM′-II
H:SPL-I + SPL′-II
H:SPL-I + ATSP-II
|N|=35
40.89%
20.49%
4.21%
20.40%
1.48%
1.62%
1.33%
47.28%
4.13%
47.28%
3.75%
2.02%
2.12%
1.51%
95.14%
1.16%
3.31%
1.08%
1.28%
1.05%
1.07%
98.82%
1.17%
3.48%
0.94%
1.61%
1.31%
1.22%
44.94%
1.11%
2.46%
0.95%
1.07%
1.19%
1.23%
35.22%
1.76%
3.75%
20.90%
1.59%
1.65%
1.58%
86.07%
22.76%
86.07%
1.67%
1.20%
1.73%
1.07%
10.78%
0.57%
3.45%
0.40%
0.64%
0.59%
0.38%
29.51%
1.15%
2.59%
0.99%
1.29%
1.35%
1.01%
17.40%
1.32%
2.92%
1.42%
2.01%
2.08%
1.75%
40.73%
2.39%
4.39%
2.50%
1.84%
1.86%
1.94%
|N|=40
71.44%
1.44%
3.53%
1.22%
1.52%
1.74%
1.30%
48.41%
2.48%
4.43%
1.88%
2.65%
2.70%
1.80%
18.39%
1.87%
18.79%
1.67%
1.96%
1.88%
1.77%
95.62%
2.01%
5.44%
1.30%
1.61%
1.61%
5.44%
92.36%
1.66%
5.06%
1.44%
1.51%
1.55%
1.76%
91.04%
1.65%
14.53%
1.55%
14.53%
14.53%
14.53%
45.05%
1.30%
14.61%
1.19%
1.09%
14.61%
1.08%
50.76%
1.94%
14.09%
1.74%
1.65%
1.67%
1.41%
98.04%
2.23%
5.36%
1.39%
1.35%
1.51%
1.13%
Average
57.89%
3.73%
12.49%
3.42%
2.19%
2.92%
2.22%The MIP-heuristic results are shown in Figure5(b) and Table 4. The performances of the models in obtaining good solutions were lower than the MIP-heuristics, followed by a not very satisfactory H:BSAM-I + SPL′-II performance. For the remaining MIP-heuristics, the results showed very similar performances; see Figure 5(b)-(i). In a more detailed analysis of Figure 5(b)-(ii), it may be noted that the MIP-heuristics with RATIOS less discrepant were H:SPL-I + BSAM′-II, H:SPL-I + ATSP-II, H:SPL-I + SPL′-II, H:BSAM-I + ATSP-II, H:BSAM-I + BSAM′-II, and H:BSAM-I + SPL′-II, respectively. The amount of undelivered demand at the end of the planning horizon was close to zero for all procedures. Regarding the GAP values shown in Table 4, the MIP-heuristics H:BSAM-I + BSAM′-II, H:BSAM-I + SPL′-II, H:BSAM-I + ATSP-II, H:SPL-I + BSAM′-II, H:SPL-I + SPL′-II, and H:SPL-I + ATSP-II presented the best values for 5%, 0%, 40%, 5%, 5%, and 45%, respectively. The best average GAP was H:SPL-I + BSAM′-II, with a value of 2.19%. Therefore, it can be stated that the best performances were obtained using the MIP-heuristics H:BSAM-I + BSAM′-II, H:SPL-I + BSAM′-II, and H:BSAM-I + ATSP-II.


## 7.3. Results: Case A versus Case B

In order to analyze the benefits of investing in the production process in order to change the situation from Case A to Case B, that is, automating the changeover process of the tanks that are supplying the filling lines, the results for all instances in both scenarios were compared. However, due to the large number of results and the similar behavior between these instances, only two of them were chosen to be reported here: one of the class of 35 items (|N|=35) and the other of 40 (|N|=40), both with 5 fillers.Figure6(a) depicts the comparison of the instance with 35 items, showing the best performance obtained by the models that were presented in Tables 3 and 4, as well as the new MIP-heuristics, highlighting the procedures with the best and the worst GAP values, that is, models SPL-I + BSAM-II and BSAM-I + BSAM′-II and MIP-heuristics H:BSAM-I + SPL-II, H:BSAM-I + SPL′-II, H:BSAM-I + BSAM-II, and H:BSAM-I + BSAM′-II. The RATIOS were analyzed by comparing the results of all mentioned methods in Figure 6(a). Note that the models’ solutions have shown backlogs on the demand deliveries, while this does not occur for the MIP-heuristics. Furthermore, the solution of Case A had a much higher delay in comparison to Case B. Analyzing the MIP-heuristics, even the results of that underperformance for Case B (0.38%) exceeds the best of Case A. Comparing only the best performances of both scenarios, Case A implies a higher cost, almost better than 1.35%, when compared to Case B. This is because the solution of Case B was able to keep a smaller amount of items in the inventory throughout the planning horizon.Figure 6
Results obtained from comparing Cases A and B to an instance with|N|=35 and |N|=40, respectively.
(a)
|
N
|
=
35
(b)
|
N
|
=
40The results of the 40-item instance are shown in Figure6(b) and were analyzed similarly to Figure 6(a). The solution obtained by the model of Case A (BSAM-I + SPL-II) had a high cost of delay, which does not occur in the solution of BSAM-I + ATSP-II for Case B. Regarding the MIP-heuristics, even the worst solution of Case B is better than the best of Case A. Furthermore, using the best solution of Case A implies a cost increase of over 4% in comparison to the best solution obtained for Case B.


## 8. Conclusions and Perspectives

This study was motivated by the multistage production planning and scheduling in the brewery industry. The beer production process can be divided into two main stages: liquid preparation (Stage I) and bottling (Stage II). As illustrated in Figures2(a) and 2(b), there are two scenarios (A and B) that represent the practical production environments often found in companies. Case A considers both the setup operations when changing over items in filling lines and also swapping the tanks that supply liquid for fillers—this scenario was modeled mathematically in Baldo et al. [19] (called BSAM-I + BSAM-II). In the present research, it is remodeled using SPL strategies, resulting in alternative mathematical models: BSAM-I + SPL-II, SPL-I + BSAM-II, and SPL-I + SPL-II. Case B disregards the setup operations concerning tanks because of the process technology involved; therefore the previous models were adapted and modified to represent this case (BSAM-I + BSAM′-II, BSAM-I + SPL′-II, SPL-I + BSAM′-II, and SPL-I + SPL′-II). Moreover, a new modeling approach is introduced to capture Stage II of this case, which is based on the ATSP (Asymmetric Traveling Salesman Problem) (BSAM-I + ATSP-II and SPL-I + ATSP-II). Due to the difficulty of solving these models with exact methods, a MIP-heuristic strategy is developed. The MIP-heuristic sequentially solves Stages I and II submodels in separate phases in order to find a complete solution to the problem. However, to avoid nonfeasible solutions, some information has been supplied from one stage to another. This decomposition strategy was more efficient, yielding better results than the pure solution of mathematical models with standard commercial solvers, as well as other approaches previously reported in the literature. For Case A, the best performances were achieved by BSAM-I + BSAM-II and BSAM-I + SPL-II models and by H:SPL-I + SPL-II MIP-heuristic. With respect to Case B, BSAM-I + ATSP-II and BSAM-I + BSAM′-II models and H:BSAM-I + BSAM′-II and H:BSAM-I + ATSP-II MIP-heuristics obtained the best performances. The benefits of using more automated technology in the production process are also analyzed establishing the potential cost reduction.Regarding the perspectives for future research, the adaptation of an ATSP-based model to represent Case A is still a challenge. Moreover, the two-stage modeling is a suitable candidate to apply Dantzig-Wolfe decomposition [25], together with the generation of columns and a procedure to create feasible solutions. Another proposal for future research consists of adding to the mathematical formulations the possibility of using buffer tanks and analyzing the advantages and disadvantages of this approach.



---

*Source: 6754970-2017-08-10.xml*