Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
The Pennsylvania State University
The Graduate School
College of Engineering
A MULTI-ECHELON FACILITY LOCATION MODEL
FOR A FOOD SUPPLY CHAIN USING BENDERS DECOMPOSITION
A Thesis in
Industrial Engineering
by
Rajeev Murugaswamy
Submitted in Partial Fulfillment
of the Requirements
for the Degree of
Master of Science
May 2011
ii
The thesis of Rajeev Murugaswamy was reviewed and approved* by the following:
Paul Griffin
Professor and Head of Industrial and Manufacturing Engineering
Thesis Advisor
A Ravi Ravindran
Professor of Industrial and Manufacturing Engineering
Vittal Prabhu
Professor of Industrial and Manufacturing Engineering
*Signatures are on file in the Graduate School
iii
ABSTRACT
For school children in Mexico, the cost of healthcare for obesity-related issues is increasing. The
Mexican government aims at incorporating healthy food habits among school children through a
National School Lunch Distribution Program, thereby reducing obesity-related health costs. For
this purpose, a food supply chain needs to be developed to transport different categories of food
from food growers to schools. One of the most important strategic problems to be addressed is to
design the location of distribution centers for the supply chain.
The objective of this thesis is to develop a facility location model to locate the distribution
centers for a food supply chain based on the idea of Mexican School lunch program. A multi-
commodity distribution network comprising farmers, distribution centers (DCs) and central
preparation kitchens (CPKs), is formulated using a mixed integer linear program for this
application. The CPKs are identified by grouping schools using clustering analysis based on their
proximity. The facility location model is then solved using Benders Decomposition algorithm for
different trial values with a maximum of 50 farmers, 50 DCs, 50 CPKs and 10 commodities. The
solution technique is implemented using MATLAB and the results are analyzed.
iv
TABLE OF CONTENTS
List of Figures .............................................................................................................................................. vii
List of Tables .............................................................................................................................................. viii
Acknowledgements ...................................................................................................................................... ix
CHAPTER 1: INTRODUCTION ......................................................................................................................... 1
1.1 Overview ....................................................................................................................................... 1
1.2 Problem Statement ....................................................................................................................... 2
CHAPTER 2: LITERATURE REVIEW ................................................................................................................. 3
2.1 Food Supply Chain ......................................................................................................................... 3
2.1.1 Conventional versus Food Supply Chain ............................................................................... 3
2.1.2 Characteristics of Food Supply Chain .................................................................................... 4
2.2 Global versus Local Food System .................................................................................................. 5
2.2.1 Global Food System .............................................................................................................. 5
2.2.2 Local Food System ................................................................................................................. 5
2.3 Environmental Intervention Strategies ......................................................................................... 6
2.3.1 Dietary Guidelines for Americans ......................................................................................... 7
2.3.2 Food Guide Pyramid .............................................................................................................. 7
2.3.3 National 5 A day for better health campaign ....................................................................... 8
2.4 National School Lunch Program (NSLP) ........................................................................................ 8
2.5 Research in Modeling Food Supply Chain ................................................................................... 10
2.6 Facility Location Problems .......................................................................................................... 12
2.6.1 Classification of Facility Location Problems ............................................................................... 13
2.6.2 Solution Approaches for Facility Location Problems .......................................................... 14
2.6.3 Research in Facility Location Problems ............................................................................... 16
CHAPTER 3: PROCESS METHODOLOGY ....................................................................................................... 18
CHAPTER 4: SUPPLY CHAIN DESIGN ............................................................................................................ 20
4.1 Supply Chain for Mexican School Lunch Program ...................................................................... 20
4.1.1 Farmers ............................................................................................................................... 20
4.1.2 Distribution Centers (DCs) .................................................................................................. 20
4.1.3 Central Preparation Kitchens (CPKs) ................................................................................... 21
v
4.1.4 Schools ................................................................................................................................ 21
4.2 Supply and Distribution Flow Structure ...................................................................................... 22
4.3 Assumptions for the facility location model ............................................................................... 23
CHAPTER 5: CLUSTER ANALYSIS .................................................................................................................. 24
5.1 Need for Clustering ..................................................................................................................... 24
5.2 Clustering in Location Analysis .................................................................................................... 24
5.3 K-means Clustering Algorithm .................................................................................................... 25
5.4 Demonstration of Cluster Analysis in SAS ................................................................................... 26
5.4.1 Methodology ....................................................................................................................... 26
5.4.2 Location Coordinates for Schools ....................................................................................... 26
5.4.3 SAS Output: Clusters ........................................................................................................... 28
5.4.4 Locations of CPKs ................................................................................................................ 29
CHAPTER 6: FACILITY LOCATION MODEL FORMULATION .......................................................................... 31
6.1 Model Formulation: Multiple Sourcing DCs ................................................................................ 31
6.1.1 Notation .............................................................................................................................. 32
6.1.2 Decision Variables ............................................................................................................... 32
6.1.3 Objective Function .............................................................................................................. 32
6.1.4 Constraints .......................................................................................................................... 33
CHAPTER 7: BENDERS DECOMPOSITION HEURISTICS ................................................................................ 35
7.1 Benders Decomposition .............................................................................................................. 35
7.2 Benders Algorithm ...................................................................................................................... 36
7.3 Benders Algorithm in MATLAB .................................................................................................... 40
7.4 Analysis of Results ....................................................................................................................... 43
7.4.1 Benders Algorithm .............................................................................................................. 43
7.4.2 MILP .................................................................................................................................... 44
7.5 Sensitivity Analysis ...................................................................................................................... 46
7.5.1 Throughput Limit: 400 to 550 units .................................................................................... 46
7.5.2 Throughput limit: 350 to 500 units ..................................................................................... 47
CHAPTER 8: CONCLUSION AND FUTURE WORK ......................................................................................... 49
8.1 Limitations of the model ............................................................................................................. 49
8.2 Summary of Contributions .......................................................................................................... 50
8.3 Future scope ............................................................................................................................... 50
vi
REFERENCES ................................................................................................................................................ 51
APPENDIX A: ................................................................................................................................................ 55
I.SAS Code for Clustering Analysis........................................................................................................... 55
II.SAS Output: Clusters of Schools with Cluster membership ................................................................. 56
III.SAS Output: Cluster Means and Cluster Graph for Trial 2 values ....................................................... 60
IV.SAS Output: Cluster Means and Cluster Graph for Trial 3 values ....................................................... 61
V.SAS Output: Cluster Means and Cluster Graph for Trial 4 values ........................................................ 62
APPENDIX B: ................................................................................................................................................ 64
I.MATLAB Code for Benders Decomposition .......................................................................................... 64
II.MATLAB Output: DC Locations for Trial 1 values ................................................................................. 69
III.MATLAB Output: DC Locations for Trial 2 values ................................................................................ 72
APPENDIX C ................................................................................................................................................. 81
I.MATLAB Code for solving MILP ............................................................................................................. 81
II.MATLAB Output: .................................................................................................................................. 92
vii
LIST OF FIGURES
Figure 1: Conventional Supply Chain ........................................................................................................... 3
Figure 2: Food Supply Chain ........................................................................................................................ 3
Figure 3: Classification of Supply Chain Models [Min and Zhou 2002] ................................................... 10
Figure 4: Multi-facility Location Methods ................................................................................................. 14
Figure 5: Process Methodology .................................................................................................................. 18
Figure 6: Supply Chain Flow for School Lunch ......................................................................................... 20
Figure 7: Distribution Flow Structure for School Lunch ............................................................................ 22
Figure 8: Process Methodology for cluster analysis ................................................................................... 26
Figure 9: Map of Mexico showing the limits of coordinates ...................................................................... 27
Figure 10: SAS Output for Clustering Analysis ......................................................................................... 28
Figure 11: Map of Mexico showing locations of CPKs - potential sites for DCs....................................... 30
Figure 12: Model for facility location problem........................................................................................... 31
Figure 13: Process Methodology for Benders Decomposition ................................................................... 36
Figure 14: Convergence of Upper bound and Lower bound ....................................................................... 37
Figure 15: Qijkl Distribution graph for commodity 1 ................................................................................... 44
viii
LIST OF TABLES
Table 1: Cost of Healthcare in Mexico ......................................................................................................... 1
Table 2: Trial values for clustering analysis ............................................................................................... 28
Table 3: Cluster centers and their corresponding locations ........................................................................ 29
Table 4: Trial values of input parameters ................................................................................................... 40
Table 5: Processing times in seconds .......................................................................................................... 43
Table 6: Values of Qijkl for throughput limit 400 to 550 units .................................................................... 46
Table 7: Values of Qijkl for throughput limit 400 to 550 units .................................................................... 47
ix
ACKNOWLEDGEMENTS
I would like to take this opportunity to thank everyone, who has helped me in the successful
completion of this thesis.
First and foremost, I owe my deepest gratitude to my advisor Dr. Paul Griffin for his guidance,
encouragement and support throughout my thesis. He extended his support in a number of ways
and remained as a source of inspiration and motivation.
It‟s a pleasure to thank Dr.A.Ravi Ravindran, who accepted to be a reader for this work. I
definitely gained valuable knowledge from his courses, which helped me in this thesis.
I would like to express my sincere gratitude to Dr.Vittal Prabhu, who provided valuable
suggestions to select this field of research and accepted to be a reader.
I‟m indebted to many of my colleagues and friends, who helped me during the course of this
thesis, through their suggestions and pep talks.
Lastly, I would like to thank my mother, sister and brother-in-law for their ever-lasting love and
faith on me. That served as a constant motivation to complete my thesis.
1
CHAPTER 1: INTRODUCTION
1.1 Overview
In Mexico, 26% of school children are obese and overweight, which is attributed to unhealthy
food habits. The cost of healthcare to treat obesity and its consequences is found to be an
increasing trend as shown below:
Year Cost of Healthcare for Obesity
2000 35 Billion pesos
2008 68 Billion pesos
2017 167 Billion pesos (estimated)
Table 1: Cost of Healthcare in Mexico
The Ministry of Public Education has initiated a National School Lunch Distribution Program
called PRONAES. The objective of PRONAES is to prevent the overweight and obesity among
school children 4 to 15 years old by incorporating healthy food habits into their school lunch
distribution program.
The School Lunch Program offers plenty of scope to design a food supply chain with problems
in the areas of supplier selection, distribution network, facility location, transportation, logistics,
etc. The focus of this work is to design the food supply chain and model the facility location
problem for locating the distribution centers. A secondary objective is to study the food supply
chain and its characteristics, environmental intervention strategies, National School Lunch
Program in USA and supply chain models in literature. This provides a good understanding of
the supply chain for the Mexican School Lunch Program.
2
1.2 Problem Statement
The problem is to develop a multi-commodity, multi-echelon facility location model to identify
the locations of distribution centers for a food Supply Chain, as in Mexican School lunch
distribution program. This problem requires supply chain partners in different echelons to be
defined, with other assumptions for satisfying demand. A sub-problem is to identify the locations
of customer zones which have aggregated demand as the individual customers.
In the literature, single sourcing of DCs is generally assumed, i.e. a customer zone is served only
by one dedicated DC. In this problem, the DCs are considered as multiple-sourcing to the
customers i.e. multiple DCs can serve a single customer zone. This assumption is based on the
perishability and seasonality factors inherent in the food supply chain.
The remainder of this thesis is organized as follows: The literature is reviewed in Chapter 2
explaining the characteristics of food supply chain, National School Lunch program,
classification of supply chain models and facility location models. In Chapter 3, the process
methodology followed is presented. Chapter 4 explains the design of the food supply chain.
Clustering analysis is presented in Chapter 6 and facility location model formulation is
developed in Chapter 7. In Chapter 8, Benders Decomposition heuristics with equations are
specified and the results of the solution implemented in MATLAB are analyzed. Lastly, Chapter
9 concludes the thesis mentioning the limitations of the model and future scope.
3
CHAPTER 2: LITERATURE REVIEW
2.1 Food Supply Chain
2.1.1 Conventional versus Food Supply Chain
A Supply Chain can be defined as “all the activities involved in delivering a product from raw
material through to the customer including sourcing raw materials and parts, manufacturing and
assembly, warehousing and inventory tracking, order entry and order management, distribution
across all channels, delivery to the customer, and the information systems necessary to monitor
all of these activities” [1]. Supply chain management is the process that integrates and
coordinates all the activities involved in the movement of raw material from suppliers until the
final delivery of the product to the customer.
Figure 1: Conventional Supply Chain
Figure 2: Food Supply Chain
The term „food chain‟ refers to the total supply process from agricultural production, harvest or
slaughter, through primary production and/or manufacturing, to storage and distribution, to retail
sale or use in catering and by consumers [2]. A food supply chain is a more dynamic and
complex system as it involves food safety, quality and temperature requirements, which directly
affect consumers. Although the overall supply chain structure is similar, supply chain partners
Farmer / Food
Grower Harvesting
Food Processor
Distributor Retailer /
Food Preparer
Food Consumer
Extraction of Raw Materials
Supplier Manufacturer Distributor Retailer Consumer
4
for a food product differ from a conventional supply chain. The food supply chain starts from a
farmer or food grower, through to food harvest, food processing, distribution and finally to
consumer. In some cases, the supply chain involves a food preparer as in restaurants, worksite
canteens or other similar institutions.
2.1.2 Characteristics of Food Supply Chain
Fisher [3] states that the nature of a product‟s demand needs to be considered before devising a
supply chain. Due to the predictable demand patterns, globalization of food markets and the
presence of competitive retailers, a food product can be considered as a functional product and
hence infer that an efficient supply chain is suitable for food products. However, a food supply
chain cannot be categorized as an efficient or responsive supply chain based on the demand
patterns. The nature of food consumer demand determines the characteristics of the food supply
chain. A food consumer demands chilled and fresh food, products with short shelf-life, own-label
food products, seasonal, regional and specialty foods at a low price [4]. Based on these demand
characteristics, a food supply chain should have the following characteristics: refrigerated
storage and transportation to supply safe and healthy food, time-critical environment, cross-
docking to reduce shelf-life, technology to measure and maintain food quality and information
technology to support the movement of products and smooth coordination in the supply chain.
Also, when designing the distribution, transportation and inventory models of the supply chain,
food characteristics such as perishability, fresh or processed food need to be considered.
5
2.2 Global versus Local Food System
2.2.1 Global Food System
Global food can be understood as an integrated retail/wholesale buying system in which sources
within a country or across countries supply food products through retail supermarkets,
restaurants, and other institutional markets served by distributors. This usually involves longer
travel distances and associated higher fuel use and emissions [5]. Though local food system was
used in earlier days, global system gained popularity as a result of globalization, seasonality,
cheaper prices in certain parts of the world, etc.
2.2.2 Local Food System
Local food can be understood as food that is produced, processed, and distributed within a
particular geographic boundary that consumers associate with their own community [6].
According to the definition adopted by the U.S. Congress in the 2008 Food, Conservation, and
Energy Act (2008 Farm Act), the total distance that a product can be transported and still be
considered a “locally or regionally produced agricultural food product” is less than 400 miles
from its origin, or within the State in which it is produced”.
Based on the market arrangements that reach the final consumer, the local food can be classified
as:
1. Direct-to-consumer marketing
A local food marketing arrangement in which producers sell agricultural products directly
to the final consumers, such as sales-to-consumers, through farmers‟ markets, CSAs
(Community Supported Agriculture) or farm-stands.
2. Direct-to-retail / foodservice marketing
6
A local food marketing arrangement in which producers sell agricultural products directly
to the final sellers, such as sales-to-restaurants, supermarkets, or institutions, like schools
and hospitals. Farm-to-school program connect schools with local farms to supply fresh,
local produce in order to improve student nutrition, educate students about food and
health, support local and regional farmers and the economy of the local community.
2.3 Environmental Intervention Strategies
Story et al [7] present an ecological framework to explain the significance of various food eating
environments and their interactions with people. A person‟s individual behavior to make healthy
food choices can occur only in an environment which has access to healthy food. The food
environment influences what people eat and hence environmental intervention strategies can help
improve the healthy eating behavior of people. Children consume at least two meals, plus snacks
in schools [8]; the school food environment affects what children eat and how much they eat.
Hence the school food environment provides many opportunities to deploy intervention
strategies to prevent obesity in children.
A study by European Commission [9] reviewed the effectiveness of school intervention schemes
in promoting the consumption of fruits and vegetables among school children. The results
showed a significant increase in the intake of fruits and vegetables. In addition, the schemes
influenced healthy eating behavior for a long time. The results suggest there is no overall
decrease in intake of fruits and vegetables after intervention programs in any of the studies.
Hence effective intervention strategies deployed in the school food environment can help reduce
the epidemic of obesity and overweight related health problems among children by increasing
healthy intake of food. Another study in Finland [10] observed that around 70-90% of school
7
children eat school lunch. The results showed that children eating school lunch tend to make
food choices closer to nutritional recommendations when compared to those students not eating
school lunch in the same proportion.
The following are some of the nutritional intervention and guidelines that help to pass the
message to people and create awareness about health and nutrition:
2.3.1 Dietary Guidelines for Americans
The Dietary Guidelines for Americans [11] is published by U.S. Department of Health and
Human Services (HHS) and the U.S. Department of Agriculture (USDA) every five years to give
science-based advice on food and physical activity choices for health [DGA 2005
http://www.health.gov/dietaryguidelines/]. These guidelines are used by policy makers, nutrition
educators, nutritionists, healthcare providers and general public. The purpose of Dietary
Guidelines is to encourage people to eat fewer calories, remain more active and make healthier
and wiser food choices. It contains nutrition information, calorie needs, and recommendations
for nutrition intake, etc.
2.3.2 Food Guide Pyramid
The Food Guide Pyramid [12] is a pyramid-shaped visual guidance tool to help people consume
food from different groups of food. The pyramid also suggests different food from each of the
groups. It serves as a guide to eat healthy as per the recommendations of Dietary Guidelines for
Americans. Also, it helps to plan menu choices for different consumer preferences to align with
the goals of each group of food.
8
2.3.3 National 5 A day for better health campaign
The National 5 A Day Program [13] gives a theory-based message to people to eat five or more
servings of fruits and vegetables daily for more than 10 years [14].
2.4 National School Lunch Program (NSLP)
The National School Lunch Program (NSLP) was established in the United States under the
National School Lunch Act in 1946 “to safeguard the health and well-being of nation‟s children,
encourage domestic consumption of nutritious agricultural commodities, by assisting states
through grants-in-aid and providing adequate supply of food and other facilities for the operation
and maintenance of non-profit school lunch programs” [15]. The main purpose behind the
development of this program was to alleviate the malnutrition and poverty among the nation‟s
children by providing school meals. Due to the excessive costs incurred by school districts for
equipment, infrastructure and labor to provide school meals, there was a need for permanent
federal funding to assure the continuity of the program over a period of years and NSLP served
this purpose.
Following the success of NSLP and the research contributions in nutrition, the Child Nutrition
act was passed in 1966. The purpose of this program was to strengthen NSLP under the authority
of the Secretary of Agriculture to meet more effectively the nutritional needs of the children. The
school food service funds were transferred from several federal agencies to USDA (United States
Department of Agriculture). This unifying of school food services under one agency helped to
achieve uniform standards of nutrition, management of funds and assurance of program
continuity. Also, another amendment of National School Lunch Act in 1970 set the uniform
national guidelines for determining eligibility criteria for free and reduced-price school lunches
9
based on the income level of the families. More changes in 1990 required the NSLP to meet the
nutrition requirements of Dietary Guidelines for Americans [16].
Recently, the NSLP is more focused on addressing the problem of obesity and overweight
among children by providing nutritionally balanced, reduced-price or free lunches to school
children every day. Any child in a school participating in NSLP can purchase meals for free or at
reduced price through this program. Children from families whose income level is below 130
percent of the poverty level are eligible for free lunches. Children from families whose income
level is between 130 percent and 185 percent of the poverty level are eligible for reduced-price
lunches [17]. Children from families whose income level is over 185 percent of poverty level
need to pay full-price. In 2009, the NSLP was operating in over 101,000 public and non-profit
private schools providing lunches to more than 31 million children [18] each school day. The
USDA offers cash subsidies and donated commodities to participating schools in order to serve
school lunches as per the recommended nutritional guidelines.
As per the School Food Purchase study by USDA [19] in 1998, the food acquisition for NSLP
was classified as: commercially-purchased, USDA-donated commodities, processed food
products containing donated commodities among which 83% were from commercial purchases.
The food purchasing behavior was influenced by school participation size, access to markets,
availability of vendors, storage capacity, etc. Large school districts were involved in high volume
purchases compared to small school districts.
10
2.5 Research in Modeling Food Supply Chain
Min and Zhou [20] discuss that a supply chain model should be reflective of the real-world
dimensions, yet not too complex to solve. Hence a model builder must compromise between
reality and model complexity. The key components of supply chain modeling are to identify the
supply chain drivers, supply chain constraints and supply chain decision variables. They classify
supply chain models as follows: i) deterministic models ii) stochastic models iii) hybrid models
iv) IT-driven models.
Figure 3: Classification of Supply Chain Models [Min and Zhou 2002]
While designing a supply chain, efficiency and responsiveness aspects of the logistics are built
into the model, whereas product quality is assumed not to influence the design. However, in the
case of a food supply chain, the product quality is intrinsic to the supply chain. Van der Vorst et
al [21] discuss about the specific requirements for modeling a food supply chain. A food supply
chain needs to preserve the food quality through the use of sophisticated environmental
conditioning techniques and the reduction of lead times. They developed an integrated
simulation modeling approach to design a food supply chain based on food quality and
sustainability in addition to logistics. A simulation environment is developed to implement this
11
model and analyze the results. It is found that incorporating quality and sustainability has
improved the quality and speed of decision making.
Georgiadis et al [22] present a comprehensive model for addressing strategic issues in a food
supply chain, specifically capacity planning issues. A System Dynamics (SD) methodology is
employed for modeling and simulation of a dynamic system. SD approach incorporates casual
loop diagrams with stock and flow variables to model the system and provides useful qualitative
insights. Mathematically, the stock-flow diagram can be transformed into a system of differential
equations and numerically solved by simulation. A generic single-echelon model is presented
using this approach and is extended into a multi-echelon model. This model can be used to
identify effective policies and optimal strategies for strategic decision making problems.
The use of time-dependent quality information to design distribution systems for perishable food
is scarce in literature. Giannakourou et al [23] proposed a Time Temperature Integrators (TTI)
based distribution management system to monitor the quality status of the food products. The
least-shelf-life-first-out (LSFO) system based on time-dependent information is demonstrated
using Monte Carlo simulation and the results showed minimization of rejected products at the
consumer end.
The challenge in the food supply chain is to maintain the logistics performance when handling
temperature sensitive and perishable products (TSPP), which require shorter delivery times and
sophisticated storage and transportation systems. Cold Chain Management (CCM) for handling
the logistics of TSPP is discussed by Ju-Chia Kuo et al [24]. A Multi-temperature joint
distribution (MTJD) model is proposed to handle multiple products with different temperature
requirements with the objective of balancing between quick deliveries and diversifying goods. It
12
uses cold chain equipment such as cold boxes, cold cabins, eutectic plates, etc. to enable storage
and distribution of products with different temperatures in same warehouses and trucks. This
integrates the processes and provides one-stop logistics for different categories of food.
Cross Docking Logistics (CDL) is an advanced logistics distribution strategy, which has the
advantages of Cross Docking and information based Systems. The application field of food cold
supply chain involves perishable products with strict requirements of time and low temperature.
Qiu Qijun et al [25] propose a new model of CDL consisting of information, transportation and
distribution module, to achieve the advantages in time, cost and space.
2.6 Facility Location Problems
One of the most important strategic problems when designing a supply chain is the design of its
physical distribution system, which involves the outbound logistics of products from
manufacturers to consumers. A location problem is a spatial resource allocation problem. In the
general location paradigm, one or more service facilities serve a spatially distributed set of
demands. The objective of a location problem is to identify the location of distribution facilities
such that it minimizes the costs or the distances involved or maximizes the customer
responsiveness. Following are some of the facility location decisions to be considered [26]:
Number of facilities
Location of facilities
Size of facilities
Vendor to warehouse mapping
Warehouse to customer mapping
Products stored in Warehouses (Small orders)
Products directly shipped by Vendors (Large orders)
13
2.6.1 Classification of Facility Location Problems
Facility location problems for distribution planning can be classified as follows:
1) Continuous and Discrete: A location problem which explores every possible location
along a space continuum or plane is referred to as a continuous location problem; a
location problem which selects from a finite set of potential candidate facilities is referred
to as a discrete location problem.
2) Capacitated and Uncapacitated: A facility without capacity constraints is uncapacitated
and there is no restriction on demand allocation; a facility with a capacity limit is referred
to as capacitated. A capacitated facility location problem needs to be examined for single-
sourcing or multiple-sourcing.
3) Single-stage and Multi-stage: The distribution of products from only one stage of supply
chain to the customers is termed as single-stage location problems; the distribution of
products through more than one stage of supply chain, for instance, manufacturer to
customer via distributor, is termed as multi-stage location problems.
4) Single-commodity and Multi-commodity: In single-product models, the demand, cost
and capacity for several products can be aggregated into a single homogeneous product.
If the products are inhomogeneous, the demand and capacity for each product needs to be
considered separately in the model.
5) Deterministic and Stochastic: If the inputs to the model are known with certainty, they
are called deterministic models; if the model inputs are uncertain, they can be assumed to
14
follow a probability distribution which is closest to their property and are called
stochastic models.
6) Static and Dynamic: The location problems modeled for one representative period are
called static; the dynamic models reflect cost, demand, capacities, etc. varying over time
within a given planning horizon.
2.6.2 Solution Approaches for Facility Location Problems
Following are the methods to solve the multi-facility location problems [26]:
1. Optimization Methods
2. Simulation Methods
3. Heuristic Methods
Figure 4: Multi-facility Location Methods
1. Optimization Methods
Optimization methods result in a mathematically optimum solution or a solution of known
accuracy to a location problem. They can be considered as an ideal approach to a location
problem, but they prove to be useful only when the problem size is small. This approach
becomes computationally complex when applied to problems of large size, which are the case in
Multifacility Location Methods
Optimization Methods
Simulation Methods Heuristic Methods
15
many real world problems. Hence it may result in lengthy processing times and a compromised
problem definition.
Mixed Integer Linear Programming (MILP) is another mathematical modeling approach which can
handle fixed costs with integer variables. The model is formulated with an objective function such as
minimizing the sum of transportation costs, fixed warehouse costs and handling costs and constraints such
as supplier capacity, customer demand and warehouse throughput. When the problem size is very large,
MILP models may require heuristics to obtain the solution quickly.
2. Simulation Methods
Simulation methods result in sub-optimum solutions to an accurately described problem. This is
particularly useful when handling some real world problems, which require accurate description. In this
case, a sub-optimum solution to an accurate problem description is preferred over an optimum solution to
an approximate problem description. A simulation facility location model refers to a mathematical
representation of a logistics system by algebraic and logic statements manipulated by computer. The
solution is found by repeatedly running the simulation model with different warehouse and allocation
options. However, this requires high degree of skill and intuition from the user.
3. Heuristic Methods
Heuristics are concepts based on experience and intuition that guide in problem solving and reduces the
average time to search for a solution. In location problems, heuristics provide insight into the solution
process, and allow good solutions to be obtained quickly from several alternatives. Some heuristics
include, drop heuristics, Lagrangian relaxation, Benders Decomposition, Dantzig-Wolfe decomposition,
etc.
16
2.6.3 Research in Facility Location Problems
Location Theory was first introduced by Weber, who considered the problem of locating a single
warehouse which minimizes the travel distance between the warehouse and a set of spatially
distributed customers. He proposed a material index, to select the location, which if greater than
one, the warehouse should be in closer proximity with the source of raw material or it should be
closer to the market. Francis et al [27], in a survey of locational analysis, reviewed four different
classes of location problems: i) continuous planar ii) discrete planar iii) mixed planar iv) discrete
network.
Many research works have been carried out both in continuous and discrete optimization
problems. Aikens [28] discussed mathematical models for different classifications of location
problems. Brandeau et al [29] presented an overview of different types of location problems,
which have been formulated as optimization problems. A classification scheme is proposed to
categorize location problems along various criteria and finally solution approaches to location
problems are discussed. Hansen et al [30] presented the Big Square Small Square (BSSS)
technique to find the global optimum for continuous planar location problems. Drezner and
Suzuki [31] improved upon the BSSS by replacing the squares with triangles and proposed Big
Triangle Small Triangle (BTST) technique for global optimization of continuous location
problems. This technique requires the construction of bounds to the value of the objective
function to make it efficient.
Klose and Drexl [32] surveyed continuous location models (single-facility and multi-facility
weber problem), network location models (p-median and p-center problem) and mixed integer
programming models (capacitated, uncapacitated, multi-stage, multi-commodity, dynamic,
17
stochastic) with their mathematical formulations. Nozick et al [33] developed an integrated
discrete location model to locate distribution facilities for an automobile manufacturer in US.
The model considered all the demand points as candidates for facility sites and integrated facility
costs, inventory costs, transportation costs and customer responsiveness. The solution presented
multiple outputs with tradeoffs between cost and service to aid in decision-making.
Geoffrion and Graves [34] formulated a mixed integer linear program to design the distribution
system for a multi-commodity, multi-echelon problem. They were among the first to develop a
solution technique to solve this class of problems and implement it on a real world problem.
They used Benders Decomposition algorithm to solve by considering the linear programming
subproblem and decomposing it into independent transportation problems. Hindi and Basta [35]
discussed a two-stage multi-commodity location problem, in which the stages from supplier to
warehouse and warehouse to customer are addressed through separate variables and combined in
the formulation. They modeled the problem using mixed integer linear programming formulation
and solved it using branch and bound procedure to find the locations of warehouses and the
shipping schedule. Pirkul and Jayaraman [36] performed a computational study on a PLANWAR
model, a mixed integer programming model for multi-commodity, multi-echelon location
problem. They proposed an efficient heuristic based on Lagrangian relaxation of the problem,
which simplifies the problem by relaxing some of the constraints and introducing a penalty
function.
18
CHAPTER 3: PROCESS METHODOLOGY
The objective is to identify the location of DCs using facility location model, by considering the
Mexican School Lunch Program as the application. As a first step, the supply chain for this
problem is to be defined. Secondly, the demand points are aggregated using clustering analysis
based on their proximity. The facility location model is then formulated using mixed integer
linear programming (MILP) and the model is solved using Benders Decomposition algorithm.
The solution is obtained using MATLAB and finally the results are analyzed. The steps involved
in the process are mentioned in Figure 5.
Figure 5: Process Methodology
1. Define the supply chain partners, stages and
assumptions
2. Aggregate the demand points using clustering
analysis
3. Formulate the facility location model using MILP
4. Solve the model using Benders Decomposition
Algorithm
5. Analyze the results
19
The Process methodology is explained below:
Step 1:
The supply chain structure for the problem is defined which includes the terminologies,
suppliers, customers, stages in the distribution network and assumptions. This serves as the basis
in obtaining the variables and other parameters when formulating the model.
Step 2:
Clustering analysis is carried out in SAS to identify the location of central preparation kitchens
(CPKs) for clusters of schools. In this way, the demand is aggregated from schools to CPKs. The
CPKs thus identified serve as customers for the DCs. Also, the CPKs are considered as potential
candidates for the location of DCs. Hence there is a location problem to be solved to identify the
number and location of DCs.
Step 3:
The problem at hand is a discrete optimization problem, with a finite set of candidate DCs, which
are assumed to be all the demand points, i.e. CPKs. This location problem is formulated as a
mixed integer linear programming model, the objective of which is to minimize the
transportation costs and the fixed DC costs.
Step 4:
The model thus formulated is solved using Benders Decomposition algorithm, a heuristic to
solve large scale optimization problems of this class. The algorithm is implemented using
MATLAB.
Step 5:
The solution is analyzed and the results are discussed to gain useful insights.
20
CHAPTER 4: SUPPLY CHAIN DESIGN
4.1 Supply Chain for Mexican School Lunch Program
The general supply chain for Mexican School Lunch program is defined as shown in Figure 6.
The supply chain starts with farmers growing the food produce. The produce from farmers are
aggregated to supply the distribution centers (DCs). The DCs supply the Central Preparation
Kitchens (CPKs) based on their demand. The CPKs prepare and serve food to a group of schools
which are located in close proximity.
Figure 6: Supply Chain Flow for School Lunch
4.1.1 Farmers
Farmers grow organic produce and crops that are natural to the geographic location. Each farmer
grows several commodities with a specific agricultural production capacity. The DCs are
supplied from a set of local farmers that are dedicated to the DC served.
4.1.2 Distribution Centers (DCs)
Distribution centers act as intermediary between the suppliers and customers. Each DC has a
range of throughput that can be handled. The throughput is common across all commodities
Farmers DCs CPKs Schools
FLOW OF PRODUCT
FLOW OF DEMAND
21
based on an intensity factor. The produce received from farmers are sorted and distributed to
CPKs to satisfy the demand.
4.1.3 Central Preparation Kitchens (CPKs)
Central Preparation Kitchens are involved in the process of cutting, cleaning, cooking, portioning
and packing the fresh produce supplied by the distribution centers. After processing of food, the
cooked food is transported warm in special boxes daily to the schools. This necessitates the
location of central preparation kitchens within close proximity to the schools. Also, other ready-
to-eat food, snacks and beverages are transported corresponding to the demand from schools.
4.1.4 Schools
The schools are the end consumer of the food. Each school has a demand that is satisfied by
CPKs. The activities carried out in a school depend upon the infrastructure.
Schools with Kitchens
The processes carried out are cooking/heating of sandwiches, soup, meat, etc. before serving. All
other items such as beverages, snacks and fruits are served from storage.
Schools without Kitchens
The processes carried out are serving beverages, snacks and fruits from storage. The hot food is
received from CPKs daily for serving. It is assumed that hot meal is served at lunch time. Hence
supply reaches the school within a time window before the lunch time.
In the problem under consideration, all schools are assumed as without kitchens to allow for
uniformity in supply.
22
4.2 Supply and Distribution Flow Structure
Figure 7: Distribution Flow Structure for School Lunch
The structure of the supply and distribution is devised based on the problem under consideration.
The farmers are assumed local to DCs, since the Mexican School Lunch Program aims at
obtaining organic produce from local farmers. The DCs distribute the food products to the
Central Preparation Kitchens (CPK). It is assumed that a DC can serve many CPKs and a CPK
Distribution
Centers (DCs)
Central Preparation
Kitchens (CPKs) Schools Farmers
CPK 1
CPK 2
CPK 3
CPK 4
Farmer 1
DC 1
DC 2
Farmer 2
Farmer 3
Farmer 4
Farmer 1
Farmer 2
Farmer 3
Farmer 4
Cluster Analysis
Facility Location Model
23
can receive from many DCs in order to satisfy demand at CPKs. The multi-sourcing from DCs
assumed here is not so common but the application demands it due to food perishability and
seasonality. Finally, the CPKs cater to the demand of a fixed set of schools.
The CPKs are identified using cluster analysis and assigned to schools within close proximity.
Once the CPKs are thus established, the resulting distribution system is formulated as a facility
location model with the CPKs as customers.
4.3 Assumptions for the facility location model
The facility location model is a discrete optimization problem with the potential candidate sites
for DCs given. The assumptions are as follows:
1. A multi-facility location model for which number of DCs are specified by „p‟.
2. A multi-echelon model with farmers to DCs to CPKs.
3. A multi-commodity distribution model involving a maximum of 10 commodities.
4. A capacitated plant model with limited agricultural production capacities for farmers.
5. The time horizon is static.
6. A farmer supplies produce through 1 DC only i.e. dedicated farmers to DCs.
7. The DCs are assumed as multiple-sourcing, i.e. 1 CPK can be served by more than 1 DC.
24
CHAPTER 5: CLUSTER ANALYSIS
5.1 Need for Clustering
A location problem with candidate sites specified is a discrete location problem, whereas the
problem without any potential sites necessitates finding locations anywhere in a continuous
space [37]. The solution to a continuous problem is based on distance and as the solution can be
anywhere in the space, it‟s difficult to establish bounds for the search space and iterative
procedures may not converge. A discrete location problem is considered for this application,
which requires a set of potential candidate sites to choose the facilities which optimize the
objective. But, only customer locations i.e. locations of schools are given for this problem.
Hence cluster analysis is used to identify the potential candidate sites for DCs based on the
locations of schools.
5.2 Clustering in Location Analysis
Clustering is the process of grouping items by similarities among any of the attributes of the
items. The items within a cluster have a high degree of association between them whereas the
items in different clusters are distinct from one another [37]. Clustering is used in location
analysis to group the individual demand points into aggregated customer zones. In our problem,
the individual demands at schools can be transferred into aggregated demand at Central
Processing Kitchens (CPKs) by grouping schools based on their proximity. The objective of
clustering is to identify the locations of CPKs, identified by cluster centers and the schools
served by them, identified by cluster membership. The locations of CPKs, in turn, are used as the
potential candidate sites for the locations of DCs in the facility location problem.
25
Following assumptions are considered while performing clustering:
1) It is to be figured out whether the observations need to be standardized or not. This is
done to ensure a common unit of measure among the items being clustered. In our case,
the values of items are coordinates of locations of schools in latitudes and longitudes.
2) When the items are allowed to be members of more than one cluster, it is called
overlapping clusters. In our case, exclusive clustering is considered, with schools within a
cluster served exclusively be a single CPK, represented by that cluster.
3) Finally, the clustering method is chosen. There are two methods of clustering:
hierarchical and non-hierarchical. K-means clustering, a non-hierarchical method is
chosen to cluster the items. This is an iterative distance based clustering which is
explained below.
5.3 K-means Clustering Algorithm
Step 1: Specify the number of clusters based on logical intuition
Step 2: Specify the initial cluster centers arbitrarily
Step 3: Group all the items to their nearest cluster center using Euclidean distance
Step 4: Find out the centroids of each cluster (mean of distances of all the items to the
corresponding cluster center)
Step 5: Consider the centroids as new cluster centers
Step 6: The process is continued iteratively until two consecutive iterations result in the same
cluster centers
Note: This algorithm as presented only works if the number of clusters is specified in advance.
26
5.4 Demonstration of Cluster Analysis in SAS
5.4.1 Methodology
Figure 8: Process Methodology for cluster analysis
K-means Clustering is carried out in SAS by using the FASTCLUS procedure. First, the
coordinates (in latitudes and longitudes) of the locations of schools are fed as input for cluster
analysis. In this problem, the coordinates are generated randomly within the limits of Mexico.
The number of clusters „K‟ is specified and the FASTCLUS procedure forms the clusters using
the K-means algorithm. The cluster centers obtained in the output are the coordinates of the
locations of CPKs. The cluster membership of the schools represents the cluster to which they
belong to. In this section, cluster analysis is demonstrated by selecting the coordinate points
randomly.
5.4.2 Location Coordinates for Schools
In the real scenario, the actual location coordinates of schools can be fed into SAS in a
spreadsheet or notepad file and cluster analysis is performed on this data. To generate the
coordinates with a close match to the real scenario, four rectangles are plotted in the map of
Mexico to obtain the limits for coordinates. Figure 10 shows the four regions in the map for
limits of coordinates.
Input coordinates of
schools
Specify number of clusters
Form clusters using K-Means
in SAS
Identify cluster center and cluster
membership
Obtain the locations of
cluster centers
27
Figure 9: Map of Mexico showing the limits of coordinates
The coordinate boundaries are:
1) Latitude: 26 to 31; Longitude: -106 to -110
2) Latitude: 20 to 29; Longitude: -101 to -105.5
3) Latitude: 19.5 to 26; Longitude: -97.5 to -100
4) Latitude: 17.5 to 19.5; Longitude: -96.5 to -102
For each region, the number of observations are selected in proportion to the size of the region.
The random numbers for coordinates of each region are generated in SAS with a uniform
distribution for the ranges obtained. The trial values assumed for clustering are mentioned in
Figure 11. For this demonstration, trial 1 is considered. In this instance, 250 schools are to be
served by the lunch program and it is assumed that 10 CPKs are allotted with about 25 schools
served by a single CPK. The locations of CPKs and thus the potential sites for DCs is found by
clustering using SAS with 10 clusters of CPKs and the schools served by them.
1
2
3
4
28
Trial Schools CPKs Potential DCs
1 250 10 10
2 500 20 20
3 750 30 30
4 1000 40 40
5 2500 100 100
Table 2: Trial values for clustering analysis
5.4.3 SAS Output: Clusters
The FASTCLUS Procedure
Replace=FULL Radius=0 Maxclusters=10 Maxiter=10 Converge=0.02
Cluster Means
Cluster x y
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
1 29.7281353 -108.2687411
2 25.2368048 -98.9485047
3 23.6449432 -102.9057181
4 21.2236815 -103.6562666
5 27.1764116 -107.6110550
6 27.9185067 -102.1327145
7 19.2491701 -98.0465284
8 22.5571665 -98.2537562
9 18.7900919 -100.4461423
10 26.8725068 -104.6037309
Figure 10: SAS Output for Clustering Analysis
29
The cluster means and the clustering graph for trial 1 obtained in the SAS output is shown in
Figure 12. The entire SAS code and the output for other trial values are attached in Appendix A.
The 250 observations are grouped in 10 clusters as shown in the output. The cluster means
obtained represent the coordinates for the locations of cluster centers, which are the locations of
CPKs. These need not be the exact coordinates, but a feasible location in close proximity to
them.
5.4.4 Locations of CPKs
The cluster means obtained in the SAS output are used to identify the locations of CPKs. The
locations are obtained using Google maps, which are given in Figure 13.
1 29.7281353 -108.2687411 Near Madera, Chihuahua
2 25.2368048 -98.9485047 Near Linares, Nuevo Leon
3 23.6449432 -102.9057181 Near Fresnillo, Zacatecas
4 21.2236815 -103.6562666 Near Tequila, Jalisco
5 27.1764116 -107.6110550 Near Guachochi, Chihuahua
6 27.9185067 -102.1327145 Near Sabinas, Coahuila
7 19.2491701 -98.0465284 Near Huamantla, Tlaxcala
8 22.5571665 -98.2537562 Near Cuauhtemoc, Tamaulipas
9 18.7900919 -100.4461423 Near Arcelia, Guerrero
10 26.8725068 -104.6037309 Near Hidalgo, Chihuahua
Table 3: Cluster centers and their corresponding locations
The locations of CPKs can be observed from the map in Figure 14. It can be inferred that the
locations obtained from cluster analysis is spread throughout the country. The CPKs obtained
therein are the potential locations for DCs, which can be used in the facility location model. The
coordinates for the southeast and northwest regions of the country are not specified when
generating random numbers and hence there are no clusters formed there. But in the real case,
the clusters will be located corresponding to the coordinates of schools fed as input.
30
Figure 11: Map of Mexico showing locations of CPKs - potential sites for DCs
31
CHAPTER 6: FACILITY LOCATION MODEL FORMULATION
6.1 Model Formulation: Multiple Sourcing DCs
Based on the supply chain design and the assumptions considered, the facility location model is
defined using mixed integer linear programming with an objective function and constraints. The
model is multi-echelon with supply from farmers to DCs to CPKs. The farmers have known
agricultural production capacities and each farmer supplies through 1 DC only i.e. dedicated
farmers to DCs. The DCs are assumed as multiple-sourcing, i.e. a CPK can be served by more
than 1 DC. The CPKs have demand for each commodity, which is known. With all these
considerations, the model for facility location problem is shown in Figure 12.
Figure 12: Model for facility location problem
CPK 1
CPK 2
CPK 3
CPK 4
Farmer 1
DC 1
DC 2
Farmer 2
Farmer 3
Farmer 4
Farmer 1
Farmer 2
Farmer 3
Farmer 4
32
6.1.1 Notation
i = farmers
j = DCs
k = CPKs
l = commodities
Cijkl = transportation costs from farmer „i‟ via DC „j‟ to CPK „k‟ for commodity „l‟
Fj = fixed facility costs at DC „j‟
Dkl = demand of commodity „l‟ at CPK „k‟
Pil = production capacity of farmer „i‟ for commodity „l‟
Tmin-j = minimum throughput at DC „j‟
Tmax-j = maximum throughput at DC „j‟
Il = intensity factor for commodity „l‟
6.1.2 Decision Variables
yj = binary variable to determine whether DC „j‟ is open or not
yij = binary variable to determine whether DC „j‟ is supplied by farmer „i‟ or not
Qijkl = quantity shipped from farmer „i‟ via DC „j‟ to CPK „k‟ for product „l‟
6.1.3 Objective Function
Minimize total supply chain costs = Transportation cost from farmer to DC to CPK for all
commodities + Fixed facility cost for DCs
Minimize Z = ∑i ∑j ∑k ∑l C ijkl Q ijkl + ∑j Fj yj
33
6.1.4 Constraints
1) yj = 1 DC „j‟ is open
0 Otherwise
2) yij = 1 DC „j‟ is supplied by farmer „i‟
0 Otherwise
3) ∑j yj = p
„p‟ is the number of open DCs, specified by the user.
4) ∑j yij = 1 ¥ i
Farmer „i‟ is located local to DC „j‟. Hence farmer „i‟ supplies via one DC only.
5) yij ≤ yj ¥ i,j
Farmer „i‟ supplies only to open DC „j‟.
6) Qijkl ≤ M yij ¥ I,j,k,l
∑i ∑j Qijkl = Dkl ¥ k,l
where „M‟ is assumed a large value of 10000.
Quantity shipped to any CPK „k‟ is equal to the demand at CPK „k‟.
Demand is met at all CPKs through multiple sourcing i.e. a CPK can be served by
multiple DCs.
7) ∑l Il ∑i ∑k Qijkl yij = Tj ¥ j
Quantity supplied through a DC „j‟, from a set of local farmers, is the total throughput of
DC „j‟.
34
An intensity factor Il is provided to measure the intensity of all the commodities from a
base unit for calculating throughput.
yij considers only the quantities supplied by those farmers who serve the DC ‟j‟
8) ∑i ∑k Qijkl ≤ ∑i Pil yij ¥ j,l
The quantity of a commodity „l‟ supplied by a set of farmers serving a DC „j‟ should be
less than the production capacities of the farmers for the commodity „l‟.
9) Tmin-j ≤ Tj yj ≤ Tmax-j ¥ j
The throughput of a DC is bounded by the maximum and minimum allowed throughput.
10) ∑i Pil ≥ ∑k Dkl ¥ l
The production capacities of all farmers for a commodity should be greater than the
demand at all CPKs.
11) Qijkl ≥ 0 ¥ i, j, k, l
The decision variables for quantity should be non-negative.
35
CHAPTER 7: BENDERS DECOMPOSITION HEURISTICS
7.1 Benders Decomposition
The facility location problem formulated belongs to the class of large scale optimization
problems, which in general cannot be solved by exact solution methods due to the combinatorial
complexity. Hence heuristic approaches are considered. After reviewing the literature, Benders
Decomposition is considered, because the problem structure in facility location problem suits
this approach well.
The Benders approach [38] partitions the facility location problem into two simpler problems: an
integer problem, known as Benders master problem, and a linear problem, known as Benders
subproblem. The subproblem is obtained by temporarily fixing the integer variables in the
original problem, hence relaxing the complicating integer variables. The dual of the subproblem
is used to obtain Benders cuts. The Master problem is one with a set of integer variables and
Benders cuts as constraints. The Benders algorithm solves these two simpler problems iteratively
and new Benders cuts are added as constraints to the master problem in each iteration. The
subproblem yields an upper bound and the master problem yields a lower bound. The algorithm
continues until the upper bound and the lower bound converge to an optimal solution for the
original mixed integer problem. Benders Decomposition can be used for large scale mixed
integer programming problems where the original problem is difficult, but the Benders
subproblem and the relaxed master problem are easier to solve.
36
Figure 13: Process Methodology for Benders Decomposition
The process methodology is outlined in Figure 13. The Benders subproblem and master problem
are first formulated for the problem. The Benders cut equations are generated from the dual of
the subproblem. The solution approach for Benders Decomposition using MATLAB is discussed
in the following section. The locations of DCs obtained from Benders algorithm is used to relax
the constraints in the remaining MILP problem which is then solved using MATLAB. Finally,
the results are analyzed.
7.2 Benders Algorithm
The Benders' Decomposition algorithm can be stated as follows:
Fix y‟ in the original problem; Benders subproblem
LB: - Inf
UB: + Inf
while e > ε (where „ε‟ is assumed a small value, say 5)
Solve subproblem dual
Obtain Benders cut By(y)
UB: By‟(y‟)
Add By(y) to master problem
Step 1
•Formulation of Benders Equations
•Benders subproblem and Master Problem
•Generation of Benders cuts
Step 2
•Solution to Benders Decomposition
•MATLAB Programming
•Convergence of Benders algorithm to obtain locations of DCs (yj)
Step 3
•Solution to MILP
•Input locations of DCs into the problem
•MATLAB Programming to obtain yij and Qijkl
Step 4
•Analysis
•Summarization of output
•Sensitivity Analysis
37
Solve master problem
if (master problem is infeasible) then
Stop. The original problem is infeasible.
else
Let (z‟,y‟) be the optimal value and solution to the master problem.
return (z‟,y‟)
LB: z‟
e: UB-LB
end
Upper bounds
ε = epsilon Lower bounds Iterations
Figure 14: Convergence of Upper bound and Lower bound
The equations for Benders decomposition are developed for the multi-commodity facility
location model as follows:
Step 1:
The objective function as specified in the model formulation,
Minimize Z = ∑i ∑j ∑k ∑l C ijkl Q ijkl + ∑j Fj yj
The binary variables yj and yij in the optimization problem are held fixed to satisfy the
constraints (1)-(5) involving those binary variables.
38
Step 2:
The Benders sub problem is obtained by fixing the integer variables,
Minimize Z = ∑i ∑j ∑k ∑l C ijkl Q ijkl + ∑j Fj yj‟
where yj‟ indicates the fixed values for DCs yj.
The sub problem is a transportation problem with DC costs known and can be written as,
Minimize Z = ∑i ∑j ∑k ∑l C ijkl Q ijkl
subject to constraints,
1) Qijkl ≤ M yij‟ ¥ i,j,k,l
∑i ∑j Qijkl = Dkl ¥ k,l
2) ∑l Il ∑i ∑k Qijkl yij‟ = Tj ¥ j
3) ∑i ∑k Qijkl ≤ ∑i Pil yij‟ ¥ j,l
4) Tmin-j ≤ Tj yj‟ ≤ Tmax-j ¥ j
5) ∑i Pil ≥ ∑k Dkl ¥ l
6) Qijkl ≥ 0 ¥ i, j, k, l
Step 3:
The dual of the subproblem is formulated to solve the problem. The dual variables Vk and Wijk
are introduced which represent demand constraints and setup constraints respectively.
Vk = min Cijk where j € O(y)
Vk represents the minimum cost to all CPKs through open DCs.
Wijk = 0 for j € O(y)
max { (Vk - Cijk),0 } for j € C(y)
Wijk represents the incremental cost when any of the closed DCs are open.
39
Using the dual variables, the Benders cut is obtained which eliminates all solutions that yield
more expensive solution to the original problem.
By‟(y‟) = ∑k Vk + ∑j ( Fj - ∑k Wijk ) yj
The Benders cut equation gives an upper bound to the solution.
Step 4:
The master problem is formulated as,
Min z
s.t. z ≥ By‟(y‟)
The optimal solution to the master problem yields a lower bound by solving for z. And the values
of y obtained for the optimal solution will be the new values of y for the next iteration.
Step 5:
The difference between the upper bound and the lower bound is calculated and is represented by
„e‟.
e=UB-LB
The iteration is continued till the upper bound and the lower bound converge to an optimum
solution i.e. a smaller value of „e‟. Once the convergence is reached, the optimal solution is the
minimum transportation cost and the locations of DCs are obtained as „y‟ values.
The locations of DCs obtained using Benders algorithm relaxes the constraints related to yj in the
MILP problem, which is easier to solve. This problem is solved to obtain the allocation of
farmers to DCs, throughput of DCs and Qijkl.
40
7.3 Benders Algorithm in MATLAB
The Benders decomposition equations are developed and the algorithm is implemented using
MATLAB. The fixed DC costs and transportation costs are assigned reasonably based on
assumptions.
The trial values used in the facility location model are given in Table 4. It can be seen that each
trial set is used in MATLAB with different commodity levels such as 2, 4, 6, 8, and 10.
Trial 1 2 3 4 5
Schools 250 500 750 1000 2500
Farmers (i0) 10 20 20 25 40
DCs (j0) 10 20 30 40 100
CPKs (k0) 10 20 30 40 100
Commodities (l0) 2,4,6,8,10 2,4,6,8,10 2,4,6,8,10 2,4,6,8,10 2,4,6,8,10
No. of DCs (p) 2 4 6 8 20
Table 4: Trial values of input parameters
Following are the steps performed in MATLAB for implementing the Benders algorithm:
1) The values for number of farmers (i0), DCs (j0), CPKs (k0), commodities (l0) and
number of open DCs (p) are defined based on trial values. It is to be noted that j0 denotes
the number of potential DCs and p denotes the number of open DCs.
2) The transportation costs tcijkl (4-D matrix of i0 x j0 x k0 x l0) and fixed costs fcj for DCs
(1 x j0) are specified.
3) The open DCs denoted by integer variable „y‟ is randomly assigned based on p value, i.e.
if p=2, then any two y‟s are randomly given values of 1. And their location indices are
41
found using find(), indicating which DCs are open. Two sets are formed for open and
closed DCs.
O(y): open DCs with a y value of 1 and
C(y): closed DCs with a y value of 0.
4) Once the DCs are set, all the farmers are assigned to open DCs to initiate the iteration for
Benders algorithm. One farmer is assigned to one DC only as farmers are assumed local
to DCs in the formulation. Also, it‟s assumed that one DC should be assigned atleast
three farmers. This is considered as a set covering problem and solved using binary
programming to get the allocations of farmers to DCs. The number of assignments is
equal to the number of farmers, since each farmer has one assignment. This is done to
initiate the loop.
5) By fixing the integer variables yj and yij, the problem becomes Benders subproblem. The
next step is to obtain the dual of this problem, in which the concept of shadow price is
used. For this purpose, the dual variables Vk and Wijk are defined.
6) The minimum cost for each of the CPKs is calculated by considering only open DCs in
„j‟ and the farmers „i‟ allotted to them. The minimum cost for each of the commodities
for a CPK is summed to obtain Vk.
Vk = min Cijk for i,j,k j € O(y)
7) The dual variable Wijk is then calculated using Shadow price concept.
Wijk = 0 for j € O(y)
Max {(Vk - Cijk),0} for j € C(y)
42
8) The Benders cut are obtained using the following equation:
b(y) = ∑ + ∑ - ∑ yj
The solution to benders cut yields an upper bound which implies that the sum of local
optimum obtained is an upper limit but higher than the global optimum.
9) The master problem is then formulated by using the benders cuts as constraints and
solved using Integer programming solver.
Min z
s.t. z ≥ b(y)
The solution to the master problem yields lower bound. The optimal solution to this
problem gives the new y-values for the next iteration of the algorithm. For every
iteration, new benders cuts are generated and are added as constraints to the master
problem.
10) The value of „e‟, the difference between the upper bound and the lower bound, is
calculated at the end of every iteration. A smaller value of „e‟ signifies upper bound and
lower bound converging to an optimal solution and this acts as the terminating criteria for
the algorithm.
e = UB - LB
The algorithm is run for different trial values and the elapsed processing time is
measured.
43
7.4 Analysis of Results
7.4.1 Benders Algorithm
The Benders algorithm for the multi-echelon, multi-commodity problem is solved using
MATLAB and the results are analyzed. The processing times for different trial values are
summarized in Table 5.
p0=2 p0=4 p0=6 p0=8 p0=10
i0=10 i0=20 i0=30 i0=40 i0=50
j0=10 j0=20 j0=30 j0=40 j0=50
k0=10 k0=20 k0=30 k0=40 k0=50
l0=2 0.092 0.597 1.930 4.577 10.090
l0=3 0.148 0.678 2.191 5.694 12.770
l0=4 0.167 0.781 2.625 6.930 16.050
l0=5 0.177 0.846 2.980 8.196 18.890
Table 5: Processing times in seconds
From this table, it can be inferred that the processing times increase with increase in the number
of commodities. Hence the complexity of a multi-commodity model is more than a single
commodity model.
The input values assumed for the problem are given in Table 4. For input values of i0=10; j0=10;
k0=10; l0=2 and p=2, the DC locations obtained in the output are [3,9] as given in the following
portion of MATLAB output:
New y values
0 0 1 0 0 0 0 0 1 0
New DC Locations
3 9
Elapsed time is 0.080416 seconds.
44
7.4.2 MILP
When the integer variables (yj) for DC locations are fixed using the output from Benders
algorithm, it relaxes the constraints involving yj in the resulting MILP, which is much easier to
solve. This is solved using mixed integer optimization solver in MATLAB to yield the allocation
of farmers to DCs (yij) and the quantity shipped from farmer „i‟ through DC „j‟ to CPK „k‟ for
commodity „l‟ specified by Qijkl. Also, the throughput of open DCs are obtained based on the
throughput constraints.
Figure 15: Qijkl Distribution graph for commodity 1
DC 3
Farmer 5
Farmer 7
Farmer 8
Farmer 9
Farmer 1
Farmer 2
Farmer 3
Farmer 4
Farmer 6
Farmer 10
DC 9
CPK 1
CPK 2
CPK 3
CPK 4
CPK 5
CPK 6
CPK 7
CPK 8
CPK 9
CPK 10
97
17
81
43
25
77
53
69
38
63
27
68
10
35
67
76
21
99
39
63
27
10
68
35
67
63
99
21
76
39
563 505
Throughput: 320
Throughput: 185
45
The input values for this MILP are yj = [3,9] from Bender‟s algorithm and other relaxed
constraints with respect to yj from the model formulation. The capacities of farmers and demands
of CPKs for commodities 1 and 2 are assumed such that the sum of the capacities at farmers is
greater than the sum of the demand at CPKs as shown in Figure 14.
The following are the assumed values of capacities of farmers and demand at CPKs:
pc=[[25;77;53;69;97;38;17;81;43;63;],[27;17;24;84;37;45;69;84;79;44;]];
dc=[[27;68;10;35;67;63;39;99;21;76;],[24;49;85;42;17;60;35;22;73;54;]];
The output to this MILP gives the allocation of farmers to DCs as follows:
Farmers allotted to DC 3: 5, 7, 8, 9
Farmers allotted to DC 9: 1, 2, 3, 4, 6, 10
The distribution graph in Figure 14 gives the Qijkl.
However, it is observed from Figure 14 that the Qijkl is allotted only through single sourcing of
DCs. Further analysis and rerun of the program indicated that single sourcing observed is by
chance in this case. To further validate this, the capacities at farmers are changed as follows:
pc=[[10;20;30;40;50;60;70;80;90;100;],[27;17;24;84;37;45;69;84;79;44;]]; dc=[[27;68;10;35;67;63;39;99;21;76;],[24;49;85;42;17;60;35;22;73;54;]];
This resulted in a distribution graph with multiple sourcing. Hence it can be concluded that the
model and program developed works well for multiple sourcing and the values of capacities and
demands play a role in determining how the quantities are allotted. Hence a seasonal commodity
from a few farmers may be allotted through multiple DCs to CPKs.
46
7.5 Sensitivity Analysis
Based on the results obtained for the MILP problem, sensitivity analysis is carried out to analyze
the changes in Qijkl when throughput constraint is modified.
7.5.1 Throughput Limit: 400 to 550 units
MATLAB Output:
The farmers allotted to DC 3 are:
3
4
5
8
10
The farmers allotted to DC 9 are:
1
2
6
7
9
Throughput of DC 3 is:
504.3600
Throughput of DC 9 is:
410.9300
Elapsed time is 26.575296 seconds.
The output of non-zero Qijkl values obtained in MATLAB is summarized in Table 6.
Q4311 1 Q2912 2
Q6911 26 Q4312 22
Q8321 68 Q7922 49
Q5331 10 Q10,3,3,2 85
Q9941 35 Q7942 42
Q3351 67 Q1952 17
Q2961 63 Q10,3,6,2 60
Q5371 39 Q5372 35
Q4381 99 Q3382 22
Q4391 21 Q1992 73
Q6,9,10,1 76 Q7,9,10,2 54
Table 6: Values of Qijkl for throughput limit 400 to 550 units
47
7.5.2 Throughput limit: 350 to 500 units
MATLAB Output:
The farmers allotted to DC 3 are:
1
2
4
5
7
The farmers allotted to DC 9 are:
3
6
8
9
10
Throughput of DC 3 is:
435.2600
Throughput of DC 9 is:
480.0300
Elapsed time is 30.578375 seconds.
The output of non-zero Qijkl values obtained in MATLAB is summarized in Table 7.
Q5311 27 Q8912 24
Q2321 68 Q1322 49
Q3931 10 Q5332 36
Q8941 35 Q3932 49
Q4351 67 Q6942 42
Q4361 63 Q8952 17
Q8971 39 Q3962 60
Q9981 99 Q6972 35
Q10,9,9,1 21 Q2382 22
Q1,3,10,1 2 Q2392 73
Q9,9,10,1 74 Q2,3,10,2 54
Table 7: Values of Qijkl for throughput limit 400 to 550 units
Processing time range: 23 to 32 seconds
48
Based on the analyses with different values for the limits of throughput, it is inferred that
throughput should be set reasonably i.e. it should not be drastically different from the demand at
CPKs. For instance, if the combined demand at CPKs is 1000 units, then the throughput limit for
the DCs should be set in such a way that they can meet the demand. Otherwise, the throughput is
bound to go beyond its limit to satisfy the demand, which is a hard constraint given as equality.
49
CHAPTER 8: CONCLUSION AND FUTURE WORK
The supply chain is designed with Mexican School lunch program as the application. A multi-
echelon, multi-commodity facility location model is developed using mixed integer linear
programming (MILP). For the discrete location problem considered, the potential candidate
locations are identified from the end customer locations using clustering analysis in SAS. The
facility location problem is solved using Benders Decomposition approach. The Benders
algorithm is used in MATLAB to identify the locations of DCs. The DCs obtained are used to
relax the constraints involving the integer variable for DCs yj in the MILP. The resulting
problem is solved in MATLAB to obtain the allocation of farmers to DCs yij, the quantity
shipped from farmer „i‟ through DC „j‟ to CPK „k‟ for commodity „l‟ specified by Qijkl and the
throughput of open DCs.
8.1 Limitations of the model
The model developed has some limitations based on the assumptions made. Following are some
of the limitations observed:
1) The initial „y‟ values fixed can have a bearing on the number of iterations and there are
techniques to fix „y‟ values to reduce the number of iterations. But in our case, the initial
„y‟ values for DC locations are assigned randomly to obtain the Benders subproblem.
2) The demand at all CPKs for all commodities is assumed to be satisfied. Hence demand
constraints are given as hard equality constraints in the model formulation.
50
3) The variable operating costs of DCs are not considered in the model formulation. The
throughput constraints can influence the operating costs in the objective function and a
more advanced variation of Benders heuristics is required to solve the problem.
4) In the benders decomposition algorithm, the assignment of farmers to DCs is made
randomly using set covering problem to start the iteration.
8.2 Summary of Contributions
1) Development of a methodology to identify locations of customer zones (CPKs) from
individual customers (schools) using clustering analysis in SAS.
2) Implementation of Benders Decomposition in a multi-commodity multi-echelon food
supply chain location problem.
3) Implementation of the solution procedure in MATLAB to identify the locations of DCs
using Benders Decomposition algorithm.
4) Implementation of the solution procedure in MATLAB to solve the resulting MILP to
obtain the allocation of farmers to DCs and the amount Qijkl.
8.3 Future scope
A program can be developed for a more advanced variation of Benders heuristics with operating
costs involved. Also, the Benders Decomposition algorithm can be applied to both single
sourcing and multiple sourcing DCs and the results obtained can be compared to identify the
efficiency parameters. A real world problem can be tested with these approaches to identify the
effect and relevancy of the solution.
51
REFERENCES
[1] Lummus, R.R., Vokurka, R.J., "Defining supply chain management: a historical
perspective and practical guidelines", Industrial Management and Data Systems, Vol.
99 No. 1, pp. 11-17, 1999
[2] Stringer, M.F., and Hall, M.N., “A generic model of the integrated food supply chain to
aid the investigation of food safety breakdowns”, Food Control 18, pp.755–765, 2007
[3] Fisher, M. L., “What is the Right Supply Chain for Your Product?”, Harvard Business
Review 75(2, March–April), pp.105–116, 1997
[4] Allinson, J., Procurement in the Food and Drink Industry in the early 21st Century. In:
M.Bourlakis and P.Weightman, Editors, “Food Supply Chain Management”,
Blackwell, Oxford, pp. 49–61, 2004
[5] Pirog, R., van Pelt, T., Enshayan, K., Cook, E., “Food, Fuel and Freeways, Leopold
Center for Sustainable Agriculture”, Iowa State University, Ames, 2001
[6] Steve Martinez, Michael Hand, Michelle Da Pra, Susan Pollack, Katherine Ralston,
Travis Smith, Stephen Vogel, Shellye Clark, Luanne Lohr, Sarah Low, and Constance
Newman, “Local Food Systems: Concepts, Impacts, and Issues”, Economic Research
Report No. (ERR-97), 2010
[7] Story, M., Kaphingst, K.M., Robinson-O'Brien, R., and Glanz, K., “Creating Healthy
Food and Eating Environments: Policy and Environmental Approaches”, Annual
Review of Public Health 29: pp.253–272, 2008
[8] Story, M., Kaphingst, K.M., French, S., “The role of schools in obesity prevention,
Future Child”, 16: pp.109–142, 2006
[9] de Sa, J., & Lock K., “Will European agricultural policy for school fruit and vegetables
improve public health? A review of school fruit and vegetable programmes”, Eur J
Public Health 18, pp.558–568, 2008
[10] Raulio, S., Roos, E., Prattala, R., “School and workplace meals promote healthy food
habits”, Public Health Nutrition, 2010
[11] “Dietary Guidelines for Americans – 2005”, Accessed on November 8, 2010 at
www.health.gov/dietaryguidelines/
[12] Dixon, L.B., Cronin, F.J., Krebs-Smith, S.M., “Let the pyramid guide your food
choices: capturing the total diet concept”, J Nutr., 131(2S-1): pp.461S–472S, 2001
52
[13] Heimendinger, J., Van Duyn, M.A., Chapelski, D., Foerster, S., Stables, G., “The
national 5 A Day for Better Health program: A large-scale nutrition intervention”, J
Public Health Manag Prac., 2: pp.27-35, 1996
[14] Nanney, M.S., Haire-Joshu, D., Hessler, K., Brownson, R.C., “Rationale for a
consistent “powerhouse” approach to vegetable and fruit messages”, J Am Diet Assoc.
104, pp.352–356, 2004
[15] Gunderson, G.W., “The National School Lunch Program: Background and
development”, New York: Nova Science, 2003
[16] Ralston, K., Newman, C., Clauson, A., Guthrie, J., Buzby, J., “The National School
Lunch Program: Backgrounds, Trends, and Issues”, US Department of Agriculture,
Economic Research Service, Washington DC, Report No. 61, 2008
[17] USDA/FNS „„National school lunch program factsheet - 2009‟‟ Accessed on November
8, 2010 at www.fns.usda.gov/cnd/lunch/NSLPFactSheet.pdf
[18] Statistics on school meal programs, US Department of Agriculture, Food and Nutrition
Service Accessed on November 8, 2010 at www.fns.usda.gov/pd/slsummar.htm
[19] School Food Purchase Study, US Department of Agriculture, Food and Nutrition
Service, Accessed on November 8, 2010 at
www.fns.usda.gov/ora/MENU/Published/FoodDistribution/FDStudies.htm
[20] Min, H., Zhou, G., “Supply chain modeling: Past, present and future”, Computers and
Industrial Engineering, 43(1–2), pp.231–249, 2002
[21] Vorst, J. GAJ van der, Tromp, S, Zee D J van der, “Simulation modeling for food
supply chain redesign. Integrated decision making on product quality, sustainability and
logistics”, International Journal of Production Research; 47(23): pp.6611–6631, 2009
[22] Georgiadis, P., Vlachos, D., Iakovo, E., “A system dynamics modeling framework for
the strategic supply chain management of food chains”, Journal of Food Engineering,
Elsevier Publications, pp.351-364, 2005
[23] Giannakourou, M.C., Taoukis, P.S., “Application of a TTI-based distribution
management system for quality optimization of frozen vegetables at the consumer end”,
J. Food Sci. 68, pp.201-209, 2003
53
[24] Ju-Chia Kuo, Mu-Chen Chen, “Developing an advanced Multi-Temperature Joint
Distribution System for the food cold chain”, Food Control, vol.21, Issue 4, pp.559-
566, 2010
[25] Qiu Qijun, Zhiyong Zhang, Xuefeng Song, Shouping Gui, "Application Research of
Cross Docking Logistics in Food Cold-Chain Logistics", International Conference on
Information Management, Innovation Management and Industrial Engineering, vol.3,
pp.236-240, 2009
[26] Ronald, H. Ballou, “Business logistics management: planning, organizing, and
controlling the supply chain”, Fourth edition, Upper Saddle River NJ: Prentice-Hall;
1999
[27] Francis, R.L., McGinnis, L.F., White, J.A., “Locational Analysis”, European Journal of
Operational Research 12, pp.220-252, 1983
[28] Aikens, C.H., “Facility location models for distribution planning”, European Journal of
Operational Research 22, pp.263–279, 1985
[29] Brandeau, M.L., Chiu, S.S., “An overview of representative problems in location
research”, Management Science 35 (6) , pp.645–674, 1989
[30] Hansen, P., Peeters, D., Thisse, J., “On the location of an obnoxious facility”, Sistemi
Urbani 3, pp.299–317, 1981.
[31] Drezner, Z., Suzuki, A., “The big triangle small triangle method for the solution of non-
convex facility location problems”, Operations Research 52, pp.128–135, 2004
[32] Klose, A., Drexl, A., “Facility location models for distribution system design”,
European Journal of Operational Research 162, pp.4–29, 2005.
[33] Nozick, L.K., Turnquist, M.A., “Inventory, transportation, service quality and the
location of distribution centers”, European Journal of Operational Research 129,
pp.362–371, 2001
[34] Geoffrion, A.M., Graves, G.W., “Multicommodity distribution system design by
Benders decomposition”, Management Science 20 5, pp.822–844, 1974
[35] Hindi, K.S. and Basta, T., “Computationally efficient solution of a multiproduct, two-
stage distribution-location problem”, The Journal of the Operational Research Society
45 11, pp.1316–1323, 1994
54
[36] Pirkul, H., Jayaraman, V., “A multi-commodity, multi-plant, capacitated facility
location problem: Formulation and efficient heuristic solution”, Computers &
Operations Research 25(10), pp.869–878, 1998
[37] Mirchandani, P.B., Francis, R.L., “Discrete Location Theory”, Wiley, New York, 1990
[38] Geoffrion, A.M., “Generalized Benders decomposition,”, Journal of Operation Theory
and Applications, vol. 10, no. 4, pp.237–260, 1972.
55
APPENDIX A:
I.SAS Code for Clustering Analysis
data coord;
/*Creating random numbers for the coordinates of 4 regions of Mexico*/
/*Latitudes and longitudes are represented by the variables lat and lon*/
/*250 locations are generated to represent 250 schools*/
do i = 1 to 62;
lat=5*ranuni(5)+26;
lon=-4*ranuni(5)-106;
output;
end;
do i = 63 to 175;
lat=9*ranuni(5)+20;
lon=-4.5*ranuni(5)-101;
output;
end;
do i = 176 to 220;
lat=6.5*ranuni(5)+19.5;
lon=-2.5*ranuni(5)-97.5;
output;
end;
do i = 221 to 250;
lat=2*ranuni(5)+17.5;
lon=-5.5*ranuni(5)-96.5;
output;
end;
run;
/*K-means Clustering on random data set*/
proc fastclus data=coord maxc=10 maxiter=10 out=clus1;
title 'K-means clustering using coordinates';
/* K is the number of clusters defined by maxc */
var lat lon;
run;
proc print data=coord;
title 'Observations: Location of Schools';
run;
Proc sort data=clus1 out=sor;
by cluster;
run;
proc print data=sor;
title 'Cluster of CPKs with the schools served';
run;
proc freq;
tables cluster*i;
run;
56
proc candisc anova data=clus1 out=can;
class cluster;
var lat lon;
/*Canonical Discriminant Analysis of Iris Clusters*/
run;
legend1 frame cframe=ligr label=none cborder=black
position=center value=(justify=center);
axis1 label=(angle=90 rotate=0) minor=none;
axis2 minor=none;
proc gplot data=Can;
plot Can2*Can1=Cluster/frame cframe=ligr
legend=legend1 vaxis=axis1 haxis=axis2;
/*Plot of Canonical Variables Identified by Cluster*/
title 'Cluster Analysis - CPKs and Schools';
run;
II.SAS Output: Clusters of Schools with Cluster membership
Cluster of CPKs with the schools served
Obs i lat lon CLUSTER DISTANCE
1 1 30.6241 -109.402 1 1.44446
2 2 30.9956 -107.188 1 1.66570
3 3 29.0401 -109.386 1 1.31175
4 4 29.5745 -108.634 1 0.39611
5 8 29.9256 -107.944 1 0.38017
6 10 30.4191 -106.530 1 1.87087
7 12 29.9639 -107.745 1 0.57479
8 15 30.5645 -109.540 1 1.52196
9 16 29.2090 -108.132 1 0.53679
10 17 29.2803 -108.582 1 0.54672
11 18 30.7415 -107.944 1 1.06399
12 19 30.7761 -107.449 1 1.33072
13 21 30.1632 -107.422 1 0.95186
14 22 28.4697 -108.693 1 1.32794
15 23 28.5118 -109.376 1 1.64464
16 25 28.7829 -106.664 1 1.86233
17 26 30.4026 -107.301 1 1.17984
18 29 30.3709 -108.769 1 0.81481
19 31 29.0596 -108.867 1 0.89737
20 33 29.4266 -106.920 1 1.38217
21 34 29.6734 -108.258 1 0.05575
22 35 28.5818 -109.503 1 1.68479
23 38 29.9623 -108.229 1 0.23761
24 39 30.7462 -108.959 1 1.23023
25 40 30.0459 -107.402 1 0.92299
26 41 29.1300 -109.384 1 1.26516
27 43 28.9359 -108.517 1 0.83019
28 44 29.2954 -108.104 1 0.46287
29 45 30.4001 -109.759 1 1.63462
30 46 29.2831 -107.977 1 0.53184
31 47 29.0391 -109.613 1 1.51085
32 53 28.6506 -109.941 1 1.98932
33 54 29.7263 -109.319 1 1.04996
34 55 29.5850 -106.251 1 2.02234
35 56 29.8228 -108.718 1 0.45929
36 57 30.2964 -106.913 1 1.47010
37 58 29.9294 -107.501 1 0.79383
38 59 30.2810 -109.135 1 1.02799
57
39 60 29.7107 -106.509 1 1.76009
40 132 25.0398 -101.016 2 2.07659
41 176 24.9574 -99.690 2 0.79197
42 178 24.8172 -97.784 2 1.23816
43 181 25.2895 -99.768 2 0.82148
44 183 24.4718 -98.500 2 0.88700
45 185 25.2602 -97.998 2 0.95037
46 186 25.6075 -98.665 2 0.46647
47 188 25.8052 -98.710 2 0.61652
48 189 25.3198 -99.493 2 0.55053
49 190 25.2774 -99.547 2 0.59994
50 195 25.7013 -97.838 2 1.20414
51 199 24.8651 -98.277 2 0.76717
52 203 25.6857 -99.452 2 0.67428
53 207 25.1316 -98.542 2 0.41975
54 209 24.8889 -98.449 2 0.60899
55 217 25.6705 -99.448 2 0.66186
56 64 24.9744 -103.519 3 1.46392
57 66 23.8796 -104.430 3 1.54197
58 68 22.0743 -101.985 3 1.82037
59 71 24.0166 -105.140 3 2.26543
60 73 24.2895 -101.698 3 1.36935
61 75 24.1384 -101.675 3 1.32620
62 76 21.9976 -101.078 3 2.46057
63 77 23.5548 -104.265 3 1.36241
64 79 24.5957 -103.058 3 0.96283
65 81 24.6831 -103.832 3 1.39115
66 82 21.8292 -101.189 3 2.49903
67 86 23.8464 -105.135 3 2.23801
68 95 22.4948 -101.001 3 2.22548
69 98 23.9980 -102.200 3 0.78918
70 103 24.9751 -102.552 3 1.37641
71 105 23.2357 -104.531 3 1.67563
72 106 22.6212 -102.905 3 1.02378
73 113 22.9588 -102.402 3 0.85094
74 116 23.8467 -104.124 3 1.23451
75 123 23.1846 -101.051 3 1.91092
76 127 24.7672 -103.413 3 1.23146
77 129 24.6376 -101.645 3 1.60479
78 134 24.0874 -103.500 3 0.74069
79 137 23.3799 -104.346 3 1.46432
80 141 24.1462 -101.607 3 1.39238
81 145 22.4015 -102.846 3 1.24490
82 146 23.1262 -104.155 3 1.35308
83 148 23.8396 -103.775 3 0.89040
84 151 23.1501 -102.698 3 0.53678
85 152 23.0620 -101.271 3 1.73580
86 158 22.7238 -102.207 3 1.15632
87 161 23.9311 -102.700 3 0.35260
88 165 23.9378 -104.979 3 2.09355
89 166 25.5432 -101.888 3 2.15373
90 69 22.0452 -103.096 4 0.99420
91 70 20.9035 -102.765 4 0.94686
92 72 20.9211 -105.353 4 1.72350
93 78 21.0996 -104.320 4 0.67509
94 80 21.4107 -103.393 4 0.32282
95 89 21.0819 -104.312 4 0.67065
96 91 20.8370 -102.267 4 1.44212
97 92 21.3703 -102.808 4 0.86112
98 93 21.6017 -102.579 4 1.14128
99 94 21.0226 -103.211 4 0.48842
100 97 21.9815 -103.632 4 0.75823
101 99 21.6044 -103.193 4 0.60003
102 100 20.1461 -104.529 4 1.38651
103 101 20.9872 -105.068 4 1.43126
104 107 20.6457 -104.773 4 1.25752
105 108 20.3728 -104.099 4 0.95913
106 109 20.9064 -102.005 4 1.68149
107 111 20.0478 -104.887 4 1.70209
108 115 21.1145 -102.186 4 1.47459
109 117 21.9667 -104.053 4 0.84212
58
110 118 21.5391 -103.409 4 0.40052
111 119 20.9568 -104.541 4 0.92405
112 121 21.6159 -105.462 4 1.84806
113 128 20.9092 -104.478 4 0.87940
114 138 21.7984 -102.870 4 0.97424
115 139 22.2759 -103.683 4 1.05251
116 140 21.5253 -103.236 4 0.51710
117 149 21.7033 -101.886 4 1.83363
118 150 20.3690 -102.280 4 1.61995
119 155 22.0068 -104.409 4 1.08654
120 156 21.2644 -104.273 4 0.61850
121 157 21.9291 -102.184 4 1.63229
122 168 20.4063 -104.416 4 1.11600
123 173 21.2391 -104.657 4 1.00075
124 5 27.2449 -107.331 5 0.28797
125 6 26.4830 -108.477 5 1.10970
126 7 27.3349 -107.344 5 0.31079
127 9 27.8153 -107.799 5 0.66584
128 11 28.2059 -106.255 5 1.70235
129 13 27.8947 -106.900 5 1.01092
130 14 26.8631 -109.807 5 2.21847
131 20 27.9881 -109.362 5 1.92974
132 24 27.2386 -108.712 5 1.10247
133 27 26.1205 -108.491 5 1.37451
134 28 27.3372 -109.991 5 2.38543
135 30 26.9953 -106.987 5 0.64948
136 32 26.5678 -108.258 5 0.88804
137 36 27.7226 -106.297 5 1.42294
138 37 26.5177 -107.435 5 0.68191
139 42 27.0649 -106.784 5 0.83433
140 48 27.7660 -107.064 5 0.80412
141 49 26.5343 -106.760 5 1.06646
142 50 27.7702 -106.555 5 1.21180
143 51 26.5026 -106.869 5 1.00230
144 52 27.9228 -107.344 5 0.79255
145 61 26.4304 -107.164 5 0.86949
146 62 26.7368 -107.068 5 0.69879
147 65 27.8899 -101.665 6 0.46901
148 74 28.3167 -102.945 6 0.90445
149 83 28.1865 -101.592 6 0.60318
150 85 28.7661 -101.376 6 1.13605
151 90 28.5788 -102.423 6 0.72145
152 114 28.1858 -103.390 6 1.28562
153 124 26.9659 -102.161 6 0.95297
154 125 27.7489 -101.104 6 1.04271
155 126 28.0282 -103.340 6 1.21216
156 131 27.7292 -101.001 6 1.14717
157 133 26.5860 -101.240 6 1.60400
158 142 26.5719 -101.565 6 1.46116
159 147 28.9220 -101.918 6 1.02612
160 153 28.4534 -103.520 6 1.48677
161 159 26.6129 -101.375 6 1.50981
162 160 28.3094 -103.288 6 1.21987
163 163 28.4022 -102.339 6 0.52566
164 172 28.9159 -102.948 6 1.28808
165 174 27.2818 -101.332 6 1.02321
166 179 20.4363 -99.136 7 1.61122
167 184 19.6651 -97.620 7 0.59545
168 191 20.1939 -98.379 7 1.00135
169 196 19.7353 -98.081 7 0.48736
170 202 19.7846 -97.872 7 0.56324
171 211 19.8702 -98.562 7 0.80692
172 215 20.1058 -97.554 7 0.98803
173 218 19.8606 -98.705 7 0.89836
174 219 19.5754 -98.248 7 0.38320
175 221 19.1538 -96.825 7 1.22549
176 223 19.4367 -99.111 7 1.08081
177 224 19.1830 -98.387 7 0.34713
178 227 18.1960 -98.806 7 1.29820
179 228 18.0804 -96.753 7 1.74344
180 229 18.6737 -98.514 7 0.74156
59
181 234 18.9468 -97.152 7 0.94392
182 235 17.5549 -98.277 7 1.70989
183 237 18.7746 -97.679 7 0.60014
184 238 19.4319 -97.981 7 0.19428
185 242 18.5117 -96.742 7 1.49897
186 244 19.3998 -99.122 7 1.08641
187 245 18.6339 -96.702 7 1.47901
188 248 19.4870 -98.486 7 0.49956
189 249 19.2886 -98.424 7 0.37910
190 177 24.0768 -97.666 8 1.62942
191 180 21.2166 -99.221 8 1.65307
192 182 22.5210 -97.548 8 0.70712
193 187 21.2676 -99.928 8 2.11318
194 192 23.2101 -98.003 8 0.69933
195 193 23.9732 -98.023 8 1.43477
196 194 23.0344 -97.628 8 0.78723
197 197 20.9095 -98.200 8 1.64853
198 198 21.3255 -98.063 8 1.24639
199 201 23.5882 -98.046 8 1.05167
200 204 22.3241 -98.735 8 0.53464
201 205 21.2474 -97.831 8 1.37646
202 206 23.5114 -97.542 8 1.19040
203 208 22.3957 -97.617 8 0.65692
204 210 22.5156 -99.396 8 1.14302
205 212 23.4651 -97.750 8 1.03823
206 213 21.9204 -98.138 8 0.64716
207 214 23.0747 -99.274 8 1.14388
208 216 22.5703 -98.285 8 0.03377
209 220 22.9958 -98.182 8 0.44448
210 120 20.2863 -101.025 9 1.60434
211 164 20.3859 -101.314 9 1.81666
212 175 20.9391 -101.219 9 2.28392
213 200 20.6262 -99.665 9 1.99553
214 222 17.6378 -99.738 9 1.35271
215 225 18.9415 -99.287 9 1.16861
216 226 18.1058 -101.396 9 1.17031
217 230 18.4421 -101.802 9 1.39981
218 231 19.2245 -99.303 9 1.22298
219 232 17.6228 -101.402 9 1.50854
220 233 18.2975 -101.835 9 1.47341
221 236 17.7983 -99.508 9 1.36507
222 239 18.1644 -100.345 9 0.63389
223 240 18.1555 -101.033 9 0.86423
224 241 18.2106 -99.231 9 1.34612
225 243 18.6702 -99.369 9 1.08373
226 246 17.7877 -101.621 9 1.54453
227 247 18.9127 -99.683 9 0.77282
228 250 18.8031 -99.701 9 0.74529
229 63 27.3284 -104.990 10 0.59730
230 67 28.1818 -104.931 10 1.34966
231 84 25.6381 -104.160 10 1.31174
232 87 25.9686 -103.376 10 1.52492
233 88 25.7425 -103.169 10 1.82597
234 96 25.0519 -105.408 10 1.99020
235 102 25.8977 -104.872 10 1.01114
236 104 27.0208 -104.087 10 0.53761
237 110 27.3828 -105.063 10 0.68636
238 112 26.8028 -104.437 10 0.18110
239 122 28.3600 -105.079 10 1.56159
240 130 27.4821 -105.279 10 0.90935
241 135 25.3467 -105.497 10 1.76793
242 136 25.2124 -104.554 10 1.66083
243 143 28.9405 -104.877 10 2.08603
244 144 28.5867 -104.392 10 1.72719
245 154 26.5277 -104.523 10 0.35408
246 162 26.6357 -103.281 10 1.34380
247 167 26.9356 -104.565 10 0.07414
248 169 27.7372 -104.776 10 0.88172
249 170 28.1874 -105.457 10 1.56763
250 171 26.2277 -104.511 10 0.65139
60
III.SAS Output: Cluster Means and Cluster Graph for Trial 2 values
Trial Schools CPKs Potential DCs
2 500 20 20
Cluster Analysis - CPKs and Schools
The FASTCLUS Procedure
Replace=FULL Radius=0 Maxclusters=20 Maxiter=10 Converge=0.02
Cluster Means
Cluster x y
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
1 27.9377995 -111.6902172
2 28.5049801 -93.5480162
3 22.2566838 -113.5467155
4 24.4081798 -91.6889736
5 16.6370756 -95.3406202
6 17.0175055 -101.3837301
7 25.8862028 -97.0124251
8 16.8809396 -106.9053747
9 20.0673995 -97.7296398
10 22.6578881 -87.4370703
11 17.9993189 -86.6321226
12 16.8076689 -91.1370202
13 20.9084630 -93.1052651
14 27.5524345 -106.9076527
15 27.5693643 -87.8287063
16 24.5410752 -101.4603616
17 22.2047588 -105.4788969
18 28.8849074 -100.2694870
19 17.0998444 -112.6263467
20 22.2798363 -109.6957704
61
IV.SAS Output: Cluster Means and Cluster Graph for Trial 3 values
Trial Schools CPKs Potential DCs
3 750 30 30
Cluster Means
Cluster x y
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
1 28.6841574 -109.0362649
2 16.2197196 -94.6856579
3 16.8256566 -86.2843865
4 27.4709328 -105.3964950
5 28.7057151 -91.8129595
6 25.4640948 -100.1101309
7 22.6937119 -95.5438608
8 19.1030049 -97.3108174
9 22.2370523 -100.0952215
10 25.5260981 -88.4090443
11 16.3693621 -99.1767180
12 19.4210815 -92.4862182
13 23.6657815 -85.9371160
14 16.3473157 -113.4690238
15 16.5129529 -105.5732150
16 20.8582790 -87.9983431
17 17.3524922 -102.2088967
18 28.6411269 -98.3943066
19 25.0740240 -109.0089477
20 20.5241168 -108.2053554
21 27.5254384 -95.5245032
22 23.3072822 -104.6725502
23 27.8264370 -113.0092655
24 28.5165020 -86.9124967
25 24.1600364 -92.0090488
26 16.5327653 -109.7874611
27 28.4171016 -101.3970133
28 22.6253969 -112.7987165
29 19.2788172 -113.4171711
30 16.4862357 -90.4894498
62
V.SAS Output: Cluster Means and Cluster Graph for Trial 4 values
Trial Schools CPKs Potential DCs
4 1000 40 40
Cluster Means
Cluster x y
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
1 28.8137680 -110.9027693
2 28.0261664 -94.8495655
3 23.3289502 -107.1532065
4 26.1418100 -104.5833899
5 20.0025391 -109.4791347
6 15.8614824 -94.0167697
7 16.4402390 -109.6571266
8 25.4954236 -88.4066110
9 21.5782759 -94.7166690
10 28.8598667 -88.6446806
11 23.2486450 -86.0308901
12 25.6520463 -98.0672405
13 16.3895213 -90.4566197
14 16.3855280 -113.2208851
15 19.2670915 -92.3667265
63
16 16.0686666 -86.1995973
17 21.0919889 -88.7944746
18 28.7870669 -98.2044549
19 22.1601706 -98.7922154
20 27.9061076 -85.9812709
21 18.9166365 -86.4572681
22 22.0457448 -103.2142683
23 19.4081645 -98.7143125
24 19.4563180 -106.2508383
25 28.7750751 -101.4003161
26 24.6323164 -113.5833947
27 16.2382358 -105.4301357
28 19.2801868 -113.6503446
29 29.0231238 -106.3543369
30 28.1581936 -91.6882626
31 26.3383876 -108.1283209
32 17.2109194 -101.8770824
33 23.6380446 -91.6125805
34 28.1070758 -113.7147022
35 21.9435821 -112.1284683
36 24.7873946 -110.1785123
37 17.6612377 -96.0378442
38 25.6776926 -101.4979535
39 16.1594838 -98.9434466
40 24.4669865 -94.5827785
64
APPENDIX B:
I.MATLAB Code for Benders Decomposition
tic;
% Given Values i0=10; % Farmers j0=10; % DCs k0=10; % CPKs l0=2; % Commodities p0=2; % Number of open DCs
% Transportation cost, Cijkl; Range 1-10 tc=rand(i0,j0,k0,l0)*9+1;
%Fixed cost for DCs is defined; Range 1-10 fc=rand(1,j0)*9+1;
% 'p' Open DCs initial random assumption n1=p0; n2=j0-p0; y=zeros(1,n1+n2); d=randperm(n1+n2); y(d(1:n1))=1; ind0=find(y); % Open DC Locations cind=find(y==0); % Closed DC Locations
disp('Given value of p:'); disp(p0); disp('Initial y values:'); disp(y); disp('DC Locations:'); disp(ind0);
% Yij Farmers to DCs initial assumption % Set covering problem %Objective: To minimize the sum of (fixed cost * farmer integer var) f0=zeros(i0,j0); f=rand(p0*i0,1)*10+10; % Fixed cost of farmers Aeq=zeros(i0,p0*i0); beq=ones(i0,1); % One farmer should serve 1 DC only A=zeros(p0,p0*i0); b=zeros(p0,1); b(:,:)=-3; % One DC should be served by atleast 3 farmers
% Defining the LHS of inequality constraint cc=1; while(cc<=p0*i0) for i=1:p0 for j=1:i0 A(i,cc)=-1;
65
cc=cc+1; end; end; end;
% Defining the LHS of equality cc=1; while(cc<=i0*p0) for i=1:i0 Aeq(i,cc)=1; cc=cc+1; end; end;
% Solving the set covering problem to allot the farmers [x,fval] = bintprog(f,A,b,Aeq,beq);
% Defining the matrix for allotment of farmers to open DCs count=1; for i=ind0 for j=1:i0 f0(j,i)=x(count); count=count+1; end; end;
% Finding the index - which farmers are allotted to which DCs [ii iind]=find(f0);
cat=[ii,iind]; disp('Farmers-->DCs'); disp(cat);
% Printing the DCs allotted to each farmer for i=1:p0 str=sprintf('The farmers alloted to DC %d are :',ind0(i)); disp(str); count=1; for j=1:i0 if(cat(j,2)==ind0(i)) disp(cat(j,1)); count=count+1; end; end; end;
tempx=zeros(i0,l0,k0); v=zeros(k0,1); % Defining the dual variable v qq=zeros(l0,1);
w0=zeros(i0,j0,k0); % Defining the dual variable w w=zeros(i0,j0,k0); tempw=ones(i0,j0,k0,l0);
A1=zeros(1,j0+1);
66
b1=zeros(1,1); Aeq1=zeros(1,j0); Beq1=zeros(1,1);
% e is defined as the difference between upper bound and lower bound. % The iteration continues till the difference is very small meaning % benders algorithm converged to an optimal solution.
e=200;%This starts the iteration iter=1;
while(e>10)
% Solving for the dual variable v ind=find(y); % finding the open DC locations
for k=1:k0 for l=1:l0 for i=1:i0 % Finding the min cost among open DCs to all CPKs tempx(i,l,k)=tc(cat(i),cat(i,2),k,l); end; qq(l)=min(tempx(:,l,k)); end; v(k)=sum(qq); % Minimum cost for each CPK routed through % open farmers and DCs - sum of two commodities end;
% Solving for the dual variable w for j=1:j0 for k=1:k0 for i=1:i0 for l=1:l0 % Finding the incremental cost among closed DCs % w.r.t v(k) for all CPKs tempw(i,j,k,l)=tc(i,j,k,l); end; tempw(i,ind,:,:)=0; w0(i,j,k)=sum(tempw(i,j,k,:)); end; % w(j,k)=sum(tempw(i,j,k,l)); end; end;
for k=1:k0 for i=1:i0 for j=1:length(cind) w(i,j,k)=max((v(k)-w0(i,cind(j),k)),0); end; end; end; % Obtaining the Benders cut sv=sum(v); BD=zeros(j0,1);
67
for j=1:j0 BD(j)=fc(j)-sum(sum(w(:,j,:))); end;
UB=sv+sum(BD(ind)); % Upper bound for Benders Decomposition
disp('Benders Cut'); disp(sv);
for i=1:j0 disp(BD(i)); disp('y'); disp(i); end;
% Master Problem and Inserting Benders cut into the Master problem
% Cost coefficents in Objective Function f1=zeros(j0+1,1); f1(1)=1; f1(2:j0+1)=0;
% Lower bounds lb1=zeros(j0+1,1);
% Upper bounds ub1=Inf(j0+1,1); ub1(2:j0+1)=1;
% Integer variables M1=(2:j0+1); e1=2^-24;
A_temp=zeros(1,j0+1); b_temp=zeros(1,1); A_temp(1,1)=-1;
Aeq1(1,2:j0+1)=1; Beq1=p0;
% Defining the new Benders cut as an Inequality constraint for j=2:j0+1 A_temp(1,j)=BD(j-1); b_temp(1)=-sv; end;
% Adding the new Benders cut to the previous constraints for j=1:j0+1 A1(iter,j)=A_temp(1,j); b1(iter,1)=b_temp(1,1); end;
% Solving the Master Problem using Integer Programming [x1,f1val,status]=IP1(f1,A1,b1,Aeq1,Beq1,lb1,ub1,M1,e1);
68
%x1=round(x1); %f1val=round(f1val);
LB=f1val; % Lower bound for Benders Decomposition e=UB-LB;
for i=1:j0 y(i)=x1(i+1); end;
iter=iter+1;
disp('New y values'); disp(y); disp('New DC Locations'); ind=find(y); disp(ind);
end;
toc;
69
II.MATLAB Output: DC Locations for Trial 1 values
Trial Farmers i0 DCs j0 CPKs k0 Commodities l0 No. of DCs p
1 10 10 10 2 2
Given value of p:
2
Initial y values:
0 0 0 0 0 1 0 1 0 0
DC Locations:
6 8
Optimization terminated.
Farmers-->DCs
3 6
6 6
10 6
1 8
2 8
4 8
5 8
7 8
8 8
9 8
The farmers allotted to DC 6 are:
3
6
10
The farmers allotted to DC 8 are:
1
2
4
5
7
8
9
Benders Cut
34.1073
7.2015
70
y
1
4.2810
y
2
-2.5857
y
3
9.0449
y
4
4.5849
y
5
7.4159
y
6
7.0217
y
7
4.5729
y
8
2.2371
y
9
2.9039
y
10
New y values
0 0 1 0 0 0 0 0 1 0
New DC Locations
3 9
Benders Cut
34.1073
71
7.2015
y
1
4.2810
y
2
-339.5608
y
3
9.0449
y
4
4.5849
y
5
7.4159
y
6
-333.1326
y
7
4.5729
y
8
2.2371
y
9
2.9039
y
10
New y values
0 0 1 0 0 0 0 0 1 0
New DC Locations
3 9
Elapsed time is 0.080416 seconds.
72
III.MATLAB Output: DC Locations for Trial 2 values
Trial Farmers i0 DCs j0 CPKs k0 Commodities l0 No. of DCs p
2 30 30 30 3 6
Given value of p:
6
Initial y values:
Columns 1 through 14
0 0 0 1 1 0 0 0 0 0 0 0 1 1
Columns 15 through 28
0 0 0 0 0 0 0 0 0 0 0 1 0 0
Columns 29 through 30
0 1
DC Locations:
4 5 13 14 26 30
Optimization terminated.
Farmers-->DCs
3 4
11 4
12 4
20 4
23 4
26 4
2 5
4 5
10 5
15 5
19 5
30 5
9 13
18 13
24 13
7 14
13 14
25 14
1 26
5 26
8 26
14 26
17 26
6 30
16 30
21 30
22 30
73
27 30
28 30
29 30
The farmers allotted to DC 4 are:
3
11
12
20
23
26
The farmers allotted to DC 5 are:
2
4
10
15
19
30
The farmers allotted to DC 13 are:
9
18
24
The farmers allotted to DC 14 are:
7
13
25
The farmers allotted to DC 26 are:
1
5
8
14
17
The farmers allotted to DC 30 are:
6
74
16
21
22
27
28
29
Benders Cut
114.7719
9.8443
y
1
6.1026
y
2
1.1750
y
3
9.2530
y
4
8.0471
y
5
9.9692
y
6
1.5998
y
7
7.7365
y
8
9.4030
75
y
9
3.8232
y
10
5.0134
y
11
9.4110
y
12
1.8494
y
13
3.7367
y
14
1.3406
y
15
8.1866
y
16
6.6269
y
17
5.9978
y
18
1.9657
y
19
1.3634
y
76
20
7.5343
y
21
4.5932
y
22
4.4876
y
23
8.3341
y
24
7.8334
y
25
5.7379
y
26
5.8644
y
27
4.6520
y
28
4.9384
y
29
6.9913
y
30
New y values
Columns 1 through 14
0 0 1 0 0 0 1 0 0 0 0 0 1 0
77
Columns 15 through 28
1 0 0 0 1 1 0 0 0 0 0 0 0 0
Columns 29 through 30
0 0
New DC Locations
3 7 13 15 19 20
Benders Cut
114.7719
9.8443
y
1
6.1026
y
2
-3.4420e+003
y
3
9.2530
y
4
-3.4351e+003
y
5
9.9692
y
6
1.5998
y
7
7.7365
y
8
9.4030
y
78
9
3.8232
y
10
-3.4381e+003
y
11
9.4110
y
12
1.8494
y
13
3.7367
y
14
-3.4418e+003
y
15
-3.4350e+003
y
16
6.6269
y
17
5.9978
y
18
1.9657
y
19
1.3634
y
20
79
7.5343
y
21
4.5932
y
22
4.4876
y
23
8.3341
y
24
7.8334
y
25
5.7379
y
26
5.8644
y
27
4.6520
y
28
4.9384
y
29
6.9913
y
30
New y values
Columns 1 through 14
0 0 1 0 0 0 1 0 0 0 0 0 1 0
Columns 15 through 28
80
1 0 0 0 1 1 0 0 0 0 0 0 0 0
Columns 29 through 30
0 0
New DC Locations
3 7 13 15 19 20
Elapsed time is 1.011206 seconds.
81
APPENDIX C
I.MATLAB Code for solving MILP
tic;
odc=[3,9]; % Open DCs cdc=[1,2,4,5,6,7,8,10]; % Closed DCs
%Objective function cost co-efficient f=rand(2020,1)*20+20; % Trial values: i=10;j=10;k=10;l=2 % 1000 continuous variables for Qijkl and % 20 binary variables for Yij
% Integer variables M=(2001:2020); e=2^-24;
%Lower Bounds lb=zeros(2020,1);
%Upper Bounds ub=inf(2020,1); ub(2001:2020)=1;
%Linear equalities Aeq=zeros(1630,2020);
% Quantities belonging to closed DCs are assigned zero % Commodity 1 for i=1:20 Aeq(i,i)=1; end;
for i=21:70 Aeq(i,i+10)=1; end;
for i=71:100 Aeq(i,i+20)=1; end;
for i=101:150 Aeq(i,i+30)=1; end;
for i=151:180 Aeq(i,i+40)=1; end;
for i=181:230 Aeq(i,i+50)=1; end;
82
for i=231:260 Aeq(i,i+60)=1; end;
for i=261:310 Aeq(i,i+70)=1; end;
for i=311:340 Aeq(i,i+80)=1; end;
for i=341:390 Aeq(i,i+90)=1; end;
for i=391:420 Aeq(i,i+100)=1; end;
for i=421:470 Aeq(i,i+110)=1; end;
for i=471:500 Aeq(i,i+120)=1; end;
for i=501:550 Aeq(i,i+130)=1; end;
for i=551:580 Aeq(i,i+140)=1; end;
for i=581:630 Aeq(i,i+150)=1; end;
for i=631:660 Aeq(i,i+160)=1; end;
for i=661:710 Aeq(i,i+170)=1; end;
for i=711:740 Aeq(i,i+180)=1; end;
for i=741:790
83
Aeq(i,i+190)=1; end;
for i=791:820 Aeq(i,i+200)=1; end;
% Commodity 2 for i=821:870 Aeq(i,i+210)=1; end;
for i=871:900 Aeq(i,i+220)=1; end;
for i=901:950 Aeq(i,i+230)=1; end;
for i=951:980 Aeq(i,i+240)=1; end;
for i=981:1030 Aeq(i,i+250)=1; end;
for i=1031:1060 Aeq(i,i+260)=1; end;
for i=1061:1110 Aeq(i,i+270)=1; end;
for i=1111:1140 Aeq(i,i+280)=1; end;
for i=1141:1190 Aeq(i,i+290)=1; end;
for i=1191:1220 Aeq(i,i+300)=1; end;
for i=1221:1270 Aeq(i,i+310)=1; end;
for i=1271:1300 Aeq(i,i+320)=1;
84
end;
for i=1301:1350 Aeq(i,i+330)=1; end;
for i=1351:1380 Aeq(i,i+340)=1; end;
for i=1381:1430 Aeq(i,i+350)=1; end;
for i=1431:1460 Aeq(i,i+360)=1; end;
for i=1461:1510 Aeq(i,i+370)=1; end;
for i=1511:1540 Aeq(i,i+380)=1; end;
for i=1541:1590 Aeq(i,i+390)=1; end;
for i=1591:1600 Aeq(i,i+400)=1; end;
% Single sourcing farmers: Ej Yij = 1 For all i Aeq(1601,[2001 2011])=[1 1]; Aeq(1602,[2002 2012])=[1 1]; Aeq(1603,[2003 2013])=[1 1]; Aeq(1604,[2004 2014])=[1 1]; Aeq(1605,[2005 2015])=[1 1]; Aeq(1606,[2006 2016])=[1 1]; Aeq(1607,[2007 2017])=[1 1]; Aeq(1608,[2008 2018])=[1 1]; Aeq(1609,[2009 2019])=[1 1]; Aeq(1610,[2010 2020])=[1 1];
% Demand equalities: EiEj Qijkl = Dkl Aeq(1611,(1:10:991))=1; Aeq(1612,(2:10:992))=1; Aeq(1613,(3:10:993))=1; Aeq(1614,(4:10:994))=1; Aeq(1615,(5:10:995))=1; Aeq(1616,(6:10:996))=1; Aeq(1617,(7:10:997))=1; Aeq(1618,(8:10:998))=1;
85
Aeq(1619,(9:10:999))=1; Aeq(1620,(10:10:1000))=1; Aeq(1621,(1001:10:1991))=1; Aeq(1622,(1002:10:1992))=1; Aeq(1623,(1003:10:1993))=1; Aeq(1624,(1004:10:1994))=1; Aeq(1625,(1005:10:1995))=1; Aeq(1626,(1006:10:1996))=1; Aeq(1627,(1007:10:1997))=1; Aeq(1628,(1008:10:1998))=1; Aeq(1629,(1009:10:1999))=1; Aeq(1630,(1010:10:2000))=1;
beq=zeros(1630,1); beq(1601:1610)=1;
% capacities at all farmers > demand at all CPKs %for i=1:2 % while(sum(pc(:,i))<sum(dc(:,i))) % pc=round(rand(10,2)*90+10);% Defining capacities at farmers Pil % dc=round(rand(10,2)*90+10);% Defining Demand at CPKs Dkl % end; %end;
pc=[[25;77;53;69;97;38;17;81;43;63;],[27;17;24;84;37;45;69;84;79;44;]]; dc=[[27;68;10;35;67;63;39;99;21;76;],[24;49;85;42;17;60;35;22;73;54;]];
count=1611; for l=1:2 for i=1:10 beq(count)=dc(i,l); count=count+1; end; end;
%Linear Inequalities A=zeros(408,2020);
co=1; for i=1:100 if(ceil(i/10)==3) A(co,[i 2001])=[1 -10000]; co=co+1; end; if(ceil(i/10)==9) A(co,[i 2011])=[1 -10000]; co=co+1; end; end;
co=21; for i=101:200 if(ceil(i/10)==13) A(co,[i 2002])=[1 -10000]; co=co+1;
86
end; if(ceil(i/10)==19) A(co,[i 2012])=[1 -10000]; co=co+1; end; end;
co=41; for i=201:300 if(ceil(i/10)==23) A(co,[i 2003])=[1 -10000]; co=co+1; end; if(ceil(i/10)==29) A(co,[i 2013])=[1 -10000]; co=co+1; end; end;
co=61; for i=301:400 if(ceil(i/10)==33) A(co,[i 2004])=[1 -10000]; co=co+1; end; if(ceil(i/10)==39) A(co,[i 2014])=[1 -10000]; co=co+1; end; end;
co=81; for i=401:500 if(ceil(i/10)==43) A(co,[i 2005])=[1 -10000]; co=co+1; end; if(ceil(i/10)==49) A(co,[i 2015])=[1 -10000]; co=co+1; end; end;
co=101; for i=501:600 if(ceil(i/10)==53) A(co,[i 2006])=[1 -10000]; co=co+1; end; if(ceil(i/10)==59) A(co,[i 2016])=[1 -10000]; co=co+1; end; end;
co=121;
87
for i=601:700 if(ceil(i/10)==63) A(co,[i 2007])=[1 -10000]; co=co+1; end; if(ceil(i/10)==69) A(co,[i 2017])=[1 -10000]; co=co+1; end; end;
co=141; for i=701:800 if(ceil(i/10)==73) A(co,[i 2008])=[1 -10000]; co=co+1; end; if(ceil(i/10)==79) A(co,[i 2018])=[1 -10000]; co=co+1; end; end;
co=161; for i=801:900 if(ceil(i/10)==83) A(co,[i 2009])=[1 -10000]; co=co+1; end; if(ceil(i/10)==89) A(co,[i 2019])=[1 -10000]; co=co+1; end; end;
co=181; for i=901:1000 if(ceil(i/10)==93) A(co,[i 2010])=[1 -10000]; co=co+1; end; if(ceil(i/10)==99) A(co,[i 2020])=[1 -10000]; co=co+1; end; end;
co=201; for i=1001:1100 if(ceil(i/10)==103) A(co,[i 2001])=[1 -10000]; co=co+1; end; if(ceil(i/10)==109) A(co,[i 2011])=[1 -10000]; co=co+1;
88
end; end;
co=221; for i=1101:1200 if(ceil(i/10)==113) A(co,[i 2002])=[1 -10000]; co=co+1; end; if(ceil(i/10)==119) A(co,[i 2012])=[1 -10000]; co=co+1; end; end;
co=241; for i=1201:1300 if(ceil(i/10)==123) A(co,[i 2003])=[1 -10000]; co=co+1; end; if(ceil(i/10)==129) A(co,[i 2013])=[1 -10000]; co=co+1; end; end;
co=261; for i=1301:1400 if(ceil(i/10)==133) A(co,[i 2004])=[1 -10000]; co=co+1; end; if(ceil(i/10)==139) A(co,[i 2014])=[1 -10000]; co=co+1; end; end;
co=281; for i=1401:1500 if(ceil(i/10)==143) A(co,[i 2005])=[1 -10000]; co=co+1; end; if(ceil(i/10)==149) A(co,[i 2015])=[1 -10000]; co=co+1; end; end;
co=301; for i=1501:1600 if(ceil(i/10)==153) A(co,[i 2006])=[1 -10000]; co=co+1;
89
end; if(ceil(i/10)==159) A(co,[i 2016])=[1 -10000]; co=co+1; end; end;
co=321; for i=1601:1700 if(ceil(i/10)==163) A(co,[i 2007])=[1 -10000]; co=co+1; end; if(ceil(i/10)==169) A(co,[i 2017])=[1 -10000]; co=co+1; end; end;
co=341; for i=1701:1800 if(ceil(i/10)==173) A(co,[i 2008])=[1 -10000]; co=co+1; end; if(ceil(i/10)==179) A(co,[i 2018])=[1 -10000]; co=co+1; end; end;
co=361; for i=1801:1900 if(ceil(i/10)==183) A(co,[i 2009])=[1 -10000]; co=co+1; end; if(ceil(i/10)==189) A(co,[i 2019])=[1 -10000]; co=co+1; end; end;
co=381; for i=1901:2000 if(ceil(i/10)==193) A(co,[i 2010])=[1 -10000]; co=co+1; end; if(ceil(i/10)==199) A(co,[i 2020])=[1 -10000]; co=co+1; end; end;
90
A(401,[21:30,121:130,221:230,321:330,421:430,521:530,621:630,721:730,821:830,
921:930])=1; A(401,(2001:2010))=[-25 -77 -53 -69 -97 -38 -17 -81 -43 -63]; A(402,[1021:1030,1121:1130,1221:1230,1321:1330,1421:1430,1521:1530,1621:1630,
1721:1730,1821:1830,1921:1930])=1; A(402,(2001:2010))=[-27 -17 -24 -84 -37 -45 -69 -84 -79 -44]; A(403,[81:90,181:190,281:290,381:390,481:490,581:590,681:690,781:790,881:890,
981:990])=1; A(403,(2011:2020))=[-25 -77 -53 -69 -97 -38 -17 -81 -43 -63]; A(404,[1081:1090,1181:1190,1281:1290,1381:1390,1481:1490,1581:1590,1681:1690,
1781:1790,1881:1890,1981:1990])=1; A(404,(2011:2020))=[-27 -17 -24 -84 -37 -45 -69 -84 -79 -44];
% Throughput constraints A(405,[21:30,121:130,221:230,321:330,421:430,521:530,621:630,721:730,821:830,
921:930])=1; A(405,[1021:1030,1121:1130,1221:1230,1321:1330,1421:1430,1521:1530,1621:1630,
1721:1730,1821:1830,1921:1930])=0.89; A(406,[81:90,181:190,281:290,381:390,481:490,581:590,681:690,781:790,881:890,
981:990])=1; A(406,[1081:1090,1181:1190,1281:1290,1381:1390,1481:1490,1581:1590,1681:1690,
1781:1790,1881:1890,1981:1990])=0.89; A(407,[21:30,121:130,221:230,321:330,421:430,521:530,621:630,721:730,821:830,
921:930])=-1; A(407,[1021:1030,1121:1130,1221:1230,1321:1330,1421:1430,1521:1530,1621:1630,
1721:1730,1821:1830,1921:1930])=-0.89; A(408,[81:90,181:190,281:290,381:390,481:490,581:590,681:690,781:790,881:890,
981:990])=-1; A(408,[1081:1090,1181:1190,1281:1290,1381:1390,1481:1490,1581:1590,1681:1690,
1781:1790,1881:1890,1981:1990])=-0.89;
b=zeros(408,1); b(405:406)=500; %Maximum Throughput b(407:408)=350; %Minimum Throughput
[x,f1val,status]=IP1(f,A,b,Aeq,beq,lb,ub,M,e);
xf3=x(2001:2010); xf9=x(2011:2020);
f3=find(xf3);% Farmers alloted to DC 3 f9=find(xf9);% Farmers alloted to DC 9
disp('The farmers allotted to DC 3 are:'); disp(f3); disp('The farmers allotted to DC 9 are:'); disp(f9);
Q=zeros(10,10,10,2);
co=1; for l=1:2 for i=1:10 for j=1:10 for k=1:10
91
Q(i,j,k,l)=x(co); co=co+1; end; end; end; end;
% Throughput of DCs b1=sum(x([21:30,121:130,221:230,321:330,421:430,521:530,621:630,721:730,821:8
30,921:930])); b2=sum(x([1021:1030,1121:1130,1221:1230,1321:1330,1421:1430,1521:1530,1621:16
30,1721:1730,1821:1830,1921:1930])); b3=sum(x([81:90,181:190,281:290,381:390,481:490,581:590,681:690,781:790,881:8
90,981:990])); b4=sum(x([1081:1090,1181:1190,1281:1290,1381:1390,1481:1490,1581:1590,1681:16
90,1781:1790,1881:1890,1981:1990]));
% Intensity factor
I1=1.0; % Commodity 1 I2=0.89; % Commodity 2
t1=b1*I1+b2*I2; t2=b3*I1+b4*I2;
disp('Throughput of DC 3 is :'); disp(t1); disp('Throughput of DC 9 is :'); disp(t2);
toc;
92
II.MATLAB Output:
The farmers allotted to DC 3 are:
1
2
4
5
7
The farmers allotted to DC 9 are:
3
6
8
9
10
Throughput of DC 3 is:
435.2600
Throughput of DC 9 is:
480.0300
Elapsed time is 30.578375 seconds.
Qijkl Values:
Commodity 1 (l=1):
val(:,:,1,1) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 27.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 val(:,:,2,1) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 68.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0
93
0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 val(:,:,3,1) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 10.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 val(:,:,4,1) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 35.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 val(:,:,5,1) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 67.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 val(:,:,6,1) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 63.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0
94
0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 val(:,:,7,1) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 39.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 val(:,:,8,1) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 99.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 val(:,:,9,1) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 21.0000 0 val(:,:,10,1) = 0 0 2.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0
95
0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 74.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0
Commodity 2 (l=2):
val(:,:,1,2) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 24.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 val(:,:,2,2) = 0 0 49.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 val(:,:,3,2) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 49.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 36.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0
96
val(:,:,4,2) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 42.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 val(:,:,5,2) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 17.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 val(:,:,6,2) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 60.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 val(:,:,7,2) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 35.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0
97
0 0 0.0000 0 0 0 0 0 0.0000 0 val(:,:,8,2) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 22.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 val(:,:,9,2) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 73.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 val(:,:,10,2) = 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 54.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0 0 0 0.0000 0 0 0 0 0 0.0000 0