You are on page 1of 20

PROJECT REPORT

ON PRODUCTION PLANNING AND


SCHEDULING IN FOOD PROCESSING
INDUSTRY: MODELLING NON-TRIANGULAR
SETUPS AND PRODUCT DECAY
G.D.H. Claassen1, J.C. Gerdessen, E.M.T. Hendrix, J.G.A.J. van der Vorst

Course: Inventory Management


Lecturer: Dr.Nguyễn Văn Hợp

Member (Group 03)


Name ID Contribution Contribution %
Vũ Duy Quang IEIEIU17096 Scope and Limitation 100

Nguyễn Lưu IEIEIU17018 Implement model in 100


CPLEX
Thanh Thảo
Nguyễn Ngọc IEIEIU17028 Problem statement, 100
formulation
Tố Quyên
Phạm Thị Thu IEIEIU17009 Project description 100
Uyên
Contents
I. About the case: ....................................................................................................................... 3
1. Project description ............................................................................................................... 3
A. Overview ....................................................................................................................... 3
B. Objective ....................................................................................................................... 3
C. Business driver and significant ..................................................................................... 3
2. Problem statement: ............................................................................................................. 4
A. Small bucket ................................................................................................................. 5
B. Big bucket ..................................................................................................................... 6
3. Scope and Limitation: .......................................................................................................... 7
A. Scope: ........................................................................................................................... 7
B. Limitation: ..................................................................................................................... 9
II. Model formulation and description........................................................................................ 9
1. Outline of the lot-sizing and scheduling problem: .............................................................. 9
2. Notation and model formulation ....................................................................................... 10
III. Implement the model in CPLEX ............................................................................................ 12
1. (CPLEX) Model formulation................................................................................................ 12
2. CPLEX code (Model Formualtion includes Product decay): ............................................... 14
IV. Data generation .................................................................................................................... 16
1. Data analysis ...................................................................................................................... 16
2. Result analysis .................................................................................................................... 17
V. Sensitivity analysis ................................................................................................................ 19
I. About the case:
1. Project description
A. Overview
A global competition on food market is occurring intensely between food
companies. So, it gives them an impetus for diversifying more merchandise that have
different kinds of ingredients, appearance, packaging, and so on. Moreover, dealing with
the quality requirements, safety regulations, and fluctuation of prices and demand are
the challenges of production managers. To survive in this harsh industry, they are
required to have a consideration to manufacture planning and scheduling. Therefore,
MILP models are created to be a friendly weapon for these missions.

B. Objective
According to Claassen and Gerdessen (2016) about Lot-sizing and scheduling in
food processing industry, they are considered as the most complicated characteristic that
the planners handle with them carefully. In practical situation, lot-sizing and scheduling
problems are conducted by separately in successive hierarchical phases (Claasen and
Beek (1993)). However, the planning process often has to be revised and probably
reschedule everyday, because of the separation between the generated schedule with
practical production demand. Furthermore, the lot-sizing and scheduling models have a
lot of difference. So, the application of MILP models helps the planners to minimize the
total cost of changeover and holding cost in lot-sizing and scheduling.
In this project, the MILP models are divided into two models which in respect of
particular issues. Firstly, it is the optimization of production cost with non-triangular
setups related to lot-sizing and scheduling problems. Then, the second model has the
same purpose of the first model however, it takes perishable characteristic into
consideration. In addition, the non-triangular setups and product decay are the significant
factors that affect directly to the result of this optimizing work as well as the
manufacturing plans. In Problem statement section, it will give the readers a detailed view
about them.

C. Business driver and significant


An accurate manufacture plan could save changeover time between production
cycles, minimize unproductive materials, and effectively operate manufacture practices.
Behind the secret of success of competent production plan is the huge participant of MILP
models whose role is optimizing cost related to production. By implementing acceptable
MILP models, the dairy and milk industries in Morocco can supply over 90% domestical
demand and take 30% of GDA of national agriculture.
Furthermore, since the planners take account of product decay as an impact in
MILP models, the selection of ingredients, materials, and food packaging is seriously
considered. Thus, the end users who have a lot of benefits due to this work.

