heuristic solution approach for the capacitated lot …...researches focus on improving the mip...
TRANSCRIPT
http://lib.ulg.ac.be http://matheo.ulg.ac.be
Heuristic solution approach for the capacitated lot-sizing and scheduling
problem with sequence-dependent setup times and retunrs
Auteur : Hoang Ngoc Tuan,
Promoteur(s) : Arda, Yasemin
Faculté : HEC-Ecole de gestion de l'ULg
Diplôme : Master en ingénieur de gestion, à finalité spécialisée en Supply Chain Management and
Business Analytics
Année académique : 2015-2016
URI/URL : http://hdl.handle.net/2268.2/1888
Avertissement à l'attention des usagers :
Tous les documents placés en accès ouvert sur le site le site MatheO sont protégés par le droit d'auteur. Conformément
aux principes énoncés par la "Budapest Open Access Initiative"(BOAI, 2002), l'utilisateur du site peut lire, télécharger,
copier, transmettre, imprimer, chercher ou faire un lien vers le texte intégral de ces documents, les disséquer pour les
indexer, s'en servir de données pour un logiciel, ou s'en servir à toute autre fin légale (ou prévue par la réglementation
relative au droit d'auteur). Toute utilisation du document à des fins commerciales est strictement interdite.
Par ailleurs, l'utilisateur s'engage à respecter les droits moraux de l'auteur, principalement le droit à l'intégrité de l'oeuvre
et le droit de paternité et ce dans toute utilisation que l'utilisateur entreprend. Ainsi, à titre d'exemple, lorsqu'il reproduira
un document par extrait ou dans son intégralité, l'utilisateur citera de manière complète les sources telles que
mentionnées ci-dessus. Toute utilisation non explicitement autorisée ci-avant (telle que par exemple, la modification du
document ou son résumé) nécessite l'autorisation préalable et expresse des auteurs ou de leurs ayants droit.
HEURISTIC SOLUTION APPROACH FOR THE
CAPACITATED LOT-SIZING AND SCHEDULING
PROBLEM WITH SEQUENCE-DEPENDENT SETUP
TIMES AND RETURNS
Jury:
Dissertation by
Promoter:
Ngoc Tuan HOANG
Yasemin ARDA
For a Master Degree
Readers:
in Business Engineering
Yves CRAMA
Supply Chain Management & Business
Analytics
Mahmood REZAEI
SADRABADI
Academic year 2015/2016
ACKNOWLEDGMENT
I would like to convey my heartfelt gratitude and sincere appreciation to all people who
have helped and inspired me during my process. This thesis would not have been possible
without those supports from many people.
First of all, I would like to thank to my promoter, Prof. Yasemin Arda, for her endless
guidance during my research. I would like to express my gratitude to other professors and
researchers in the Supply Chain Management specialization. This thesis would not have
been possible without their extraordinary support.
My warmest thanks also go to Ms. Marianna Sneaker, Mr. Gunther Vranken and all
staffs in HEC International Cooperation Department for supporting me in two years of my
master program.
Last but not least, I would like to send my great to my family and friends who have
been standing by my side, supporting me in the study process.
1
TABLE OF CONTENTS
ABTRACT ...................................................................................................................................... 3
CHAPTER 1: INTRODUCTION AND LITERATURE REVIEW .......................................... 5
1.1. The Capacitated Lot-sizing and Scheduling Problem ........................................................... 5
1.2. The Capacitated Lot-sizing and Scheduling Problem with Sequence-Dependent Setup
Costs and Time ............................................................................................................................. 7
1.3. Remanufacturing .................................................................................................................... 8
1.4. Articles directly relating to the thesis .................................................................................... 9
CHAPTER 2: PROBLEM DEFINITION AND MATHEMATICAL MODEL .................... 11
2.1. Mathematical model 1: Lot-Sizing and Scheduling Problem with Sequence-Dependent
Setup Times ................................................................................................................................ 11
2.2. Mathematical model 2: Lot-Sizing and Scheduling Problem with Sequence-Dependent
Setup Times and Returns ............................................................................................................ 15
2.3. Test the correctness of mathematical model 2 ..................................................................... 18
2.4. Development of lower bound .............................................................................................. 21
CHAPTER 3: DEVELOPMENT OF HEURISTICS ................................................................ 23
3.1. Heuristic 1: Fix and Relax ................................................................................................... 23
3.1. Heuristic 2 ............................................................................................................................ 25
CHAPTER 4: NUMERICAL EXPERIMENTS ........................................................................ 31
1.1. Development of instances ................................................................................................ 31
1.2. Computational results ...................................................................................................... 34
Optimally solving the problem .............................................................................................................34
The lower bound ...................................................................................................................................35
Fix and relax heuristic ..........................................................................................................................35
Heuristic 2 ............................................................................................................................................36
2
The effects of demand patterns .............................................................................................................36
The effect of capacity ...........................................................................................................................37
Comparison between the two heuristics ...............................................................................................37
CHAPTER 5: CONCLUDING REMARKS .............................................................................. 39
REFERENCES ............................................................................................................................. 41
APPENDIX ................................................................................................................................... 43
Computational results ................................................................................................................. 43
Instruction to run the code .......................................................................................................... 53
3
ABTRACT
Lot-sizing and Scheduling Problem has always been extremely important with operating
planner. This research seeks to deal with the Capacitated Lot-sizing and Scheduling Problem with
Sequence-Dependent Setup Times and Returns by heuristic approach. The problem formulization
is inspired by the real working environment of a bottling plant which produces different types of
drink. In the research, two heuristics will be presented, tested and compared to each other. The
first heuristic follows the fix and relax heuristic – one of the efficient heuristics to deal with MIP
problem. The later heuristic tried to break the original problem into two sub-problems in an
attempt to reduce the number of integer variables. In the second heuristic, the problem is
reformulated to a basic Capacitated Lot-sizing and Scheduling Problem and a Travelling
Salesman Problem. Both heuristics will be coded and tested with different types of instances.
Overall, both of them show promising results which could be the motivation to keep following
these heuristic directions in the future.
Key words: Fix and Relax heuristic, Lot-sizing and Scheduling, Travelling Salesman,
Sequence-Dependent Setup.
4
5
CHAPTER 1: INTRODUCTION AND LITERATURE REVIEW
1.1. The Capacitated Lot-sizing and Scheduling Problem
―Smooth and cost-efficient running of a factory often depends on its manager’s ability to
select appropriate lot-sizes and production schedules‖ (Gupta & Magnusson, 2005). For this
reason, the Lot-sizing and Scheduling Problem has been intensively studied in a large number of
articles. Since the seminal paper of Wagner and Whitin (1958), a considerable amount of
investigation has been done in order develop and deal with various important features of this
problem.
The lot-sizing problem is to find production orders or lots in order to satisfy customer demand
while minimizing production costs, inventory holding costs and setup costs at the same time.
Most of researches consider a finite planning horizon which is divided into discrete time periods.
―Lot-sizing problem is classified into either big bucket or small bucket‖ (Eppen & Martin, 1987).
In small bucket (also called ―small time window‖ in some researches), the planning horizon is
broken into small time periods. At most one type of products can be produced each time period.
Thus, when a setup is performed in the beginning of a period, the system has to remain at this
setup status during the whole period. The small bucket is sometimes called ―The Discrete Lot-
sizing and Scheduling Problem‖, and has been studied extensively in literature. On the other
hand, the Capacitated Lot-sizing and Scheduling Problem (CLSP) is known as the big bucket
(sometimes called ―large time window‖). This problem considers larger time periods which allow
multi products manufacturing. In other words, more than one product can be produced in the
same period in the big bucket problem. Detail review of big bucket and small bucket can be
found in the article Lot-sizing and scheduling – Survey and extensions (Drexl & Kimms, 1997).
In this research, we will focus on the Capacitated Lot-sizing and Scheduling Problem.
Generally, the most basic model of the CLSP can be formulated as the following Mixed Integer
Programming (MIP) model.
We have a single machine which has to produce N products in order to satisfy deterministic
demand in T time periods. Let the products indexed by i = 1,2,…,N and time periods by t =
1,2,…,T. The following notations are used for the parameters:
6
Deterministic demand (in unit) for product i in period t
Available capacity (in time unit) in period t
Capacity needed to produce one unit of product i in period t
Unit inventory holding cost of product i in period t
Setup cost for product i in period t
Decision variables:
Production quantity for product i in period t
Inventory level of product i at the end of period t
{
Objective function:
∑∑
Subject to:
∑
{ }
7
The objective function minimizes the sum of inventory holding costs and setup costs.
Constraint 1 ensures the inventory balance. Constraint 2 makes sure that product i is produced if
and only if the machine is setup for that. Constraint 3 is the capacity constraint, makes sure that
we do not use more than the available capacity. Constraint 4 & 5 express the types of variables.
Exact methods to solve the CLSP have been intensively studied. A great number of
researches have been carried out in order to deal with specific problem such as Belvaux and
Wolsey (2001),Belvaux and Wolsey (2000) or Barany, Van Roy, and Wolsey (1984). These
researches focus on improving the MIP formulation in order to solve the problem with
commercial solvers like CPLEX or XPRESS-MP. Generally, using these solvers, the problem is
often solved by the standard Branch and Bound procedure.
1.2. The Capacitated Lot-sizing and Scheduling Problem with Sequence-Dependent
Setup Costs and Times
One weakness of CLSP is that it does not sequence products within a period. Instead, setup
occurs whenever a product is produced. Thus, even if the last product of a period is the first
product of the successive period, setup occurs when there is indeed no change in the machine
configuration. The lack of sequence creates a gap between calculated schedule and real working
environment, which sometimes makes the results of the CLSP become infeasible in real world.
For manufacturing environments in which reconfiguring the system takes a considerable amount
of time and money, the need to determine the sequence within a period is even more important.
Therefore, it’s necessary to include the Sequence-Dependent Setup (SDS) into consideration.
In the CLSP with SDS, setup does not occur whenever a product is produced. Indeed, a
changeover occurs when the system switches from a product to another. The costs of a
changeover depend on the pair of products. With SDS, the problem is able to result a sequence of
products for each period. However, SDS also makes the problem become more complex and
difficult to solve.
―Despite CLPS being intensively studied, modeling setup carryover in CLSP has not received
much attention due to model complexity and computational difficulty‖ (Sox & Gao, 1999).
Different researches have tried to reformulate the structure of setup in order to reduce the
complexity of the problem. Gopalakrishnan, Miller, and Schmidt (1995) developed a modeling
8
framework for the CLSP with sequence and product independent setup times and setup carryover.
The authors went to the conclusion that the model complexity can be reduced by looking for
alternative method to model setup changeover. Gopalakrishnan (2000) presented a modified
framework for modeling setup carryover in CLSP which incorporates sequence independent and
product dependent setup times and costs. Sox and Gao (1999) presented mixed integer linear
programming model to CLSP with sequence independent setup costs and no setup times. With a
different approach, Kang, Malik, and Thomas (1999) broke the entire schedule into smaller
segments called split-sequences. With the number of split-sequences being a parameter,
multiple runs with different need to be performed in order to find the optimal value.
1.3. Remanufacturing
―Remanufacturing is the practice of value added recovery in which used products are
collected, processed, and resold” (Rogers and Tibben-Lembke 1999, Guide 2000, Parkinson and
Thompson 2003). In remanufacturing process, used products are returned to manufacturers,
before directly entering the production process as a type of material. The main purpose of
remanufacturing is to save resources as well as reduce the cost. Besides, for some types of
products, remanufacturing also contributes to reducing environmental impacts.
Inventory system with remanufacturing
The graph above shows how remanufacturing system works. Used products, after being
collected from customer, will be stocked in inventory. These return products will enter directly
the production system as a type of material to produce new product. Generally, the system is not
required to reconfigure for remanufacturing. Majority of the researches relating to return products
9
assume that returns are deterministic in advance. Some of studies, however, deal with uncertain
returns in an attempt to simulate the real working environment.
A great number of researches have been carried out for the lot-sizing and scheduling problem
with returns. Teunter, Bayindir, and Den Heuvel (2006) presented a dynamic lot-sizing with
returns and remanufacturing. The authors tested the modified versions of Silver Meal, Least Unit
Cost and Part Period Balancing heuristics. Golany, Yang, and Yu (2001) presented the problem
without restrictive assumptions on the number of returns. They also assumed that returns can be
disposed. Beltrán and Krass (2002) studied the problem in which returns can be directly reused.
Overall, different researches have different assumptions on how the return system works. In this
thesis, the focus will be on the most basic remanufacturing production line in which returns are
deterministic and disposal is not an option.
Generally, Capacitated Lot-sizing and Scheduling Problem with Sequence-Dependent Setup
Times and Returns is close to the case of a drink manufacturer in real working environment. In
this case, different products are different types of drinks, while glass bottles can be considered
returns. Whenever the bottling line changes from a type of drink to another, a changeover process
needs to be executed.
1.4. Articles directly relating to the thesis
The Capacitated Lot-sizing and Scheduling Problem with Sequence-Dependent Setups has
been largely studied in the literature. Various versions of the problem have been developed and
studied. Almada-Lobo, Klabjan, Antónia carravilla, and Oliveira (2007) presented a mixed
integer programming formulation with setup times and costs. The authors also proposed the
Compact Formulation – an alternative equivalent formulation to the first formulation. With the
new formulation, they developed a five-step heuristic which is effective both in finding a feasible
solution and in producing good solution. This thesis has followed the same structure of setups and
parameters with the article. However, there is some difference in the binary variables. The article
used two decision binary variables to control the sequence dependent setup, while only one will
be used in the thesis. The difference is due to the different approaches to solve the problem.
The idea of dividing period into sub-periods is borrowed from the research of Mohammadi,
Ghomi, Karimi, and Torabi (2010). In the research, they developed and solved the multi-product
10
multi-level capacitated lot-sizing problem with sequence-dependent setups. Although the
formulation of the problem is much different in compare with the thesis, the binary variable idea
can be applied correctly to the problem in the thesis. The fix and relax heuristic proposed in the
thesis also has the same spirit with the heuristic proposed in the article. However, different
parameters will be setup and tested in the thesis. Besides, the thesis will also propose another
heuristic which is totally different from the fix and relax idea, in order to compare with the fix
and relax heuristic.
With the structure of returns and remanufacturing, the thesis relies on the research of Teunter
et al. (2006). This research focused on dynamic lot-sizing with product returns and
remanufacturing. The authors proposed a simple formulation of lot-sizing problem with returns,
in order to test the performance of some well-known heuristics including Silver Meal, Least Unit
Cost and Part Period Balancing. The structure of demand patterns are kept the same in the thesis.
Overall, in this thesis, the author does not try to reformulate the problem in a different way.
Instead, the effort is put on solving the already proposed problem with a different approach. The
main purpose of this thesis, rather than trying to find the best solution, is to generate, test and
compare different ideas of heuristic solution approach.
11
CHAPTER 2: PROBLEM DEFINITION AND MATHEMATICAL MODEL
In this chapter, two models of the Single machine Lot-Sizing Problem with Sequence-
Dependent Setup Times will be presented. The first one is a basic model of the original problem,
while the later takes into account the Returns. Before creating the mathematical models,
following assumptions need to be made:
There is a single machine which has to produce N products in T periods of time.
The machine is constrained in capacity of time units.
Demands and Returns are predetermined for all T time periods.
Backorders are allowed in the problem.
A time period is divided into sub-periods in which one and only one product is
produced. The number of sub-periods in each period never exceeds the number of
products, since it does not make sense to produce a product more than once in a period.
For example, assume that we have 3 product named A, B, and C. If we produce these
products in the sequence ABCA, meaning product A is produced in 2 sub-periods. This
sequence is obviously more costly than the ABC in which we can save the switch cost
from C to A by producing all required quantity of A in the first sub-period. Therefore,
there will be N sub-periods in each time period.
The triangle inequality needs to be assumed for the switch cost and switch time. It’s
never faster to switch over from one product to another by passing through a third
product. In other words, a direct changeover is always required in the model.
At the beginning of the planning horizon, the machine is configured at a product
which is called the starting setup configuration.
2.1. Mathematical model 1: Lot-Sizing and Scheduling Problem with Sequence-
Dependent Setup Times
12
Indices:
i, j, k
t
s
Product types
Period
Sub - period
Parameters:
N Number of products
T Number of periods
Demand of product i in period t
Unit inventory holding cost of product i in period t
Cost to produce one unit of product i in period t
Time required to produce one unit of product i in period t
Capacity (in time unit) of period t
Time required to switch from product i to product j in period t
Cost required to switch from product i to product j in period t
Unit backorder cost in one period for one unit of product i
The starting configuration of the machine
Decision variables:
Number of product i being produced in sub-period s of period t
13
Inventory level of product i at the end of period t
Backorder level of product i at the end of period t
{
Objective function:
∑∑∑
∑∑
∑∑∑∑
Subject to:
∑
∑∑
∑∑∑
(4)
∑
∑
∑
∑
∑
14
∑
{
⁄ ∑
}
∑∑
∑∑
{ }
In this model, the objective function minimizes the sum of the production costs, the storage
and backorder costs, and the sequence-dependent setup costs. Equation 1 is the inventory balance
constraint which shows the relations of inventory level, backorder level, quantity produced and
demand. Equation 2 makes sure that there will be no backorder at the end of the planning horizon.
Equation 3 indicates the capacity constraint, showing that the total amount of time spending
on production and switchover cannot exceed the given capacity. Equation 4 and 5 force the
machine to start at the starting configuration in the first sub-period of the first period.
Equation 6 and 7 force the machine to switch from one product to another, while equation 9
and 10 makes sure that the machine produces one and only one product in a sub-period.
Equation 8 indicates the relation between variable Y and variable X. It guarantees that
product i is produced if and only if the machine is switched to product i at that sub-period.
15
Equation 11, 12, 13, and 14 represent the type of variables.
2.2. Mathematical model 2: Lot-Sizing and Scheduling Problem with Sequence-
Dependent Setup Times and Returns
This model is indeed a development of the mathematical model 1. In the later model, returns
are added, which leads to some slight changes in the model.
Indices:
i, j, k
t
s
Product types
Period
Sub - period
Parameters:
N Number of products
T Number of periods
Demand of product i in period t
Number of product i being returned for remanufacturing at the beginning of period t
Unit inventory holding cost of new product i in period t
Unit inventory holding cost of returned product i in period t
Cost to produce one unit of new product i in period t
Cost to reproduce one unit of product i in period t
Time required to produce or reproduce one unit of product i in period t
16
Capacity (in time unit) of period t
Time required to switch from product i to product j in period t
Cost required to switch from product i to product j in period t
Unit backorder cost in one period for one unit of product i
The starting configuration of the machine
Decision variables:
Number of product i being produced in sub-period s of period t
Number of product i being reproduced in sub-period s of period t
Inventory level of finished-product i at the end of period t
Inventory level of returned-product i at the end of period t
Backorder level of product i at the end of period t
{
Objective function:
∑∑∑
∑∑
∑∑∑∑
17
Subject to:
∑
∑
∑∑
∑∑∑
(4)
∑
∑
∑
∑
∑
∑
{
⁄ ∑
}
∑∑
18
∑∑
{ }
Again, the objective function minimizes the sum of the production costs, the storage and
backorder costs, and the sequence-dependent costs.
The inventory balance constraints need to be written for both finished products and return
products in equation 1.a and 1.b. There is also a slight change in the capacity constraint in
equation 3. The other constraints remain the same in this second model.
From this point, we will work only on this model to solve the problem.
2.3. Test the correctness of mathematical model 2
Before carrying any sort of experiment, it’s important to make sure that we are working on a
correct model. Therefore, a simple instance is provided below in order to show how the model
works. Data of this very first instance is presented in the tables below.
Demand
Return
week 1 week 2 week 3
week 1 week 2 week 3
A 100 100 100
A 30 30 30
B 100 100 100
B 30 30 30
C 100 100 100
C 30 30 30
19
Inventory cost for new products
Inventory cost for return products
week 1 week 2 week 3
week 1 week 2 week 3
A 2 2 2
A 1 1 1
B 2 2 2
B 1 1 1
C 2 2 2
C 1 1 1
Production cost for new products
Production cost for return products
week 1 week 2 week 3
week 1 week 2 week 3
A 10 10 15
A 6 6 9
B 10 10 15
B 6 6 9
C 10 10 15
C 6 6 9
Production time
Switch cost (for all 3 weeks)
week 1 week 2 week 3
A B C
A 20 20 30
A 0 40 40
B 20 20 30
B 40 0 79
C 20 20 30
C 40 40 0
Switch time (for all 3 weeks)
Backorder cost
A B C
A 5
A 0 10 10
B 5
B 10 0 19
C 5
C 10 10 0
Capacity (time unit)
Starting config.
week 1 week 2 week 3
jo A
9000 9000 9000
20
In this instance, the production cost in week 3 is set higher than the other weeks on purpose.
Since it’s costly to produce new products in week 3, we should see an optimal plan which
produces mostly in week 1 & 2 and less in week 3. Similarly, the changeover cost from product B
to product C is higher than the other pairs. Thus, we do not expect to see the machine switching
from B to C in the result.
The model is coded and solved by Gorubi 6.5. The optimal solution of this instance is
presented in the following tables.
Production plan
Week 1 Week 2 Week 3
(jo = A) A C B B A C C A B
New product 70 70 70 140 140 140 0 0 0
Return product 30 30 30 0 29 0 60 31 60
Variable Y - Week 1
Sub-period 1 Sub-period 2 Sub-period 3
A B C A B C A B C
A 1 0 0 0 0 1 0 0 0
B 0 0 0 0 0 0 0 0 0
C 0 0 0 0 0 0 0 1 0
Variable Y - Week 2
Sub-period 1 Sub-period 2 Sub-period 3
A B C A B C A B C
A 0 0 0 0 0 0 0 0 1
B 0 1 0 1 0 0 0 0 0
C 0 0 0 0 0 0 0 0 0
21
Variable Y - Week 3
Sub-period 1 Sub-period 2 Sub-period 3
A B C A B C A B C
A 0 0 0 1 0 0 0 1 0
B 0 0 0 0 0 0 0 0 0
C 0 0 1 0 0 0 0 0 0
Inventory level of new products
Inventory level of return products
week 1 week 2 week 3
week 1 week 2 week 3
A 0 69 0
A 0 1 0
B 0 40 0
B 0 30 0
C 0 40 0
C 0 30 0
From the results, it can be seen that the model works as expected. The machine starts at
product A, which makes sense since the starting configuration is A. We also do not see the
machine switching from product B to product C. The relations between variable XN, XR and
variable Y are correct as expected. Similarly, inventory balance is also checked out in the result.
Therefore, it can be confidently concluded that the model works correctly.
2.4. Development of lower bound
So far, the problem has been formulated successfully. However, it’s too hard to solve
optimally the problem when the numbers of products and time periods are high. (The detail about
optimally computable size of the problem will be presented in the numerical experiment chapter).
Therefore, in order to test the accuracy of heuristics, it’s necessary to develop a lower bound.
It should be noticed that we are working with a Mixed Integer Programming (MIP) problem.
Theoretically, the common way to find lower bound of MIP problem is relaxing all integer
variables. In our problem, variable Y is a binary variable – a special case of integer variable.
Thus, relaxing variable Y seems to be the only choice to get a lower bound.
22
By relaxing variable Y, we have generated a relaxed problem. This relaxed problem indeed is
a Linear Programming problem which will be easier to solve. The optimal value of this relaxed
problem is a lower bound of the original MIP problem. The efficiency of this lower bound will be
tested when carrying out numerical experiments.
23
CHAPTER 3: DEVELOPMENT OF HEURISTICS
3.1. Heuristic 1: Fix and Relax
The main idea behind this heuristic approach is that if we relax part of the problem, we will
get a relaxed problem which is easier to solve optimally. In our problem, the integer variables Y
will be grouped by time periods. Integer variables in a number of periods will be fixed, while
integer variables in other periods will be relaxed in the same iteration. When binary variable Y is
relaxed, it becomes a continuous variable that 0 ≤ Y ≤ 1. Thus, instead of solving the problem all
at once, we will solve the problem part by part until we get all the fixed integer variables.
The only question left is which set of integer variables to fix and which to relax. At this point,
it’s necessary to introduce 2 parameters.
- St: the number of periods which we keep them remaining integer variables in each
iteration.
- F: the number of periods which we fix the integer variable at the results from the previous
iteration.
In iteration k, we will fix (k-1)*F periods, while keeping periods from (k-1)*F +1 to (k-1)*F
+ St remaining integer and relax the rest. Since we fix F periods each iteration, we have to solve
T/F iterations to get the results of the whole problem. By monitoring theses 2 parameters, we are
able to carry out various experiments.
A concrete example is presented below in order to show how these parameters work. Assume
that we have an instance with 10 time periods. In this example, St = 3 periods and F = 2 periods.
Iteration 1 Integer Relaxed
Period 1 2 3 4 5 6 7 8 9 10
Iteration 2 Fixed Integer Relaxed
Period 1 2 3 4 5 6 7 8 9 10
24
Iteration 3 Fixed Integer Relaxed
Period 1 2 3 4 5 6 7 8 9 10
Iteration 4 Fixed Integer Relaxed
Period 1 2 3 4 5 6 7 8 9 10
Iteration 5 Fixed Integer
Period 1 2 3 4 5 6 7 8 9 10
In iteration 1, we keep integer variables in 3 first periods the same, while relaxing integer
variables Y in the rest of periods. After solving iteration 1, we keep the results of 2 first periods to
fix in iteration 2. Generally, in each iteration, we solve to get results of 3 periods and fix the
results of 2 periods. Therefore, for 10 periods, we need to solve 10/2 = 5 iterations to get the
results of the whole problem.
In order to implement the heuristic, we need to make some changes in the problem
formulation. Firstly, the binary variables Y are now all relaxed to continuous variable that 0 ≤ Y
≤ 1. Binary variable is added into the problem with i,j = 1,2,..,N; e = 1,2,..,St; and s =
1,2,…,N. In the iteration, we add the following constraint into the problem:
With this constraint, periods from (k-1)*F +1 to (k-1)*F + St will remain integer while the
rest is relaxed.
Another trick is performed to fix the variables in each iteration. Let with i, j, s =
1,2,…,N; and t = 1,2,…,T be the result of variable Y in the k – 1 iteration. In iteration k, we will
add the following constraint to fix the variable.
25
In the numerical experiments chapter, various experiments will be carried out in order to
study the choices of these 2 parameters.
3.1. Heuristic 2
The second heuristic has the same spirit with the first one. Again, the main idea is to divide
the original problem into smaller sub-problem, so we will be able to solve it in reasonable time.
However, the approach of this heuristic is different from the fix and relax heuristic.
Looking at the objective function, we can see that the total cost is the sum of production costs,
inventory and backorder costs and changeover costs. We will deal with the problem by splitting it
into 2 sub-problems. The first one is a basic Capacitated Lot-Sizing Problem, while we deal with
Sequence-Dependent Setup Cost in the second sub-problem. In the first sub-problem, we assume
that the machine does not need to setup to produce. The problem therefore is presented below.
Indices
i Product types
t Time periods
Parameters
N Number of products
T Number of periods
Demand of product i in period t
Number of product i being returned for remanufacturing at the beginning of period t
Unit inventory holding cost of new product i in period t
Unit inventory holding cost of returned product i in period t
Cost to produce one unit of new product i in period t
26
Cost to reproduce one unit of product i in period t
Time required to produce or reproduce one unit of product i in period t
Capacity (in time unit) of period t
Unit backorder cost in one period for one unit of product i
The amount of capacity we save for changeover times in the second sub-problem (the
development of this parameter will be discussed later after generating sub-problem 2)
Decision variables
Number of product i being produced in period t
Number of product i being reproduced in period t
Inventory level of finished-product i at the end of period t
Inventory level of returned-product i at the end of period t
Backorder level of product i at the end of period t
{
Objective function:
∑∑
Subject to:
Inventory balance constraints
27
Capacity constraint
∑
Backorder level at the end
The relation between variable P and variable X
{
⁄ ∑
}
After solving the first sub-problem, in each period, we have information of which products to
produce and the quantity to produce. The only remain problem is to find a sequence which
minimizes the changeover costs. We will solve the second sub-problem for each period to get a
sequence with lowest changeover costs. The second sub-problem is formulated below.
Indices
i, j, k Product types
s Sub periods
Parameters
Results of variable in the first sub-problem
Results of variable in the first sub-problem
NoP Number of products being produced in the period
28
Time required to switch from product i to product j
Cost required to switch from product i to product j
The last product being produced in the previous period
Decision variables
{
Objective function
∑∑ ∑
Subject to
∑
∑
∑
∑ ∑
∑ ∑
29
The objective function minimizes the sum of changeover costs. Equation 1 and 2 makes sure
that the machine starts from the last product of the previous period. Equation forces the machine
to switch from one product to another. Equation 4 and 5 makes sure that the machine will be
setup for product i if and only if product i is produced in the results provided by the first sub-
problem. Looking at the sub-problem 2, it’s easy to notice that this problem is similar to the
Travelling Salesman Problem. The machine stands for the salesman, while the products can be
considered as the cities.
At this point, the only problem left is the amount of capacity we save for the changeover time.
We have saved capacity in the parameter . A safe way to make sure that we have enough
capacity for changeovers is to find an upper bound for the capacity we use in the second sub-
problem. Thus, is calculated by the following formula.
( )
It’s clear that the total changeover time will never exceed ( ).
After successfully formulate 2 sub-problems, the execution of this heuristic will follows 2
steps:
- Step 1: Solve the first sub-problem to get the results of which products to produce and the
quantity to produce.
- Step 2: Solve the second sub-problem T times to get the sequence of the changeover.
30
31
CHAPTER 4: NUMERICAL EXPERIMENTS
1.1. Development of instances
In order to test 2 heuristics developed in chapter 3, 48 instances are generated. These
instances are created randomly with the gradually increased number of products (parameter N).
The number of time periods is always 20 for all instances.
The demand patterns and return patterns are generated following the research Dynamic lot
sizing with product returns and remanufacturing (Teunter et al., 2006). Demands and Returns are
generated according to the formula below:
(
)
In this formula, μ is the starting level of the pattern; τ is the trend level; a is the amplitude of
the cycle; d determines the peak of the cycle and (t = 1,2,…,T) are independently normally
distributed random variables with standard deviation δ. By monitoring parameters in the formula,
we are able to create different types of demands and return. Indeed, 3 types of demand and return
are created including Stationary, Positive Trend and Peak in Middle. These graphs below show
examples of 3 types of demand being tested.
μ 100
δ 10
τ 0
a 0
c 20
d 3
0
20
40
60
80
100
120
140
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Stationary
Dt
32
μ 100
δ 10
τ 10
a 0
c 20
d 3
μ 100
δ 10
τ 0
a 40
c 20
d 3
Other parameters are randomly generated following the table below:
Parameter Name From - to
Unit inventory holding cost of new product i in period t 2 - 3.5
Unit inventory holding cost of returned product i in period t 1 - 3
Cost to produce one unit of new product i in period t 10 - 25
0
50
100
150
200
250
300
350
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Positive Trend
Dt
0
50
100
150
200
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Peak in Middle
Dt
33
Cost to reproduce one unit of product i in period t 5 - 15
Time required to produce or reproduce one unit of product i in period t 15 - 25
Time required to switch from product i to product j in period t 55 - 100
Cost required to switch from product i to product j in period t 41 - 61
Unit backorder cost in one period for one unit of product i 5 -10
The starting configuration of the machine 1 - N
It should be noticed that demand and return are rounded up to zero decimal places, while the
other parameters are rounded up to one decimal place. As can be seen, the instances tend to
simulate the real world as much as possible.
So far with the instances, we have the capacity left to decide. The capacity is kept constant all
time periods. In order to secure the feasibility of the instance, the capacity is chosen by try and
error. We start with a capacity which makes the problem infeasible; increase the capacity 5%
each time the problem results infeasible. We stop as soon as we get a feasible problem, and mark
the instance as type A. Thus, we always get the capacity that is not larger than the minimum
required capacity by 5%. In order to test the influence of capacity, instances type B and type C
are also created. In instance type B, we keep all the parameters the same as instance type A but
increase the capacity by 10%. We do the same with instances type C, but the percentage this time
is 25%.
A system of notation is presented below in order to track the instances.
The first number X = {1,2,…,10} Number of products = 5*X
A,B,C The generating of capacity as described above
St Stationary
Po Positive trend
Pe Peak in middle
34
For example, 3.B.St means the instance has 15 products, capacity type B and the demand and
return generated following stationary model.
1.2. Computational results
All computational experiments are performed on a personal computer with Window 8.1,
processor Intel core i5-43000U and 8 Gb memory. Gurobi 6.5 was used as the mixed integer
programming solver.
In total, 48 instances were created to test the performance of the two heuristics. All raw
results can be found in the Appendix 1. In the results, shows the difference in percentage
between the results found by heuristics and the optimal objective value, while compares the
differences between the results found by heuristics and the lower bound. In the fix and relax
heuristic, the sign St-F is used. For example, 3-1 means St = 3 and F = 1 in this run. The sign ―-‖
means the computer ran more than 2 hours without finding the results.
Optimally solving the problem
Instance Number of
constraints Number of variables Number of binary variables
5x20 1441 3800 2500
10x20 4911 24600 20000
15x20 10431 77400 67500
20x20 18001 177200 160000
25x20 27621 339000 312500
30x20 39291 577800 540000
35x20 53011 908600 857500
40x20 68781 1346400 1280000
45x20 86601 1906200 1822500
50x20 106471 2603000 2500000
The table above shows the size of the problem with different sets of NxT. As can be seen, size
of the problem increases very quickly when we increase the number of products. Since the
35
hardness of the problem depends mostly on the number of binary variables, the problem becomes
NP-hard very quickly. Indeed, with the time limitation of 2 hours, we are able to solve optimally
instances with size up to 15x20. Beyond this size, it takes too much time to solve optimally the
problem.
The lower bound
As expected, the lower bound is found within very short CPU time. The quality of this lower
bound is quite good. In average, the difference between the lower bound and the optimal value is
only 7.35%.
Fix and relax heuristic
Similar to the optimal value, we are only able use this heuristic to solve the instances with
size up to 15x20. Beyond this size, even the set 1-1 - the set which theoretically should take least
time to solve – runs more than 2 hours without finding the solution. The performance of the first
heuristic can be seen in the table below.
St-F
1-1 0.128% 24.4
3-1 0.012% 57.2
5-1 0.004% 125.7
3-2 0.023% 26.3
5-2 0.005% 74.4
5-3 0.005% 51.8
shows the mean of the difference between the solution found by heuristic 1 and the
optimal value. Overall, heuristic 1 delivers very good solution. We get solutions which are so
close to the optimal value. In some cases, which can be found in the Appendix, we get the same
results with the optimal objective value.
We can see clearly the trade-off between quality and CPU time in the results. The set 1-1 took
least time to find a solution, but found the worst solution. On the opposite, the set 5-1 found the
best solution with the longest running time. This results make sense since the quality of the fix
and relax heuristic depends mostly on the parameter St. The higher St is, the harder the sub-
36
problem becomes. The harder the sub-problem is, the longer time we need to run the heuristic.
However, the harder the sub-problem is, the better solution the heuristic gets.
In some cases, heuristic 1 results infeasible. In one iteration, the sub-problem is infeasible,
which prevents the heuristic to go on. In this case, we have to choose another set of parameters to
solve the problem. The infeasible situation seems to appear unpredictably, which leads to the
assumption that it depends on the instance itself rather than the set of parameters.
Heuristic 2
Heuristic 2, in comparison to heuristic 1, took less time to solve the problem. In average, the
second heuristic takes 10.4 seconds of CPU time to get the solution. However, the difference
between solutions found by heuristic 2 and the optimal values is 4.15%, which is much higher
than heuristic 1.
Since it’s not able to find the optimal solution with instances larger than 15x20, we can use
the lower bound to evaluate the quality of the heuristic. If we include results of instances from 25
to 45, and compare them with the lower bound, the difference is 10.4%. This number in heuristic
1 is 7.9%. Generally, in comparison with heuristic 1, heuristic 2 takes less time to run but
produce worse solutions. One strong point of this heuristic is that it’s able to solve very large
instance. While heuristic 1 stops at 15x20, heuristic 2 is able to solve instances up to size 50x20.
However, in some instance type A, the heuristic results infeasible. This phenomenon is
because of the capacity we save for the second sub-problem in this heuristic. The
remaining capacity is not enough to produce all the demand, which leads to infeasible result in
the first sub-problem. That’s the reason why infeasible result often appears in instances type A in
which the capacity is set very tightly.
The effects of demand patterns
Demand
pattern
Heuristic 1 Heuristic 2
Stationary 0.029% 11.06%
Peak in middle 0.040% 10.64%
Positive trend 0.028% 5.24%
37
The table above shows the mean of the difference between the results found by heuristic 1
and the optimal value. The performance of heuristic 1 does not seem to be affected by the
demand patterns. Heuristic 2 seems to produce better results with the Positive trend pattern.
However, with the limited number of instances, it’s hard to conclude anything about the effect of
demand patterns on the results of the two heuristics.
The effect of capacity
Instance type
Heuristic 1 Heuristic 2
A 1395.4 0.059% 11.928%
B 479.7 0.020% 3.246%
C 325 0.016% 0.721%
This table shows the running time to find optimal solution in average of different types of
instances. The tightness of capacity obviously affects the time we use to solve the problem. It
seems that tightening the capacity makes the problem become harder to solve. It’s also clear that
the tightness of capacity has an effect on the result quality of both heuristics. The heuristics seem
to work better with the capacity which is not tightened too much.
Comparison between the two heuristics
Heuristic 1 Heuristic 2
0.032% 4.145%
7.90% 10.42%
151.7 10.2
38
Strengths and Weaknesses
Heuristic 1 Heuristic 2
Strength Ability to find very good solutions Ability to find quite good solutions even
for large instances
Weakness
Takes longer time to run
Could be infeasible in some cases
Have limit in solvable size (15x20)
Solution’s quality is not as good as
heuristic 1
Could be infeasible if the capacity is
tightened too hard
The tables above summarize and compare the performance of 2 heuristics. Although both of
them have weaknesses, it can be generally said that two heuristics are able to find reasonable
good solutions. While heuristic 1 may be preferable to solve small size problems, heuristic 2 may
be a good choice to deal with super large size problems.
39
CHAPTER 5: CONCLUDING REMARKS
Overall, the Capacitated Lot-sizing and Scheduling Problem with Sequence-Dependent Setup
Times and Return has been successfully formulated in the thesis. Both heuristics, although come
with different strengths and weaknesses, show promising results. However, there are some
aspects in the thesis that I wish to improve but could not due to the limitation in time as well as
knowledge. Firstly, the number of instances could be higher in order to deeply test the two
heuristics. The generating of instances could be done automatically in the code instead of
manually by excel. Due to the lack of experience in coding, I also feel that there is much room to
improve in the codes. Secondly, due to the limitation in the number of instances, I am aware that
the results seem to be unreliable sometimes. Although the results do not show any conflict with
theory, it also needs more experiments to confirm.
For further research, the research could be extended from single machine to parallel machine
with or without different speed. The fix and relax heuristic could be tested with more set of
parameters, or even a different setup. The quality of heuristic 2 could also be improved with a
better upper bound for the saved capacity.
40
41
REFERENCES
Almada-Lobo, B., Klabjan, D., Antónia carravilla, M., & Oliveira, J. F. (2007). Single machine
multi-product capacitated lot sizing with sequence-dependent setups. International
Journal of Production Research, 45(20), 4873-4894.
Barany, I., Van Roy, T. J., & Wolsey, L. A. (1984). Strong formulations for multi-item
capacitated lot sizing. Management science, 30(10), 1255-1261.
Beltrán, J. L., & Krass, D. (2002). Dynamic lot sizing with returning items and disposals. IIe
transactions, 34(5), 437-448.
Belvaux, G., & Wolsey, L. A. (2000). bc—prod: A specialized branch-and-cut system for lot-
sizing problems. Management science, 46(5), 724-738.
Belvaux, G., & Wolsey, L. A. (2001). Modelling practical lot-sizing problems as mixed-integer
programs. Management science, 47(7), 993-1007.
Drexl, A., & Kimms, A. (1997). Lot sizing and scheduling—survey and extensions. European
Journal of Operational Research, 99(2), 221-235.
Eppen, G. D., & Martin, R. K. (1987). Solving multi-item capacitated lot-sizing problems using
variable redefinition. Operations Research, 35(6), 832-848.
Golany, B., Yang, J., & Yu, G. (2001). Economic lot-sizing with remanufacturing options. IIe
transactions, 33(11), 995-1003.
Gopalakrishnan, M. (2000). A modified framework for modelling set-up carryover in the
capacitated lotsizing problem. International Journal of Production Research, 38(14),
3421-3424.
Gopalakrishnan, M., Miller, D., & Schmidt, C. (1995). A framework for modelling setup
carryover in the capacitated lot sizing problem. International Journal of Production
Research, 33(7), 1973-1988.
Gupta, D., & Magnusson, T. (2005). The capacitated lot-sizing and scheduling problem with
sequence-dependent setup costs and setup times. Computers & Operations Research,
32(4), 727-747.
Kang, S., Malik, K., & Thomas, L. J. (1999). Lotsizing and scheduling on parallel machines with
sequence-dependent setup costs. Management science, 45(2), 273-289.
42
Mohammadi, M., Ghomi, S. F., Karimi, B., & Torabi, S. A. (2010). Rolling-horizon and fix-and-
relax heuristics for the multi-product multi-level capacitated lotsizing problem with
sequence-dependent setups. Journal of Intelligent Manufacturing, 21(4), 501-510.
Sox, C. R., & Gao, Y. (1999). The capacitated lot sizing problem with setup carry-over. IIe
transactions, 31(2), 173-181.
Teunter, R. H., Bayindir, Z. P., & Den Heuvel, W. V. (2006). Dynamic lot sizing with product
returns and remanufacturing. International Journal of Production Research, 44(20), 4377-
4400.
Wagner, H. M., & Whitin, T. M. (1958). Dynamic version of the economic lot size model.
Management science, 5(1), 89-96.
43
APPENDIX
Computational results
Instance Method CPU
Time Value Backorder ∆1 ∆2
1.A.St
(5x20)
Lower bound 3 € 162,203.32
Optimal 5 € 190,087.23 4878.5
Fix
and R
elax
1-1 3 € 190,398.71 4897.7 0.16% 14.81%
3-1 6 € 190,087.23 4878.5 0.00% 14.67%
5-1 6 € 190,115.87 4879.7 0.02% 14.68%
3-2 3 € 190,115.87 4879.7 0.02% 14.68%
5-2 4 € 190,087.23 4878.5 0.00% 14.67%
5-3 3 € 190,115.87 4879.7 0.02% 14.68%
Heuristic 2 3 € 229,394.86 8084.7 17.14% 29.29%
1.B.St
(5x20)
Lower bound 3 € 134,382.04
Optimal 3 € 140,513.91 934.9
Fix
and R
elax
1-1 4 € 140,630.68 945.6 0.08% 4.44%
3-1 4 € 140,537.34 932.7 0.02% 4.38%
5-1 5 € 140,535.26 932.4 0.02% 4.38%
3-2 3 € 140,547.93 934.2 0.02% 4.39%
5-2 3 € 140,540.07 933.7 0.02% 4.38%
5-3 3 € 140,542.14 933.9 0.02% 4.38%
Heuristic 2 3 € 145,304.97 1582.3 3.30% 7.52%
1.C.St
(5x20)
Lower bound 1 € 131,063.92
Optimal 1 € 134,908.58 302.8
Fix
and R
elax
1-1 3 € 135,010.94 302.8 0.08% 2.92%
3-1 4 € 134,908.58 302.8 0.00% 2.85%
5-1 4 € 134,908.58 302.8 0.00% 2.85%
3-2 2 € 134,913.99 302.8 0.00% 2.85%
5-2 2 € 134,908.58 302.8 0.00% 2.85%
5-3 2 € 134,908.58 302.8 0.00% 2.85%
Heuristic 2 3 € 135,653.01 310.4 0.55% 3.38%
Table 1: 5 products and stationary demand
44
Instance Method CPU
Time Value Backorder ∆1 ∆2
1.A.Pe
(5x20)
Lower bound 1 € 184,740.74
Optimal 1 € 214,151.05 6686.5
Fix
and
Rel
ax 1-1 4 € 215,184.77 6743.2 0.48% 14.15%
3-1 5 € 214,219.85 6692.5 0.03% 13.76%
5-1 6 € 214,151.05 6686.5 0.00% 13.73%
3-2 3 € 214,720.85 6726.3 0.27% 13.96%
5-2 3 € 214,151.05 6686.5 0.00% 13.73%
5-3 3 € 214,151.05 6686.5 0.00% 13.73%
Heuristic 2 3 € 301,650.03 13582.9 29.01% 38.76%
1.B.Pe
(5x20)
Lower bound 1 € 152,972.58
Optimal 1 € 163,512.16 1987.3
Fix
and R
elax
1-1 4 € 163,606.03 1999.3 0.06% 6.50%
3-1 3 € 163,544.39 1996.6 0.02% 6.46%
5-1 5 € 163,512.16 1987.3 0.00% 6.45%
3-2 3 € 163,540.64 2001.2 0.02% 6.46%
5-2 3 € 163,512.16 1987.3 0.00% 6.45%
5-3 3 € 163,512.16 1987.3 0.00% 6.45%
Heuristic 2 3 € 169,726.52 2760.6 3.66% 9.87%
1.C.Pe
(5x20)
Lower bound 1 € 139,633.60
Optimal 1 € 144,777.72 477.9
Fix
and R
elax
1-1 3 € 144,816.17 477.9 0.03% 3.58%
3-1 5 € 144,784.20 478.9 0.00% 3.56%
5-1 5 € 144,779.81 479.4 0.00% 3.55%
3-2 3 € 144,784.20 478.9 0.00% 3.56%
5-2 3 € 144,787.34 478.4 0.01% 3.56%
5-3 3 € 144,794.64 479.0 0.01% 3.56%
Heuristic 2 3 € 145,565.24 443.1 0.54% 4.07%
Table 2: 5 product and peak in middle trend
45
Instance Method CPU
Time Value Backorder ∆1 ∆2
1.A.Po
(5x20)
Lower
bound 1 € 389,247.01
Optimal 1 € 437,503.51 5201.0
Fix
and R
elax
1-1 5 € 439,408.03 5467.9 0.43% 11.42%
3-1 5 € 437,764.43 5232.5 0.06% 11.08%
5-1 7 € 437,503.51 5201.0 0.00% 11.03%
3-2 2 € 437,775.27 5232.5 0.06% 11.09%
5-2 4 € 437,503.51 5201.0 0.00% 11.03%
5-3 3 € 437,503.51 5201.0 0.00% 11.03%
Heuristic 2 Infeasible
1.B.Po
(5x20)
Lower
bound 1 € 322,590.97
Optimal 1 € 332,466.25 69.0
Fix
and R
elax
1-1 4 € 332,660.75 69.0 0.06% 3.03%
3-1 4 € 332,466.25 69.0 0.00% 2.97%
5-1 5 € 332,476.93 69.0 0.00% 2.97%
3-2 3 € 332,489.33 69.0 0.01% 2.98%
5-2 3 € 332,476.93 69.0 0.00% 2.97%
5-3 3 € 332,468.55 69.0 0.00% 2.97%
Heuristic 2 2 € 336,691.12 69.0 1.25% 4.19%
1.C.Po
(5x20)
Lower
bound 1 € 285,030.66
Optimal 1 € 291,121.78 156.0
Fix
and R
elax
1-1 3 € 291,295.82 156.0 0.06% 2.15%
3-1 5 € 291,144.52 156.0 0.01% 2.10%
5-1 5 € 291,122.46 156.0 0.00% 2.09%
3-2 3 € 291,139.05 156.0 0.01% 2.10%
5-2 3 € 291,122.46 156.0 0.00% 2.09%
5-3 3 € 291,129.17 156.0 0.00% 2.09%
Heuristic 2 2 € 292,495.18 156.0 0.47% 2.55%
Table 3: 5 products and positive trend demand
46
Instance Method CPU
Time Value Backorder ∆1 ∆2
2.A.St
(10x20)
Lower bound 1 € 389,954.91
Optimal 212 € 483,982.03 15191.8
Fix
and R
elax
1-1 48 € 484,876.76 15242.2 0.18% 19.58%
3-1 147 € 484,019.74 15198.4 0.01% 19.43%
5-1 602 € 483,991.79 15193.2 0.00% 19.43%
3-2 85 € 484,030.45 15196.0 0.01% 19.44%
5-2 456 € 483,996.20 15196.5 0.00% 19.43%
5-3 337 € 484,010.60 15196.8 0.01% 19.43%
Heuristic 2 Infeasible
2.B.St
(10x20)
Lower bound 1 € 292,778.16
Optimal 95 € 318,636.31 2553.3
Fix
and R
elax
1-1 61 € 318,853.57 2574.3 0.07% 8.18%
3-1 208 € 318,658.55 2556.5 0.01% 8.12%
5-1 209 € 318,636.31 2553.3 0.00% 8.12%
3-2 62 € 318,665.47 2556.2 0.01% 8.12%
5-2 100 € 318,645.08 2553.8 0.00% 8.12%
5-3 98 € 318,645.08 2553.8 0.00% 8.12%
Heuristic 2 3 € 335,897.76 3837.6 5.14% 12.84%
2.C.St
(10x20)
Lower bound 1 € 276,516.75
Optimal 28 € 285,151.14 895.4
Fix
and R
elax
1-1 30 € 285,341.47 899.0 0.07% 3.09%
3-1 64 € 285,152.51 894.5 0.00% 3.03%
5-1 146 € 285,161.66 897.1 0.00% 3.03%
3-2 50 € 285,172.55 896.5 0.01% 3.04%
5-2 78 € 285,152.20 896.6 0.00% 3.03%
5-3 70 € 285,151.67 896.6 0.00% 3.03%
Heuristic 2 3 € 285,165.47 847.5 0.01% 3.03%
Table 4: 10 products and stationary demand
47
Instance Method CPU
Time Value Backorder ∆1 ∆2
2.A.Pe
(10x20)
Lower bound 1 € 431,460.23
Optimal 246 € 557,892.71 27514.6
Fix
and R
elax
1-1 65 € 559,370.36 27603.5 0.26% 22.87%
3-1 168 € 557,999.43 27522.9 0.02% 22.68%
5-1 385 € 557,892.71 27514.6 0.00% 22.66%
3-2 70 € 557,965.03 27516.0 0.01% 22.67%
5-2 162 € 557,951.52 27515.0 0.01% 22.67%
5-3 80 € 557,892.71 27514.6 0.00% 22.66%
Heuristic 2 Infeasible
2.B.Pe
(10x20)
Lower bound 1 € 304,316.52
Optimal 154 € 335,351.28 8355.3
Fix
and R
elax
1-1 58 € 335,660.84 8385.6 0.09% 9.34%
3-1 140 € 335,390.07 8354.7 0.01% 9.26%
5-1 405 € 335,357.87 8354.1 0.00% 9.26%
3-2 48 € 335,388.66 8358.1 0.01% 9.26%
5-2 225 € 335,366.69 8355.2 0.00% 9.26%
5-3 132 € 335,372.87 8352.4 0.01% 9.26%
Heuristic 2 3 € 358,668.18 10472.6 6.50% 15.15%
2.C.Pe
(10x20)
Lower bound 1 € 269,418.30
Optimal 68 € 279,629.31 631.8
Fix
and R
elax
1-1 30 € 279,774.20 618.0 0.05% 3.70%
3-1 62 € 279,691.41 619.0 0.02% 3.67%
5-1 105 € 279,672.55 624.2 0.02% 3.67%
3-2 33 € 279,683.34 624.6 0.02% 3.67%
5-2 82 € 279,687.21 627.5 0.02% 3.67%
5-3 48 € 279,660.78 627.3 0.01% 3.66%
Heuristic 2 3 € 281,158.55 894.5 0.54% 4.18%
Table 5: 10 products and peak in middle demand
48
Instance Method CPU
Time Value Backorder ∆1 ∆2
2.A.Po
(10x20)
Lower bound 3 € 734,799.17
Optimal 100 € 772,878.77 2207.6
Fix
and R
elax
1-1 38 € 773,331.44 2214.7 0.06% 4.98%
3-1 83 € 772,886.00 2205.7 0.00% 4.93%
5-1 126 € 772,886.00 2205.7 0.00% 4.93%
3-2 37 € 772,903.34 2206.7 0.00% 4.93%
5-2 67 € 772,901.66 2206.9 0.00% 4.93%
5-3 43 € 772,896.10 2209.5 0.00% 4.93%
Heuristic 2 3 € 802,223.11 3195.6 3.66% 8.40%
2.B.Po
(10x20)
Lower bound 1 € 647,187.44
Optimal 52 € 666,937.87 579.0
Fix
and R
elax
1-1 27 € 667,524.45 579.0 0.09% 3.05%
3-1 72 € 666,994.29 579.0 0.01% 2.97%
5-1 168 € 666,956.13 579.0 0.00% 2.96%
3-2 42 € 667,066.58 579.0 0.02% 2.98%
5-2 112 € 667,011.67 579.0 0.01% 2.97%
5-3 70 € 666,957.09 579.0 0.00% 2.96%
Heuristic 2 3 € 673,093.90 570.4 0.91% 3.85%
2.C.Po
(10x20)
Lower bound 1 € 573,577.12
Optimal 38 € 587,656.86 462.0
Fix
and R
elax
1-1 28 € 588,098.04 462.0 0.08% 2.47%
3-1 44 € 587,690.37 462.0 0.01% 2.40%
5-1 68 € 587,665.96 462.0 0.00% 2.40%
3-2 22 € 587,672.54 462.0 0.00% 2.40%
5-2 30 € 587,662.69 462.0 0.00% 2.40%
5-3 28 € 587,676.20 462.0 0.00% 2.40%
Heuristic 2 3 € 590,161.58 464.7 0.42% 2.81%
Table 6: 10 products and positive trend demand
49
Instance Method CPU
Time Value Backorder ∆1 ∆2
3.A.St
(15x20)
Lower bound 3 € 675,179.07
Optimal 6627 € 875,022.12 34523.6
Fix
and R
elax
1-1 606 € 877,446.27 34677.0 0.28% 23.05%
3-1 3451 € 875,060.40 34527.7 0.00% 22.84%
5-1 -
3-2 1595 € 875,060.40 34527.7 0.00% 22.84%
5-2 -
5-3 -
Heuristic 2 3 Infeasible
3.B.St
(15x20)
Lower bound € 478,518.89
Optimal 1856 € 536,040.41 10200.4
Fix
and R
elax
1-1 226 € 536,299.35 10229.2 0.05% 10.77%
3-1 2174 € 536,059.84 10219.2 0.00% 10.73%
5-1 -
3-2 727 € 536,062.38 10219.8 0.00% 10.73%
5-2 -
5-3 -
Heuristic 2 3 € 573,336.60 13505.8 6.51% 16.54%
3.C.St
(15x20)
Lower bound 5 € 408,215.41
Optimal 1562 € 424,357.05 1148.7
Fix
and R
elax
1-1 134 € 424,673.50 1153.2 0.07% 3.88%
3-1 1074 € 424,431.76 1152.2 0.02% 3.82%
5-1 -
3-2 Infeasible
5-2 -
5-3 -
Heuristic 2 3 € 428,831.65 1677.7 1.04% 4.81%
Table 7: 15 products and stationary demand
“-“ means it takes more than 2 hours to solve the problem
50
Instance Method CPU
Time Value Backorder ∆1 ∆2
3.A.Pe
(15x20)
Lower bound 4 € 413,254.64
Optimal 2501 € 430,367.64 1809.8
Fix
and R
elax
1-1 Infeasible
3-1 715 € 430,428.96 1810.4 0.01% 3.99%
5-1 -
3-2 423 € 430,454.47 1809.5 0.02% 4.00%
5-2 -
5-3 -
Heuristic 2 5 € 432,404.23 1997.3 4.43% 4.43%
3.B.Pe
(15x20)
Lower bound 5 € 409,490.26
Optimal 1940 € 423,288.81 1340.4
Fix
and R
elax
1-1 116 € 423,550.70 1341.0 0.06% 3.32%
3-1 Infeasible
5-1 -
3-2 514 € 423,327.16 1345.0 0.01% 3.27%
5-2 -
5-3 -
Heuristic 2 5 € 423,517.44 1442.0 0.05% 3.31%
3.C.Pe
(15x20)
Lower bound 5 € 407,009.27
Optimal 1111 € 419,227.40 1044.4
Fix
and R
elax
1-1 Infeasible
3-1 Infeasible
5-1 -
3-2 € 419,317.01 1044.6 0.02% 2.94%
5-2 -
5-3 -
Heuristic 2 5 € 429,959.76 1044.3 2.50% 5.34%
Table 8: 15 products and peak in middle demand
“-“ means it takes more than 2 hours to solve the problem
51
Instance Method CPU
Time Value Backorder ∆1 ∆2
3.A.Po
(15x20)
Lower bound 5 € 1,089,287.63
Optimal 2866 € 1,164,137.02 6390.0
Fix
and R
elax
1-1 Infeasible
3-1 Infeasible
5-1 -
3-2 675 € 1,164,316.67 6390.2 0.02% 6.44%
5-2 -
5-3 -
Heuristic 2 5 € 1,230,742.01 9743.3 5.41% 11.49%
3.B.Po
(15x20)
Lower bound 5 € 985,785.95
Optimal 215 € 1,026,581.57 1474.7
Fix
and R
elax
1-1 Infeasible
3-1 Infeasible
5-1 -
3-2 Infeasible
5-2 -
5-3 -
Heuristic 2 5 € 1,046,303.00 1773.7 1.88% 5.78%
3.C.Po
(15x20)
Lower bound 5 € 833,394.67
Optimal 115 € 854,358.51 531.2
Fix
and R
elax
1-1 Infeasible
3-1 Infeasible
5-1 -
3-2 Infeasible
5-2 -
5-3 -
Heuristic 2 5 € 857,905.35 427.2 0.41% 2.86%
Table 9: 15 products and positive trend demand
“-“ means it takes more than 2 hours to solve the problem
52
Instance Lower bound Heuristic 2 CPU
time
4.A.St € 561,470.87 € 634,234.83 5 11.5%
4.A.Pe € 568,283.60 € 623,994.70 5 8.9%
4.A.Po € 1,222,340.62 € 1,269,345.62 5 3.7%
5.A.St € 783,201.76 € 930,880.82 10 15.9%
5.A.Pe € 832,697.29 € 949,238.47 15 12.3%
5.A.Po € 1,699,155.50 € 1,818,536.34 8 6.6%
6.A.St € 839,125.17 € 927,534.38 34 9.5%
6.A.Pe € 1,045,562.31 € 1,207,207.03 14 13.4%
6.A.Po € 1,767,444.91 € 1,825,751.50 40 3.2%
7.A.St € 1,025,926.78 € 1,165,204.70 34 12.0%
7.A.Pe € 1,171,496.10 € 1,317,030.19 25 11.1%
7.A.Po € 2,171,459.92 € 2,260,755.46 35 3.9%
8.A.St € 1,120,711.56 € 1,271,654.17 85 11.9%
8.A.Pe € 1,364,280.67 € 1,658,903.99 25 17.8%
8.A.Po € 2,508,056.20 € 2,609,939.37 73 3.9%
9.A.St € 1,553,421.59 € 1,971,491.18 25 21.2%
9.A.Pe € 1,564,840.10 € 1,861,137.39 55 15.9%
9.A.Po € 2,914,253.73 € 3,061,657.47 102 4.8%
10.A.St € 1,813,114.82 € 2,567,634.08 15 29.4%
10.A.Pe € 2,064,648.69 € 2,915,976.70 15 29.2%
10.A.Po € 3,127,343.90 € 3,262,872.64 267 4.2%
Table 10: Results found by heuristic 2 for instances from 20x20 to 50x20
53
Instruction to run the code
This thesis is summited along with 4 julia files which contain the code. The files are named
following their purpose. The Optimal.jpynb is to solve optimally the problem, while the
Lowerbound.jpynb is to find the lower bound. The codes for the two heuristis are named
Heuristic1.jpynb and Heuristic2.jpynb.
The instances are organized in text file. The parameters are organized in the order below:
- Demands
- Returns
- Inventory holding cost for new products
- Inventory holding cost for returns
- Unit production cost for new product
- Unit production cost for remanufacturing product
- Time needed to produce one unit of product
- Time required to switch from one product to another
- Cost required to switch from one product to another
- Backorder cost
- The starting configuration
The code is designed to reuse, which makes it easier to switch from an instance to another.
Therefore, in the beginning of the code, there are some parameters we need to fulfill. The
parameters include the number of products N, the number of time periods T, and the number of
instance. Number of instance is showed in the table below, along with detail information about
the instances. In the Heuristic1.jpynb, parameters St and F also can be changed. Detail
explanation of the code and instruction will be given in every box of the code.
54
Instance Number NxT Demand pattern Capacity
type
First test 0 3x3
1.A.St 1 5x20 Stationary A
1.B.St 2 5x20 Stationary B
1.C.St 3 5x20 Stationary C
1.A.Pe 4 5x20 Peak in middle A
1.B.Pe 5 5x20 Peak in middle B
1.C.Pe 6 5x20 Peak in middle C
1.A.Po 7 5x20 Positive trend A
1.B.Po 8 5x20 Positive trend B
1.C.Po 9 5x20 Positive trend C
2.A.St 10 10x20 Stationary A
2.B.St 11 10x20 Stationary B
2.C.St 12 10x20 Stationary C
2.A.Pe 13 10x20 Peak in middle A
2.B.Pe 14 10x20 Peak in middle B
2.C.Pe 15 10x20 Peak in middle C
2.A.Po 16 10x20 Positive trend A
2.B.Po 17 10x20 Positive trend B
2.C.Po 18 10x20 Positive trend C
3.A.St 19 15x20 Stationary A
3.B.St 20 15x20 Stationary B
3.C.St 21 15x20 Stationary C
3.A.Pe 22 15x20 Peak in middle A
3.B.Pe 23 15x20 Peak in middle B
3.C.Pe 24 15x20 Peak in middle C
3.A.Po 25 15x20 Positive trend A
3.B.Po 26 15x20 Positive trend B
3.C.Po 27 15x20 Positive trend C
55
4.A.St 28 20x20 Stationary A
4.A.Pe 29 20x20 Peak in middle A
4.A.Po 30 20x20 Positive trend A
5.A.St 31 25x20 Stationary A
5.A.Pe 32 25x20 Peak in middle A
5.A.Po 33 25x20 Positive trend A
6.A.St 34 30x20 Stationary A
6.A.Pe 35 30x20 Peak in middle A
6.A.Po 36 30x20 Positive trend A
7.A.St 37 35x20 Stationary A
7.A.Pe 38 35x20 Peak in middle A
7.A.Po 39 35x20 Positive trend A
8.A.St 40 40x20 Stationary A
8.A.Pe 41 40x20 Peak in middle A
8.A.Po 42 40x20 Positive trend A
9.A.St 43 45x20 Stationary A
9.A.Pe 44 45x20 Peak in middle A
9.A.Po 45 45x20 Positive trend A
10.A.St 46 50x20 Stationary A
10.A.Pe 47 50x20 Peak in middle A
10.A.Po 48 50x20 Positive trend A