2. Problem statement:
Lot-sizing and scheduling problems in Food Processing Industry (FPI) are heavily
influenced by decay and non-triangular factors. In a distinctive issue on lot-sizing and
scheduling the research of Clark et al. (2011) pointed out that the need for more
realistic and practical variants of models for simultaneous lotsizing and scheduling. So
the main purpose of this project is how to cover two characteristics in models for
simultaneous lot-sizing and scheduling , MILP model that handles these characteristics
First of all, sequence-depend setup time, in general, can be defined as the time required
to prepare the necessary resource (e.g., machines, people) to perform a task (e.g., job,
operation). the sequence-dependent type, setup time depends on both the task and its
preceding task. Secondly, Non-triangular is as important factor in this problem, it can be
desmontrated “triangular” setup times occur when it is never worse to setup from
product p to r directly than to setup via a third product q, so that triangular inequality
s(p,r) ≤ s(p,q) + s(q,r) always holds (as shown on the left side of Figure 2). However, in
the animal feed and other industries, the contamination of a product r by a previous
product p just beforehand can be often avoided by producing enough of an
intermediate product q so that it absorbs p’s contamination. For this to save time, the
triangular inequality must not hold in this case, ie, the sum of the setup times s(p,q)
from p and s(q,r) to r must be short enough so that s(p,q) + s(q,r) < s(p,r). With
Sequence-dependent setups and non-triangular setups. There is a complicating problem
with respect to sequence-dependent setup costs and times, commonly referred to as
the assumption of the triangular setup conditions (Almada-Lobo et al., 2008; Clark et al.,
2011; Clark et al., 2014; Gupta and Magnusson, 2005)). Menezes et al. (2011) confirm
that nontriangular setups may occur in FPI due to contamination between production
lots. Clark et al. (2014) mention that contamination is a particularly concern for FPI. The
writer refer for instance to the severe (i.e. lethal) impact of copper in concentrates for
sheep due to an ineffective sequencing of production lots.
By adding another product k between the process of two subsequent products i and j,
we can reduce changeover costs and times consumed by processing conditions of
different product variants (e.g. several heating and/or cooling levels) and other product
specific requirements (e.g. flavours, addition of specific additives, the danger of
contamination between subsequent production runs. The aftermath of applying
triangular setup conditions models is: there might be result in non-consistent solutions
from a scheduling orientation. It is common in FPI cases that after production, the
quality or value of perishable food products degrades in no time. Breaking down
production in lot-sizing requires smaller production quantities. As a result, the pressure
rises as individual production requires higher manufacturing frequency, which level up
the diffculty of sequencing. This paper investigates implementing the characteristics into
models for simultaneous lot-sizing and scheduling under tight capacity constraints. We
present a MILP model that includes the identified characteristics.
After adding non-triangular setups and product decay in small scale examples, the
process shows significant changes in the optimal production schedules. We compare
two presented model formulations with a known approach from literature. The
remainder of the paper is as follows.
In literature section, we embed the model in existing approaches from the literature.
Model formular Section presents two MILP models for the problem under
consideration. Numerical illustrations and benchmark Section provides small scale
numerical examples to demonstrate the impact of non-triangular setups and product
decay. Besides, we also conduct the complexity of the model. Section of analys provides
numerical results for medium-size instances, including a comparison with a
straightforward MP-based heuristic. Concluding remarks and suggestions for further
research are given in last section.

Production Lot Sizing and Scheduling with Non-Triangular Sequence-Dependent Setup


Times Alistair R. Clark

A. Small bucket

A common instance for SB approaches is the Discrete Lot-sizing and Scheduling Problem
(DLSP). The essential DLSP includes (sequence-independent) setup costs and setup
carry-over at zero setup time (Fleischmann, 1990). formation of setup carry-over implies
that setup states of a machine are carried over between period boundaries. Porkka et al.
(2003) compare models with and without setup carry-overs. They demonstrate that
substantial savings in costs and production time can be attained by fundamentally
different production plans enforced by carry-overs. Comparable results are found by Sox
and Gao (1999). Nonetheless, in the basic DLSP, setup states are not preserved over idle
time. Sequence-dependent setup costs and times are neither considered in the DLSP.
Many expansion of the (basic) DLSP have been described in literature. We refer to Drexl
and Kimms (1997) and Salomon et al. (1991) for a broader view on variants of the DLSP.
Fleischmann (1994) considers the multi-item single machine DLSP with
sequencedependent setup costs. An artificial product is introduced to deputized
idleness of the machine. Salomon et al. (1997) continue the latter study and reformulate
a DLSP that captures sequence-dependent setup times (DLSPSD). The triangular setup
conditions are claimed to hold. Nonetheless, machine idleness is represented by an
artificial product. Jordan and Drexl (1998) present a comparable model in which idleness
is stated by an artificial product too. It should be mentioned that if idleness is
represented by an artificial product, the changeover matrix must fulfil in strict
conditions to cope with sequence-dependent setup times. In other way, the setup state
of the machine is not accurately carried over across the barriers of idleness. A recent
approach is due to Guimarães et al. (2014). The authors reach a classification framework
to survey and classify the main modelling approaches for the integration of sequencing
decisions in discrete time lot-sizing and scheduling models.
Wolsey (1997) elongate the work of Constantino (1996) for issue with sequence
independent setups for the formulations of small bucket with sequence-dependent
setup times and costs. Idleness is not represented by an artificial product. Nonetheless,
the conditions of triangular setup are hold as assumption. We will refer to Wolsey’s
model as the general small bucket model (GSB)

B. Big bucket

Opposed to small bucket models, the planning horizon of a big bucket (BB) model is
usually separated into longer periods of equal length. Time intervals in a BB model may
represent a time slot of one or more than week in practice (Drexl and Kimms, 1997.
There can be multiple products generated in each cycle. Releasing the "all-or-nothing"
development concept of (most) SB models means that the option of deciding
continuous lot sizes is included in a BB model.
The Capacitated Lot-Sizing Problem (CLSP) is a typical example of a big bucket model. It
is closely related to the (small bucket) DLSP. Decision variables, parameters and
objective function are comparable in both problems (Drexl and Kimms, 1997).
Nonetheless, the CLSP does not consist of sequence-dependent setup costs and times.
As a result, there is no included configuration carry-over between time limits either.
Suerie and Stadtler (2003) used the simple problem of plant position to obtain a tight
new model formulation with sequence-independent setup costs and times for setup
carryover in the CLSP.
Sox and Gao (1999) introduce the Generalized Capacitated Lot-sizing Problem (GCLP).
The GCLP applies less binary variables for including setup carry-over in the CLSP with
sequence-independent setup costs and no setup times. Sequence-independent setup
times may be included. Perhaps at the cost of extra work to compute. As suggested by
Eppen and Martin (1987), the authors also apply the network reformulation method and
compare the behaviour of a series of models. The findings show that the introduction of
setup carry-over has a huge impact on both cost and lot sizes.
Notation a propensity to integrate features of small bucket models into big bucket
models in simultaneous lot-sizing and scheduling. We refer to suggested variants of the
CLSP for clarification (Almada-Lobo et al., 2007; Almada-Lobo et al., 2008;
Gopalakrishnan, 2000; Gopalakrishnan et al., 1995; Guimarães et al., 2013; 2013; Gupta
and Magnusson, 2005; Haase and Kimms, 2000; Menezes et al., 2011), variants of hybrid
BB and SB models like the General Lot-sizing and Scheduling Problem (GLSP) (Ferreira et
al., 2012; Ferreira et al., 2009; Fleischmann and Meyr, 1997. Guimarães et al., 2013,
2014; Meyr, 2000; Transchel et al., 2011), and variants of block planning approaches,
originally introduced by Gunther et al. (2006). The literature review on extensions of
capacitated lot-sizing by Quadt and Kuhn (2008) and Guimarães et al. (2014) confirm the
trend in which (hybrid) BB approaches are preferred to SB models. For a complete
overview we also refer to (Claassen and Hendrix, 2014).
It is still a challenge to integrate sequence-dependent setup costs and times for
simultaneous lot-sizing and scheduling.

3. Scope and Limitation:


A. Scope:
a. Lot-sizing and scheduling in Food Processing Industry (FPI):
First of all, planners have to deal with decline in quality of products, related quality
requirements and safety regulations of products, market driven standards regarding
shelf life, and variability of demand and prices. Secondly, the diversity of products in
FPI increased considerably in the past decades and global competition on the food
market has forced manufacturers to participate in an on-going trend towards
increased variety (e.g. ingredients and flavours, customised packaging, prints and/or
labels) of (new) products. Soman et al. (2004a) state that the majority of research
contributions do not address specific characteristics of food processing, e.g. high
capacity utilisation, sequence-dependent setups and limited shelf life due to product
decay. The generated schedules on the shop floor often fail to realise production
targets, because changeover losses are not correctly accounted for on a higher
planning level. As a consequence, the planning process has to be redone (with or
without over-time) and/or frequent rescheduling takes place in daily practice. In a
special issue on lot-sizing and scheduling, Clark et al. (2011) confirm the need for
more realistic and practical variants of models for simultaneous lotsizing and
scheduling. Features such as (i) non-triangular setups, (ii) perishability, and (iii)
delivery time windows are labelled by the authors as hot topics and open research
opportunities. However, in this paper, we only investigate the first two
characteristics: (i) non-triangular setups and (ii) perishability.

1. Non-triangular setup:
Non-triangular setups may occur in FPI due to contamination between
production lots. Clark et al. (2014) mention that contamination is a particularly
concern for FPI. The authors refer for instance to the severe (i.e. lethal) impact of
copper in concentrates for sheep due to an ineffective sequencing of production
lots. Due to processing conditions of different product variants (e.g. several
heating and/or cooling levels) and other product specific requirements (e.g.
flavours, addition of specific additives, the danger of contamination between
subsequent production runs), changeover costs and times between two
subsequent products i and j may become substantially less by processing
another product k between i and j. As a consequence, applying models that
assume triangular setup conditions may generate non-consistent solutions from
a scheduling point of view.

2. Perishability (product decay):


In many FPI cases, the quality or value of perishable food products deteriorates
rapidly after production. Considering product decay in lot-sizing enforces smaller
production quantities. Consequently, individual products are produced at higher
frequency. This increases the difficulty of sequencing.

b. Small bucket approaches:


The author has observed a tendency in simultaneous lot-sizing and scheduling to
incorporate characteristics of small bucket models into big bucket models. For
confirmation we refer to proposed variants of the CLSP (Almada-Lobo et al., 2007;
Almada-Lobo et al., 2008; Gopalakrishnan, 2000; Gopalakrishnan et al., 1995;
Guimarães et al., 2013; Gupta and
Magnusson, 2005; Haase and Kimms, 2000; Menezes et al., 2011), variants of hybrid
BB and
SB models like the General Lot-sizing and Scheduling Problem (GLSP) (Ferreira et al.,
2012;
Ferreira et al., 2009; Fleischmann and Meyr, 1997; Guimarães et al., 2013, 2014;
Meyr, 2000;
Transchel et al., 2011), and variants of block planning approaches, originally
introduced by
Gunther et al. (2006). The literature review on extensions of capacitated lot-sizing by
Quadt and Kuhn (2008) and Guimarães et al. (2014) confirm the trend in which
(hybrid) BB approaches are preferred to SB models.

B. Limitation:
- the computational effort for the SB model is substantial. We performed
exploratory research with a straightforward implementation of a Relax-and-Fix
construction heuristic. Numerical tests show that the quality of R&F solutions is
promising at manageable computational effort.
- For further research, the improvement computationa performance by adding
valid inequalities (VI’s) a priori to the initial formulation. Preliminary research
revealed that adding the inequalities Y W Y W V j t j t j t j t j t j t , , , , 1 , 1 , 1
tightened the linear relaxation and provided substantially better
heuristic solutions in an R&F framework. The inequalities are based on feasibility
conditions within any production scheme and are added before calling the MP-
solver.
II. Model formulation and description:

In this section, two SB models are demonstrated as the impact of (i) relaxing the
triangular setup conditions and (ii) taking product decay into account. Section Outline of
the lot-sizing and scheduling problem is used as an illustration for the problem and then
modeled in Section Notation and model formulationas a lot-sizing and scheduling
problem with non-triangular setups. In Section Modelling product decay, we expand the
model used to focus on the product decay of inventory by adding an age-dependent
factor in the inventory-holdings costs.

1. Outline of the lot-sizing and scheduling problem:


After conducting the study of the whole problem, we have the result as follows:
- Consider N products to be scheduled over a restricted planning horizon of T periods.
Take a small problem, i.e., in each period, no more than one item can be produced at
full capacity, or there is no production at all.
- A mass amount of item i is a continuous series of periods that holds the producing
process of item i.
- The process of manufacturing items requires a piece of equipment or resource with
limited capacity. Without generality loss, machine capacity is standardized to 1 unit per
period.
- Demand is presumed to be changeable, deterministic, and indicated in the estimated
amount of stages required in the process of production.
- Demand must be fulfilled (without backlogging) either by production in the same
period or stock. In the latter case, an inventory carrying cost might incur.
- It is assumed that the Wagner-Whitin cost condition holds, i.e., given the setups, it
always pays to produce as late as possible. This condition is also indicated as the
absence of speculative motives for early production.
- Unit production costs are assumed to be consistent over periods and then neglected as
a consequence.
- A changeover between items incurs a loss of production capacity (non-zero setup
times) and associated setup and changeover costs. Both are sequence-dependent.
- Setup costs are assumed to be proportional to changeover times.
- The triangular setup conditions refer to the changeover matrix A (for setup times), the
changeover matrix S (for setup costs), or both:
𝑎𝑖𝑗 ≤ 𝑎𝑖𝑘 +𝑎𝑘𝑗 and/or 𝑠𝑖𝑗 ≤ 𝑠𝑖𝑘 +𝑠𝑘𝑗 for all item i,j,k
If changeover and idleness happen in corresponding gaps between stages, we follow
standard practice and conclude that periods of idleness are preceded by changeover
time.
- Contrary to the DLSP, the setup state of the machine should be preserved over idle
time. This assumed perspective is commonly used in many lot-sizing and scheduling
models (Drexl and Kimms, 1997). Generally speaking, it is also valid in FPI.
- Starting inventory levels for product i are presumed to be zero,
- The target is to determine the process of production and lot-sizes that minimize the
total setup and inventory carrying costs over the entire planning horizon.

2. Notation and model formulation


The following notation is used to formulate the problem:
Parameters :
N number of items or products i.e. i, j =1...N
T number of time intervals (i.e. periods) in the planning horizon; t =1...T
ℎ𝑖 unit storage costs of item i at the end of a period
𝑆𝑖 fixed setup costs for product i
𝑑𝑖,𝑗 demand for item i in period t (expressed in units of required capacity)
𝑎𝑖𝑗 changeover time between products i and j in units of lost capacity

Variables
𝐼𝑖,𝑡 inventory level of item i at the end of period t
1 if product is produced in period t
𝑌𝑖,𝑡 ={
0 otherwise

1 if themachine is changing over to product in period , j t


𝑉𝑗,𝑡 ={
0 otherwise

1 if themachine isidle in period and the next item to produceis product , t j


𝑊𝑗,𝑡 ={
0 otherwise

Now, the problem can be formulated as follows:

𝑀𝑖𝑛 {∑ 𝑆𝑗 ∑ 𝑉𝑗,𝑡 + ∑ ∑ ℎ𝑖 𝐼𝑖,𝑡 }


𝑗 𝑡 𝑖 𝑡
s.t

𝐼𝑖,𝑡−1 + 𝑌𝑖,𝑡 − 𝑑𝑖,𝑡 = 𝐼𝑖,𝑡 For all 𝑖, 𝑡 (3)

∑ 𝑌𝑖,𝑡 + ∑ 𝑉𝑗,𝑡 + ∑ 𝑊𝑗,𝑡 = 1 For all 𝑡 (4)


𝑖 𝑗 𝑗
𝑡+𝜏−1
For all (𝑖, 𝑗) ∈ 𝐴 ≔ {(𝑖, 𝑗)|𝑎𝑖,𝑗 > 0} (5)
𝑌𝑖,𝑡 − ∑ ∑ 𝑌𝑘,𝑠 + 𝑌𝑗,𝑡+𝜏 ≤ 1 𝑡 = 1, . . 𝑇 − 𝜏, 𝜏 = 1, . . 𝑎𝑖,𝑗
𝑘;𝑘≠1≠𝑗 𝑠=𝑡+1

𝑉𝑗,(𝑡−𝑎𝑖,𝑗+𝜏) ≥ 𝑌𝑖,(𝑡−𝑎𝑖,𝑗−1) + 𝑌𝑗,𝑡 + 𝑊𝑗,𝑡 For all (𝑖, 𝑗) ∈ 𝐴 ≔ {(𝑖, 𝑗)|𝑎𝑖,𝑗 > 0} (6)
𝑡−1 𝑡 = (𝑎𝑖,𝑗 + 2), . . 𝑇, 𝜏 = 0, . . (𝑎𝑖,𝑗 − 1)
− ∑ ∑ 𝑌𝑘,𝑙 − 1
𝑘;𝑘≠1≠𝑗 𝑙=𝑡−𝑎𝑖,𝑗

∑ 𝑊𝑗,𝑡 + ∑ 𝑉𝑗,𝑡+1 ≤ 1 For all 𝑡 = 1, . . 𝑇 − 1 (7)


𝑗 𝑗

𝑊𝑖,𝑡 + ∑ 𝑊𝑗,𝑡+1 + ∑ 𝑌𝑗,𝑡+1 ≤ 1 For all 𝑡 = 1, . . 𝑇 − 1, 𝑖 (8)


𝑗≠1 𝑗≠1
𝑌𝑖,𝑡 , 𝑉𝑗,𝑡 ∈ {0,1} For all 𝑖, 𝑗, 𝑡 (9)

𝐼𝑖,𝑡 , 𝑊𝑗,𝑡 ≥ 0 For all 𝑖, 𝑗, 𝑡 (10)

• The objective function (2) minimizes the total amount of changeover and inventory-
holding costs.
• Constraint (3) represents the inventory equilibrium equations and makes sure that
demand di,t for item i in period t is satisfied without backlogging.
• Along with equations (4), equations (9) and (10) assure that in each time gap, the
machine is either producing item i at maximum capacity.
• Constraint (5) guarantees that the sufficient time between two subsequent
production bundles, i and j, is restrained for the changeover.
• For constructive adjustment over time, inequality (6) accomplishes the setup
variables to be non-zero between two following batches i and j. The term in (6)
represents the manufacture of an item other than i and j within the time interval.
• Constraints (7) assure that a setup cannot take place after idleness. As a result, a
possibility for an idle period will take effect after a system becomes valuable.
• Inequalities (8) help avoid the situation when idleness in period t before
manufacturing item i is followed by the production (or preliminary idleness) of
another item j.
• Finally, restrictions (9) and (10) define the integrality and non-negativity
requirements.

When a conventional objective function like (2) is applied for decomposable items, commonly
used linear holding costs in lot-sizing models may interrupt a critical equilibrium between
changeover costs on the one hand and inventory-holding costs on the other hand. Product
decay affects the remaining shelf life of products. An age-dependent component in the
inventory-holding costs contains this aspect.
Product decay of inventory can integrate into an SB type model like (2)-(10) in the following
way. Let additional parameters represent the perishability rate of item i. Next, we reconsider
the inventory variables as the inventory level of item i at the end of period t, produced in period
q. Now, the objective function (2) is replenished by (2b) in which (t-q) represents product age.

III. Implement the model in CPLEX


1. (CPLEX) Model formulation
int nbitems=...; //number of items - N
int nbperiods=...; //number of periods - T
range items=1..nbitems; //index of item - i or j or k
range periods=1..nbperiods; //index of period - t
range periods0=0..nbperiods; //because of I[i][t-1]

float h[items]=...; //unit storage cost of item i


float d[items][periods0]=...; //demand for item i in period t
float S[items]=...; //fixed setup cost of item i
int a[items][items]=...; //changover time between item i and item j in unit of lost
capacity

dvar float I[items][periods0]; //inventory level of item i at the end of period t


dvar boolean Y[items][periods]; // =1 if item i is produced in period t
dvar boolean V[items][periods]; // =1 if the machine is changing over to product j in
period t
dvar boolean W[items][periods]; // =1 if the machine is idle and the next period
produce item j

Objective function minimises the sum of changeover and inventory-holding costs:


dexpr float cost = sum(j in items)(S[j]) * sum(t in periods)(V[j][t]) + sum(i in
items, t in periods)(h[i]*I[i][t]);

minimize cost;

subject to {

Constraint (3) represents the inventory balance equations and assures demand d[i][t] for item i in
period t is fulfilled without backlogging:
forall (i in items, t in periods)
I[i][t-1] + Y[i][t] - d[i][t] == I[i][t]; //constraint 3

Equations (4), together with (9) and (10), guarantee that in each time interval the machine is
either producing item i at full capacity, changing over, or idle before manufacturing the next
batch of an item:
forall (t in periods)
sum(i in items)Y[i][t] + sum(j in items)V[j][t] + sum (j in
items)W[j][t] == 1; //constraint 4

Constraint (5) assures that between two subsequent production batches i and j, sufficient
time (ai,j) is reserved for changeover:
forall (i in items,j in items: a[i][j]>0)
forall (z in 1..a[i][j])
forall (t in 1..nbperiods-z)
Y[i][t] - sum(k in items, s in (t+1)..(t+z-1): k!=i &&
k!=j)Y[k][s] + Y[j][t+z] <=1 ; //constraint 5

For positive change over time (ai,j>0), inequality (6) enforces the setup variables to be non-zero
between two subsequent batches i and j; if item j is produced in period t or the machine is idle in
period t before manufacturing item j in period t’ (t’>t), setup variables V[j][t-a[i][j]+z]
should get a value of one for z = 0..a[i][j]-1. The term sum(k in items, l in t-a[i][j]..t-1:
k!=i && k!=j)Y[k][l] in (6) represents the production of another item than i and j within time
interval [t-a[i][j], t-1]:
forall (i in items,j in items: a[i][j]>0)
forall (t in a[i][j]+2..nbperiods)
forall (z in 0..a[i][j]-1)
V[j][t-a[i][j]+z] >= Y[i][t-a[i][j]-1] + Y[j][t] + W[j][t]
- sum(k in items, l in t-a[i][j]..t-1: k!=i && k!=j)Y[k][l] - 1; //constraint 6

Constraints (7) assure that a setup cannot take place after idleness. Hence, a possible idle period
will take place after a setup is counted for:
forall (t in 1..nbperiods-1)
sum(j in items)W[j][t] + sum(j in items)V[j][t+1] <= 1; //constraint 7

Inequalities (8) prevent that idleness in period t before manufacturing item i is followed by the
production (or preliminary idleness) of another item j:
forall (i in items, t in 1..nbperiods-1)
W[i][t] + sum(j in items: j!=i)Y[j][t+1] + sum(j in items:
j!=i)W[j][t+1] <= 1; //constraint 8

Finally, restrictions (9) and (10) define the integrality and non-negativity requirements:
forall (i in items, j in items, t in periods){
Y[i][t] >= 0 && Y[i][t] <=1;
V[i][t] >= 0 && V[i][t] <=1;
W[i][t] >= 0;
I[i][t] >= 0;
} //constraint 9+10
}

2. CPLEX code (Model Formualtion includes Product decay):


Let additional parameter pr[i] ≥ 1 represent the perishability rate of item i. Next, we redefine the
inventory variables I[i][t] by I[i][t][q] ≥ 0 (for all i, t, q in which q ≤ t) as the inventory level of
item i at the end of period t, produced in period q.
int nbitems=...; //number of items - N
int nbperiods=...; //number of periods - T

range items=1 ..nbitems; //index of item - i or j or k


range periods=1 .. nbperiods; //index of period - t
range periods0=0..nbperiods; //because of I[i][t-1]

float h[items]=...; //unit storage cost of item i


float d[items][periods0]=...; //demand for item i in period t
float S[items]=...; //fixed setup cost of item i
float pr=...;
int a[items][items]=...; //changeover time between item i and item j in unit of lost
capacity

dvar float+ I[items][periods0][periods0]; //inventory level of item i at the end of


period t, produced in period q
dvar boolean Y[items][periods]; // =1 if item i is produced in period t
dvar boolean V[items][periods]; // =1 if the machine is changing over to product j in
period t
dvar boolean W[items][periods]; // =1 if the machine is idle and the next period
produce item j

Now, objective function (2) is replaced by (2b) in which (t-q) represents product age:
dexpr float cost = sum(j in items, t in periods) S[j] * V[j][t] + sum(i in items, t
in periods, q in periods: q <= t)(h[i] * pr^(t-q) * I[i][t][q]);

minimize cost;

subject to {

Replacing (3) by (3a)-(3e) describes the age dynamics of the inventory levels:
forall (i in items)
I[i][1][1] == Y[i][1] - d[i][1]; //constraint 3a

forall (i in items, t in periods: t >= 2)


I[i][t][1] >= I[i][t-1][1] - d[i][t]; //constraint 3b

forall (i in items)
I[i][2][2] == sum(z in 1..2)(Y[i][z]-d[i][z]) - I[i][2][1]; //constraint
3c

forall (i in items, t in periods, q in periods: t >= 3 && q >= 2 && q <= t -


1)
I[i][t][q] >= sum(z in 1..q)I[i][t-1][z] - sum(z in 1..q-1)d[i][z] -
sum(z in 1..q-1)I[i][t][z]; //constraint 3d

forall (i in items, t in 3..nbperiods, q in periods: q == t)


I[i][t][q] == sum(z in 1..t)(Y[i][z] - d[i][z]) - sum(z in 1..t-
1)I[i][t][z]; //constraint 3e

forall (t in periods)
sum(i in items)Y[i][t] + sum(j in items)V[j][t] + sum (j in
items)W[j][t] == 1;

forall (i in items,j in items: a[i][j]>0)


forall (z in 1..a[i][j])
forall (t in 1..nbperiods-z)
Y[i][t] - sum(k in items: k!=i && k!=j)sum(s in
(t+1)..(t+z-1))Y[k][s] + Y[j][t+z] <=1 ;

forall (i in items,j in items: a[i][j]>0)


forall (t in a[i][j]+2..nbperiods)
forall (z in 0..a[i][j]-1)
V[j][t-a[i][j]+z] >= Y[i][t-a[i][j]-1] + Y[j][t] + W[j][t]
- sum(k in items: k!=i && k!=j)sum(l in t-a[i][j]..t-1)Y[k][l] - 1;

forall (t in 1..nbperiods-1)
sum(j in items)W[j][t] + sum(j in items)V[j][t+1] <= 1;

forall (i in items, t in 1..nbperiods-1)


W[i][t] + sum(j in items: j!=i)Y[j][t+1] + sum(j in items:
j!=i)W[j][t+1] <= 1;

/*forall (i in items, j in items, t in periods, q in periods: q <= t){


Y[i][t] >= 0 && Y[i][t] <=1;
V[i][t] >= 0 && V[i][t] <=1;
W[i][t] >= 0;
I[i][t][q] >= 0;
} */
}

As you can see, at the end of the code we have to exclude the two constraints 9 and 10 out of
the code. Because there is a mistake in this paper, the “On production planning and scheduling
in food processing industry: Modelling non-triangular setups and product decay” published in
21 June 2016, which leads to the negative inventory in the result. The mistake is shown in the
picture below:

In order to make the code running, we decided to exclue those two constraints. Therefore, the
results of model with product decay will have negative inventory at some period.

IV. Data generation


Numerical Illustration
1. Data analysis
Our group consider Yakult company with 3 types of products (n=3), with 12 periods (T=12).
The holding cost h[i], setup cost S[i][j] (with respect to setup cost), changeover cost a[i][j]
matrix (with respect to setup time), product decay rate pr[i] are shown in the tables below:

i \ t 0 1 2 3 4 5 6 7 8 9 10 11 12
1 0 0 0 0 0 1 0 0 0 0 0 2 0
2 0 0 0 0 0 0 1 0 0 0 0 0 1
3 0 0 0 0 0 0 0 0 1 0 0 0 1
Table 1: Daily demand
Holding cost h[i] Setup cost S[i] Product decay rate pr[i]
1 11 100 1.2
2 30 100 1.2
3 35 100 1.2
Table 2
The triangular setup conditions refer to the changeover matrix A (with respect to setup times),
the changeover matrix S (with respect to setup costs), or both:
aij  aik + akj and/or sij  sik + skj for all items i, j, k

i \
j 1 2 3
1 0 2 1
2 1 0 1
3 1 1 0

Table 3: Changeover time matrix A (triangular setup)

i \
j 1 2 3
1 0 2 1
2 3 0 3
3 1 1 0

Table 4: Changeover time matrix A (non-triangular setup)

2. Result analysis
This section provides small scale numerical examples to demonstrate the impact of non-
triangular setups and product decay:
❖ Triangular setup and no product decay (using table 3 and pr=1):
❖ Non-triangular setup and no product decay (using table 4 and pr=1):

❖ Triangular setup and product decay (using table 3 and pr=1.2):

❖ Non-triangular setup and product decay (using table 4 and pr=1.2):


As we can see through the results of 4 cases above, whenever there is a product decay rate, the
total cost will increase. And also if the setup conditions is non-triangular, the cost is higher than
the case with the triangular setup because of the definition of triangular and non-triangular
setup conditions.

V. Sensitivity analysis
This paper studied of the impact of two features (i) non-triangular setup condition and (ii)
perishability. Therefore, in the sensitivity analysis we will use the changeover time matrix in
Table 4, the product decay rate of pr=1.2 and change the holding cost to see the differences:
❖ Holding cost h[i]=[11 30 35]:

❖ Adding to the holding cost 5 unit and we have h[i]=[16 35 40]:

❖ Decrease the holding cost of item 3 because the Inventory level of item 1 is more than the two
other items (2&3) and we have h[i]=[5 30 40]:
Conclusion: Compare the total cost of 3 cases that we use to analyze the sensitivity, we can see
the total cost is reduced be reduce the holding cost of the item that have the most inventory
level.

You might also like