Вы находитесь на странице: 1из 143

Zagazig University

Faculty of Engineering




Solution Methodology Based Genetic
Algorithm For Multi-Objective Facility
Layout Problem


A Thesis submitted in fulfillment of the requirements for the degree of Master of
Philosophy to Industrial Engineering and Systems Department



By
Raafat Hussien El-Shaer
Industrial and Systems Engineering Department, Faculty of Engineering,
Zagazig University.




Supervisors:
Prof. Dr. Gamal Mohamed Nawara
Industrial and Systems Engineering Department, Faculty of Engineering,
Zagazig University.
Prof. Dr. Mohamed Abbas Shouman
Operations Research and Decision Support Department, Faculty of Computers
and Informatics, Zagazig University.
Dr. Hisham Mohamed El awady
Industrial and systems Engineering Department, Faculty of Engineering,
Zagazig University.


Approval Sheet:


Solution Methodology Based Genetic Algorithm For
Multi-Objective Facility Layout Problem
A Thesis
By
Raafat Hussien El-Shaer

Submitted in fulfillment of the requirements for the degree of Master of
Philosophy to Industrial Engineering and Systems Department





Approved as to style and content by:



Prof. Dr. Faten Faheem Mahmoud
Industrial and Systems Engineering Department, Faculty of
Engineering, Zagazig University.

Prof. Dr. Mohamed Nashaat Forse
Industrial Engineering Department, Faculty of Engineering,
Alexandria University.

Prof. Dr. Gamal Mohamed Nawara
Industrial and Systems Engineering Department, Faculty of
Engineering, Zagazig University.

Prof. Dr. Mohamed Abbas Shouman
Operations Research and Decision Support Department,
Faculty of Computers and Informatics, Zagazig University.



I
Acknowledgements




No words can express my limitless gratitude and most sincere
thanks to Allah against what He has given us. Special thanks
and great appreciation are to Prof. Gamal Mohamed Nawara
for his great tolerance and strong support. Special thanks and
great appreciation are Also to Prof. Mohamed Abbas Shouman
for his keen supervision and to the precious and valuable time he
gave me. Thanks to his insightful comments, suggestions and
valuable feedback he kindly offered, which helped me so much to
accomplish my thesis.
Also special thanks are due to Dr. Hisham Mohamed El awady
for his great tolerance and sincere help, which guided me to
fulfill this work.
Moreover, my thanks are also due to many colleagues for various
help .
Finally, I would like to say thank-you to my family and my
wife who encourage me and give me a quiet times to achieve
this thesis.









II
Abstract


The facility layout problem (FLP) concerns finding the most effective
arrangement of facilities, personals, and any resources required so as to
minimize the costs associated with projected interaction among them. These
costs may reflect material handling costs or preferences regarding
adjacencies among departments. Because its one of the truly difficult ill-
structured, multi-criteria, multi-objectives, and NP-completeness problem; the
Artificial Intelligence techniques are one of the most powerful tools to deal
with this problem category. Therefore, the prime objective of this study is to
apply the Genetic Algorithm, (GA) as an efficient AI tool, capable of dealing
with this problem and generating reasonable good solutions within a suitable
CPU time.
In order to achieve this objective, the following points have been fulfilled:
1. A comprehensive review of literature on facilities layout is presented to
show the progressive changes that have occurred over the past
decades in techniques, the concepts and models. Especially, in Multi-
Objectives facility layout problem (MOFLP).
2. A brief overview of GAs is presented, which shows the motivated idea
of the algorithm, the relevant operators, the encoding ways, the
selection methods, crossover methods and mutation methods.
3. GA is proposed for the problem under consideration, with
comprehensive illustration for its building operators and parameters are
discussed in details.
4. GAMOFLP Software, written with C++language, is developed for the
proposed GA in point (3).
This work addresses the second design stage of the cellular layout (i.e. inter-
cell layout problem), which is a phase of the cellular manufacturing design,
and is an important step before the design of finalized layout. The inter-cell
layout problem seeks the best arrangement of cells based on their inter-
relationships within the available area. In The proposed GA, a special
permutation encoding is used to represent the chromosome and the
III
generation-based reproduction system with Elitism is applied using the
tournament selection method, two-points crossover method and order change
mutation method.
In this work, the problem planning time is short and one floor is considered,
and the available floor space can have restricted areas. The problem is
affected by multiple criteria and has multiple objectives. The scaling problem
among objectives is solved by a reasonable quadratic model.
A solution methodology based GA for multi-objectives FLP (GAMOFLP) is
developed to handle the conflicting criteria and normalize the objectives
variables that affect the problem in order to get fair and reasonable good
solution.
The proposed GAMOFLP program is designed to tackle the following types of
FLPs:
1. Establish a layout for new facilities.
2. Establish a layout for new facilities subject to restricted areas.
3. Select the best position to add new facility (facilities) to an existing
layout (plant).
The validation of the proposed GAMOFLP system is verified using solved 20
problems that have published in previous researches. The results have
proved the efficiency and effectiveness of the proposed system and its
capability of getting acceptable suboptimal solutions within convenient time. In
details, related to the final solutions, the experiments show that the proposed
GAMOFLP capable of finding better solutions than that those published or at
least equal. Also comparatively with the required time to find the final
solutions, in spite of its not fair tool for comparing, the results show the
superiority of the system in providing better solutions within less CPU time
than have published or at most in its limits.







IV
Contents

Page
Acknowledgement I
Abstract II
List of Tables VII
List of Figures VIII
List of Abbreviations X

Chapter 1
Introduction to Facility Layout Problem and Genetic Algorithms 1
1.1 Facility Layout Problem 1
1.2 Genetic Algorithms (GAs) 3
1.3 Thesis Outline 4

Chapter 2
A Review and survey of FLPs 6
2.1 Introduction 6
2.2 FLP Formulation 6
2.3 Computational Complexity 7
2.4 Optimal Algorithms and Suboptimal Algorithms 9
2.4.1 Optimal Algorithms 9
2.4.2 Suboptimal Algorithms 9
2.4.2.1 Constructive approaches 10
2.4.2.2 Improving approaches 11
2.4.2.3 Hybrid approaches 11
2.4.2.4 Graphical approaches 11
2.5 Intelligent Techniques for FLP 12
2.5.1 Expert Systems and MCFLP 12
2.5.2 Fuzzy Aystems and MCFLP 13
2.5.3 Genetic Algorithms for MCFLP 14
2.5.4 Intelligent Hybrid System for MCFLP 14
2.6 General Comments 15
V
Chapter 3 Page
Facility Layout Problem Formulation 16
3.1 Introduction 16
3.2 Quantitative Approach 17
3.3 Qualitative Approach 18
3.4 Multi-Objectives Approaches 19

Chapter 4
A Review of Genetic Algorithms 24
4.1 What is a Genetic Algorithm? 24
4.2 GA Parameters and Performance 25
4.2.1 Crossover and Mutation 25
4.2.2 Population Size 26
4.2.3 Selection Methods 26
4.2.4 Reproduction Methods 27
4.3 On-line, Off-line and Best Individual Performance 28
4.4 GA Application 29
4.4.1 Layout Problems with GAs 29
4.4.2 FLPs with GAs 30
4.5 The Need for Good Solver Techniques 31

Chapter 5
Proposed Genetic Algorithm 32
5.1 Why Genetic Algorithm? 33
5.2 The Proposed Genetic Algorithm 33
5.2.1 Chromosome Representation 34
5.2.1.1 Representation of special layout configuration 34
5.2.2 Initial Population 35
5.2.3 Selection Method 35
5.2.4 Crossover Operator 36
5.2.5 Mutation Operator 37
5.2.6 Reproduction System 37
VI
Page
5.2.7 Evaluation Function 37
5.2.8 Termination Criteria 37
5.2.9 Algorithm Steps 38
5.2.10 The default Values of The Proposed GA Parameters 39
5.3 User Interface 41
5.3.1 GAMOFLP Features 41
5.3.2 GAMOFLP Screens 42


Chapter 6
System Evaluation and Validation 51
6.1 Performance Evaluation 51
6.2 Harraz's Procedure Comparison 51
6.3 Comparison with Chen and Shas Procedure 60
6.4 Common Test Problems 62

Chapter 7
Conclusions and Future Work 65
7.1 Snapshot About Thesis 65
7.2 Conclusion 65
7.3 Scope and Recommendation of Future Work 66

References 68
Appendix ( A ): Hill-Climbing Investigation Method 76
Appendix ( B ): Test Problems Data 79
Appendix ( C ): Proposed GAMOFLP Code 84






VII
List of Tables
Page
Table 2.1 : Classification of FLP solvers. 8
Table 2.2 : Constructive approaches. 10
Table 5.1 : GA parameters to be investigated. 40
Table 5.2 : Hill-climbing investigation procedure. 40
Table 6.1 : Best solution qualities for test problem in Harraz [64]. 52
Table 6.2 : Best solution qualities for test problem in Harraz [64]. 52
Table 6.3 : Best solution qualities for test problem in Harraz [64]. 54
Table 6.4 : Best solution qualities for test problem in Harraz [64]. 55
Table 6.5 : Best solution qualities for test problem in Harraz [64]. 56
Table 6.6 : Best solution qualities for test problem in Harraz [64]. 57
Table 6.7 : Best solution qualities for test problem in Harraz [64]. 58
Table 6.8 : Best solution qualities for test problem in Harraz [64]. 59
Table 6.9 : Best solution qualities for test problems in Chen and Sha [21]. 60
Table 6.10: Best solution qualities for test problem in Chen and Sha [21]. 61
Table 6.11: Best solution qualities for the eight test problems in Nugent et al.[41]. 63
Table 6.12: Average solution qualities for test problems in Nugent et al. [41]. 64















VIII
List of Figures

Page
Figure 3.1: Two algorithms performance. 28
Figure 3.2 : Chromosome representation for an identical FLP. 30
Figure 5.1 : Phenotype representation layout. 34
Figure 5.2 : The available layout space with restricted area. 35
Figure 5.3 : Available layout space of restricted area and pre-specified facilities. 35
Figure 5.4 : PMX crossover method. 37
Figure 5.5 : Genetic algorithm flow chart. 39
Figure 5.6 : Some Basic restricted shapes for the FLPs available space. 42
Figure 5.7 : Available space and pre specified facilities. 42
Figure 5.8 : Screen no. ( 1 ) Genetic Algorithm parameters. 43
Figure 5.9 : Screen no. ( 2 ) Criteria type. 43
Figure 5.10: Screen no. ( 3 ) Layout space. 44
Figure 5.11: Screen no. ( 4 ) Available layout space. 45
Figure 5.12: Screen no. ( 5 ) Pre-specified facilities. 45
Figure 5.13: Screen no. ( 6 ) Entering relationship matrix. 46
Figure 5.14: Screen no. ( 7 ) Entering flow matrix. 46
Figure 5.15: Screen no. ( 8 ) Entering cost matrix. 46
Figure 5.16: Screen no. ( 9 ) Entering the objectives weight. 47
Figure 5.17: Screen no. (10) Confirming relationship matrix data. 47
Figure 5.18: Screen no. (11) Adjusting coding system values. 48
Figure 5.19: Screen no. (12) confirming flow matrix data. 48
Figure 5.20: Screen no. (13) Solution progress. 49
Figure 5.21: Screen no. (14) Final solution and improvement path. 49
Figure 5.22: Best illustrative example solution after 500 generation. 50
Figure 6.1: Five-department problem % improvement in the OFV and
CPU computation time. 52
Figure 6.2: Six-department problem% improvement in the OFV and
CPU computation time. 53
Figure 6.3: Seven department problem % improvement in the OFV and
CPU computation time. 54

IX
Page
Figure 6.4: Eight department problem% improvement in the OFV and
CPU computation time. 55
Figure 6.5: Nine department problem % improvement in the OFV and
CPU computation time. 56
Figure 6.6: Ten department problem % improvement in the OFV and
CPU computation time. 57
Figure 6.7: Eleven department problem % improvement in the OFV and
CPU computation time. 58
Figure 6.8: Twelve department problem % improvement in the OFV and
CPU computation time. 59
Figure 6.9: 20-department problem % improvement in the OFV. 62
Figure A.1 : Flow, adjacency and distance data for a randomly generated
25-cell problem 76
Figure B.1 : Flow, adjacency and distance data for a 5-cell problem. 79
Figure B.2 : Flow, adjacency and distance data for a 6-cell problem. 79
Figure B.3 : Flow, adjacency and distance data for a 7-cell problem. 79
Figure B.4 : Flow, adjacency and distance data for a 8-cell problem. 79
Figure B.5 : Flow, adjacency and distance data for a 9-cell problem. 80
Figure B.6 : Flow, adjacency and distance data for a 10-cell problem. 80
Figure B.7 : Flow, adjacency and distance data for a 11-cell problem. 80
Figure B.8 : Flow, adjacency and distance data for a 12-cell problem. 81
Figure B.9 : Flow, adjacency and distance data for an 8-cell problem. 81
Figure B.10: Flow, adjacency and distance data for a 12-cell problem. 81
Figure B.11: Flow, adjacency and distance data for a 15-cell problem. 82
Figure B.12: Flow, adjacency and distance data for a 20-cell problem. 83






X
List of Abbreviations

AI Artificial Intelligence
AHP Analytic Hierarchy Process
ALDEP Automated Layout Design Program
ANNs Artificial Neural Networks
AS Ant System
C++ C++Language
CM Cellular Manufacturing
CORELAP Computerized Relationship Layout Planning
CRAFT Computerized Relative Allocation of Facilities Technique
DEA Data Envelopment Analysis
DM Decision-Maker
ES Expert Systems
FATE A new Construction Algorithm for Facilities Layout
FDMS Fuzzy Decision-Making Systems
FL Fuzzy Logic
FLEXPERT Fuzzy-integrated Expert System for Facility Layout
FLP Facility Layout Problem
GA Genetic Algorithm
HC Hill-Climbing Method
HSs Hybrid Systems
KBDSS Knowledge-Based Decision
LB Lower Bound
LPA Linear Placement Algorithm
MAT Modular Allocation Technique
Max.Iter Maximum Iteration Number
MCDM Multi-Criteria Decision-Making
MCFLP Multi-Criteria Facility Layout Problem
MOFLP Multi-Objectives Facility Layout Problem
N Total Number of Facilities
NP Non-Deterministic Polynomial
OFV Objective Function Value
OV Objective Value
Pc Crossover Probability
PLANET Plant Layout Analysis and Evaluation Technique
Pm Mutation Probability
PMX Partially Matched Crossover
PopSize Population Size
QAP Quadratic Assignment Problem
QSP Quadratic Set-covering Problem
SA Simulated Annealing
SBL Shape-based Block Layout
TFC Total Flow Cost
TNR Total Numerical Rating
Ts Tournament Size
VLSI Very Large Scale Integrated
WIP Work-in-process


Chapter 1



Introduction to: Facility Layout Problem
and Genetic Algorithms




1.1 Facility Layout Problem

he facility layout problem, FLP, deals with finding the most effective
physical arrangement of facilities, personal, and any resources required
to facilitate the production of goods and services. It has attracted the attention
of many researchers due to its practical utility and interdisciplinary importance.
The production function of a manufacturing company is significantly affected
by the layout of its manufacturing shop. While a well designed layout can
considerably improve the efficiency of the shop, a poor one leads to increased
work-in-process (WIP) overloading the material handling system and
contribute to inefficient set-ups, longer queues, etc. Ham et al. [1]. Material
handling and layout related costs have been estimated to be about 20%-50%
of the operating expenses in manufacturing systems, Tompkins and White [2].
Historically, two basic approaches have most commonly been used to
generate desirable layouts: a qualitative one and a quantitative one. These
approaches are usually used one at a time when solving a facility layout
problem.
With qualitative approaches, layout designers provide subjective evaluations
of desired closeness between departments. Then, overall subjective
closeness ratings between various departments are maximized. These
subjective closeness ratings are: A (absolutely necessary), E (essentially
T
1
Chapter 1 : Introduction to FLP & GA

2
important), I (important), O (ordinary), U (unimportant) and X (undesirable), to
indicate the respective degrees of necessity that two given departments be
located close together. Layout designers may then assign numerical values to
the ratings such that they have the ranking A >E >I >O >U>X. Seehof and
Evans [3], Lee and More [4], Muther and McPherson [5] and Muther [6] have
developed algorithms based on qualitative criteria to obtain final layouts.
These different qualitative approaches are distinguished primarily by the
scoring methods used for the closeness ratings. In this aspect, the numerical
values used by Sule [7] and Harmonosky and Tothero [8] for ratings are A=4,
E=3, I=2, O=1, U=0 and X=-1. Also, the ALDEP procedure presented by
Seehof and Evans [3] used the numerical values: A=64, E=16, I=4, O=1,
U=0 and X=-1024.
Quantitative approaches involve primarily the minimization of material
handling costs between various departments. The quadratic assignment
problem (QAP) formulation for assigning N facilities to N mutually exclusive
locations is the most typical model used. Gilmore [9], Lawler [10] and, Gavett
and Plyter [11] have offered exact solution procedures using branch-and-
bound techniques. However, The QAP formulation belongs to the class of NP-
complete problems Garey and J ohnson [12], and no definite method can
achieve optimal solution in a reasonable time when 15 or more facilities are
considered. Consequently, many heuristic algorithms have been developed
for achieving a trade-off between computation time and the efficiency of the
final solution Kusiak and Heragu [13]. The proposed approach in this work is
also a heuristic one.
Many researchers are seeking about the appropriateness of a single criterion
objective selection in solving the facility layout problem due to the drawbacks
of using qualitative and quantitative approaches separately. The major
limitations on quantitative approaches are that they consider only relationships
that can be quantified and no qualitative factors are considered. The
shortcoming of qualitative approaches is their strong assumption that all
qualitative factors can be aggregated into one criterion. In real life, the facility
layout problem must consider quantitative and qualitative criteria and this falls
into the category of the multi-objective facility layout (MOFL) problem.
Chapter 1 : Introduction to FLP & GA

3
The primary purpose in solving the MOFL problem is to generate efficient
alternatives that can be presented to the decision maker for his or her
selection. Malakooti and Tsurushima [14] classified three methods for solving
the MOFL problem:
a) Generate a set of efficient layout alternatives and then present it to the
decision maker;
b) Assess the decision makers preferences first, and then generate the
best layout alternative; and,
c) Use an interactive method to find the best layout alternative.
The proposed approach in this work falls into the category of the type (a)
methods in terms of generating good-quality solutions using an effective
heuristic algorithm. As a matter of fact, Rosenblatt [15], Dutta and Sahu[16],
Fortenberry and Cox [17], Waghodekar and Sahu [18], Urban [19] and
Houshyar [20], Harmonosky and Tothero [8] all developed QAP formulations
by specifying different objective weights to generate the best layout [see
section (3.4)]. However, there are two inadequacies in these approaches:
1. All factors are not represented on the same scale.
2. Measurement units used for objectives are incomparable.
Chen and Sha [21] developed a heuristic approach to overcome the above-
mentioned inadequacies by reasonably normalizing all objectives of MOFLP,
and handling qualitative and quantitative information in a similar fashion. In
the same direction, in this work, an approach based genetic algorithm using
Chen and Shas model to deal with this problem and comparative analysis
have been presented.


1.2 Genetic Algorithms (GAs)

Genetic algorithms attempt to mimic the biological evolution process for
discovering good solutions. They are based on a direct analogy to Darwinian
natural selection and mutations in biological reproduction and belong to a
category of heuristics known as randomized heuristics. They employ
randomized choice operators in their search strategy and do not depend on
Chapter 1 : Introduction to FLP & GA

4
complete a priori knowledge of the features of the domain. These operators
have been conceived through abstractions of natural genetic mechanisms
such as crossover and mutation and have been cast into algorithmic forms
Arunkumar and Chockalingam [22]. Repetitive executions of these heuristics
need not yield the same solution.
A genetic algorithm maintains a collection or population of solutions
throughout the search. It initializes the population with a pool of potential
solutions to the problem and seeks to produce better solutions by combining
the better of the existing ones through the use of one or more genetic
operators. solutions are chosen at each iteration with a bias towards those
with the best objective values. With various mapping techniques and an
appropriate measure of fitness of solutions (i.e., objective function value), a
genetic algorithm can be tailored to evolve a solution for many types of
problems, including optimization of a function or determination of the proper
order of a sequence.
Theoretical analyses suggest that genetic algorithms can quickly locate
high performance regions in extremely large and complex search spaces. In
addition, the distributed and repeated sampling can lead to some natural
insensitivity to noisy feedback. The genetic algorithm based heuristics are
highly suited for application to large instances of problems that are hard to
model and for which no satisfactory tailored algorithms are available. There
are many variations and refinements, but basically, any genetic algorithm
contains reproduction, crossovers and mutation.
GAs have been used to find good solution to various NP-complete
problems such as time-tabling problems Ross et al [23] and cable routing
problems Kloske and Smith [24]; and have shown good performance in many
applications. Actually some papers such as Cohoon et al [25] and Tam [26]
suggest GAs superiority in FLPs. Therefore, GAs are a promising approach to
FLPs.

1.3 Thesis Outline
The scope of the work is not to solve a planning problem, it is to handle the
multi-criteria aspect that affects the idealized relative location of cells within a
Chapter 1 : Introduction to FLP & GA

5
floor plan. Due to the combinatorial and ill-structured nature of the problem, a
solution methodology based GA heuristic is developed to suggest an
acceptable solution. In the proposed GA, a special chromosome
representation is applied to represent some constraints such as restricted
locations and pre-specified facilities. Moreover, an investigation using Hill-
climbing method is applied to tune up the parameters of the proposed GA.
The approach is validated by many recommended test problems taken from
previous papers and compared with other multi-objective approaches.
This thesis consists of seven chapters including this chapter. In Chapter 2,
FLPs are reviewed and surveyed especially, multi criteria. The Genetic
Algorithms and their features are reviewed in Chapter 3. In Chapter 4, the FLP
formulation is reviewed and proposed formulation is mentioned. The
implementation details of the proposed GA are described in Chapter 5.
Chapter 6 presents comparative study between the proposed approach and
other MOFLP approaches. Finally, in Chapter 7, the conclusions of this
research work and some recommendations for future work are highlighted.





Chapter 2




A Review and survey of FLPs







2.1 Introduction
any sorts of layout can be mentioned. For example, bin-packing
problems such as Smith [27] and Falkenauer [28] try to maximize the
storage packets number; VLSI chip layout problems like Larmore et al [29]
and Saab and Rao [30] aim to minimize the area occupied by chips. In
particular, facility layout problems (FLPs) may be one of the largest fields.
This is because there is usually a problem to minimize total traffic cost
between facilities in a building. For example, FLP can be applied to
manufacturing machines in a factory Souilah [31], to people traffic in an office
Steadman [32], and to backboard wiring on an electrical board Steinberg [33].
In FLPs, under given conditions including facility size and flow between each
pair of them, the problem is to minimize the total flow cost.

2.2 FLP Formulation
Though some other models have been suggested as shown in Kusiak and
Heragu [13], the quadratic assignment problem (QAP) described in Koopmans
and beckmann [34] may be regarded as the basic representation of FLPs. The
M
2
Chapter 2 : A Review and survey of FLPs

7
name of (QAP) was so given because the objective function is a second-
degree function of variables and the constraints are linear functions of
variables. In spite of the QAP has been frequently used to model the FLP, this
does not mean that all FLPs can be formulated as a QAP. In the case of
machine layout problem (MLP) in which the locations of machines are not
known initially, QAP cannot be formulated.
The second formulation for FLP is a quadratic set-covering problem (QSP)
Bazaraa [35]. In this formulation, the total area occupied by all facilities is
divided into a number of blocks where each facility is assigned to exactly one
location and each block is occupied by at most one facility. A disadvantage of
QSP formulation is that the problem size increases as the total area occupied
by all the facilities is divided into smaller blocks Bazaraa [35].
The FLP is formulated using several integer-programing formulations. Lawler
[10] was the first to formulate the facility layout problem as a linear integer-
programing problem; Love and Wong [36] proposed a simple integer
programming formulation to the QAP. Kaufman and Broeckx [37] developed a
linear mixed integer program to formulate the FLP and Ritzman et al [38]
formulated a large mixed integer goal programming model for assigning
offices in buildings.
Flouds and Robinson [39] developed a Graph-theoretic approach model. in
this approach, it is assumed that the desirability of locating each pair of
facilities adjacent to each other is known. In this model, a closeness rating
indicating desirability of locating facility
i
adjacent to facility
j
is assumed. The
model seeks to maximize the closeness rating of the facilities.
In addition of the above formulations, Rosenblatt [15] developed a model,
which minimize the flow cost of material and maximize a closeness rating
measure (multi-objective FLP). These two objectives are conflicting
objectives. Rosenblatt [15], Dutta and Sahu [16] developed heuristic
algorithms to solve the model.

2.3 Computational Complexity
Because of there are N! ways of putting N facilities into N locations the QAPs
objective function can take N! different values at most. As a result, in order to
Chapter 2 : A Review and survey of FLPs

8
get the best layout, all the N! patterns should be estimated. Nevertheless,
since N! grows extremely large if N goes large, it is impossible to search for all
patterns in polynomial time. So, Sahni and Gonzalez [40] showed that the FLP
consisting of many facilities is a NP-complete problem. To find an optimal
solution to the fifteen-facility problem in Nugent et al [41], more than an hour
of CPU time was required on a CDC CYBER 76. Among the eight test
problems in Nugent et al [41], the largest problem for which an optimal
solution was found was the fifteen-facility layout problem. This is considered
as a major constraint.
Between the late 1950s and the mid 1990's, a number of algorithms have
been developed to solve the FLP. These algorithms may be classified as:
Optimal algorithms,
Suboptimal algorithms.
Table 2.1 lists FLP solvers as optimal and suboptimal procedures.

Table 2.1: Classification of FLP solvers Kazuhiro [42].
Procedure Description
Optimal algorithms
Looking for the best layout (How to prune the
redundant alternatives is important.) [43],[11].
Suboptimal algorithms Looking for reasonably good layout
Constructive approach Putting one facility to another
(Usually facilities having heavier load are
considered prior to lighter ones) [44],[45].
Improving approach From a random layout, exchanging some
selected facilities (selection strategy is
important.) [46],[47],[41]
Hybrid approach A combination of constructive and improving
approach. [48],[49],[50]
Graphical approach Analytical approach (a sort of constructive
approach) [51],[52]



Chapter 2 : A Review and survey of FLPs

9

2.4 Optimal Algorithms and Suboptimal Algorithms
The next subsections present a review about the two procedures.

2.4.1 Optimal Algorithms
Optimal algorithms search for the best solution by some heuristics like branch
and bound Land [43], Bazaraa and Elshafei [53] or Gavett and Plyter [11] and
cutting plane Bazaraa and Sherali [54], whereas suboptimal procedures look
for reasonably good solutions by various strategies. However, owing to the
NP-completeness, the approaches for optimal solution may be impractical
especially when number of facilities increases Hanan and Kurtzberg[55]. The
computational results reported in Lavalle and Roucairol [56] indicate that the
parallel branch and bound algorithm requires high computation time for layout
problems with twelve or more facilities. Moreover, the largest facility layout
problems are solved optimally by a cutting plane algorithm is a layout problem
with eight facilities.
A common experience of optimal algorithms is that optimal solution is found
early in the branching process but is not verified until a substantially high
number of solutions have been enumerated Burkard and Stratmann [48],
Bazaraa and Kirca [49]. This prompted researchers to terminate the branch
and bound process prematurely without verifying optimality. This resulted in
heuristic branch and bound algorithms.
Burkard [57] listed two criteria for premature termination of branch and bound
process; termination based on time limits and termination based on upper
bounds quality.

2.4.2 Suboptimal algorithms
The optimal algorithms discussed above have the following disadvantages [13]:
1. Computational time requirement is high.
2. The largest problem size solved optimally is a problem of fifteen facilities.
This directs the researchers to concentrate on suboptimal algorithms for
solving the FLP. According to Kusiak and Heragu [13], the suboptimal
algorithms can be categorized into four approaches as exhibited in Table 2.1.
Chapter 2 : A Review and survey of FLPs

10

2.4.2.1 Constructive approaches
Some algorithms like MAT in Edwards et al [44] and LPA in Neghabat
[45] are called constructive approaches, since they make physical layouts by
adding one facility to another. In these approaches, deciding the order of
putting facilities is generally important. In this aspect, LPA begins by placing
the two facilities of the highest flow among each other; then another facility is
placed, which has the highest flow with the located facilities, as close as
possible to them; and so on. MAT ranks pairs of facilities according to their
flow values and location pairs according to their distance values and uses this
information to determine the layout. Also there are many constructive
approaches which use Rel-chart to determine the ordering of facilities to
construct a layout like ALDEP in Seehof and Evans [3], CORLAP in Lee and
Moore [4], and RMA Comp I in Muther and McPherson [5]. Table 2.2 lists
constructive approaches summary.


Table 2.2 : Constructive approaches.
Use the following data to adjust
facilities building order
Construction
algorithm
From-to-chart Rel-chart
Year,Ref.
HC66 * 1966,[47]
ALDEP * 1967,[3]
CORLAP * 1967,[4]
RMA Comp I * 1970,[5]
MAT * 1970,[44]
PLANET * 1972,[58]
LSP * 1972,[59]
LPA * 1974,[45]
FATE * * 1978 [60]
INLAYT * 1980,[61]
FLAT * 1986,[62]

Chapter 2 : A Review and survey of FLPs

11
2.4.2.2 Improving approaches
In improving approaches, there is always an initial solution, which is
often randomly generated. Based on this initial solution, systematic
exchanges between facilities are made in order to get better solutions. The
exchanges continue until either a reasonably good solution is obtained or a
certain allowed time passes. Hence, the solution quality of these approaches
depends upon the initial layout evaluation, and the selection strategy of
exchanging facilities is critical. In this aspect, while CRAFT in Buffa et al [46]
has no limitation of facilities exchange, HC63-66 in Hiller and Connors [47]
restricte the facilities exchange in the aim of computation time reduction. Also,
some algorithms like Biased Sampling Method in Nugent et al [41] select
facilities stochastically to save time.

2.4.2.3 Hybrid approaches
hybrid approaches are used to obtain the merits of both approaches
above. This is, starting from a layout created by a constructive algorithm; the
layout is modified by some improving algorithms. For instance, Burkard and
Stratmann [48] create an initial layout by branch and bound technique under
time limit; then, improve it by exchanging two or three facilities at one time.

2.4.2.4 Graphical approaches
Graphical approaches put importance on facilities adjacencies. In these
approaches, each facility and each adjacency of two facilities are represented
by a node and an arc, respectively. Therefore, a feasible layout must be a
planar graph, which can be drawn on a plane without any intersections of
arcs. Thus, as Kusiak and Heragu [13] suggested, these approaches
classified as sorts of construction approaches because they construct a larger
graph by adding a new node to a planar graph so that the new graph can be
still planar and that its flow cost can be as small as possible. However,
according to Foulds [51], these approaches may be able to solve FLPs with at
most fifteen facilities in reasonable computation time.

The major drawbacks of the aforementioned approaches lie in the fact that the
search for the best layout is not very efficient, is not easily obtainable, and the
Chapter 2 : A Review and survey of FLPs

12
multi-objective nature are not considered in the problem Hiller and Connors
[47]. As a matter of fact, facility layout problem can be considered one of the
truly difficult ill-structured, multi-criteria decision making and combinatorial
optimization problem. According to Malakooti and Tsurushima [14] the layout
problem is an ill-structured problem because:
There are multiple criteria that must be considered to test alternate
layouts.
It is hard to determine a problem space that can represent all
characteristic of the problem.
There are many domain-specific and problem-specific constraints.

Due to the combinatorial nature of facility layout problem, finding an optimal
solution is very complex and tedious task, especially if the number of facilities
is large. Still finding out for new and recent developments rather than
conventional approaches to overcome the aforementioned drawbacks.
Intelligent techniques such as Expert systems (ESs), Fuzzy logic (FLs),
Genetic algorithms (GAs), Ant systems (ASs) , Artificial neural networks
(ANNs) and Aybrid systems (HSs) have been used as new advancements for
the tackled problem.

2.5 Intelligent Techniques for FLP
Intelligent techniques were introduced to the field of facilities layout in
the early 1980s. Most of these systems are briefly reviewed taking into
account the multi-criteria concept (MCFLP).

2.5.1 Expert Systems and MCFLP
Kumara et al [63] have developed a heuristic-based ES. They have
defined the facilities layout problem as a multi-objective problem and have
outline a methodology to handle the qualitative constraints in conjunction with
heuristic procedures for quantitative parameters.
Malakooti and Tsurushima [14] have developed an ES for multi-criteria facility
layout. Their approach is based on expert systems and multi-criteria decision-
making (MCDM). The expert system interacts with the decision-maker (DM),
Chapter 2 : A Review and survey of FLPs

13
and reflects the DMs preferences in the selection of rules and priorities. The
approach consists of two parts: (1) construction of a layout based on a set of
rules and restrictions, and (2) improvement of the layout based on interaction
with DM. The MCDM expert system approach considers and incorporates the
multiple-criteria in these two parts as follows: First, it uses priorities on the
selection of rules, adjacency of departments, and departments for
construction purposes. Second, it uses different objectives such as material
handling cost, flexibility, and material-handling time for paired comparison of
generated layouts for improvement purposes.
Harraz [64] has developed a knowledge-based decision support system for
multi-criteria facility layout. The system works in a tandem mode. It combines
a rule-based module with an optimization module. The rule-based module
enables the user to assign different priorities for criteria and generates a
layout based on a set of rules. The resultant layout is seeded optionally to the
improvement algorithm to find a better configuration for the solution. The
improvement module is based on the simulated annealing (SA) global
optimization algorithm. The proposed algorithm in the current work will use the
test problems used in Harraz [64], as a comparison.

2.5.2 Fuzzy Systems and MCFLP
Raoot and Rakshit [65] have developed a linguistic pattern approach
for multiple criteria facility layout problems. A multiple criteria model is
formulated using the basic concept of linguistic pattern and a heuristic
procedure is proposed to generate a set of efficient alternative layouts. The
problem of selection of the facility layout from a set of alternatives, which
satisfy different objectives and restrictions to known degrees, is considered as
a MCDM problem and the ELECTRE method based on out ranking relations
approach, is used to select the best layout. Dweiri and Meier [66] have
established a vigorous methodology, based on fuzzy set theory, to improve
the facility layout process. The AHP is used to find the weights of both
qualitative and quantitative factors, which affects the closeness rating
between departments in a plant. FUZZY, a computer program developed
based on the fuzzy decision-making systems (FDMS), is used to generate the
Chapter 2 : A Review and survey of FLPs

14
activity relationship charts. These charts are used by FZYCRLP, a modified
version of CORELAP, to develop the layouts. FELAP, another program based
on FDMS, is used to evaluate the layouts. This evaluation method uses the
distances and the relationships between departments to score the layout.

2.5.3 Genetic Algorithms for MCFLP
Hamamoto et al [67] developed a genetic algorithm based- facility
layout method with an embedded simulation model for the pharmaceutical
industry. This method allows the user to select the objectives that are
important in each particular layout design in the pharmaceutical industry.

2.5.4 Intelligent Hybrid Systems for MCFLP
Badiru and Arif [68] have developed, FLEXPERT, a fuzzy-integrated
expert system for facility layout. FLEXPERT considers the multi-criteria nature
of the layout problem and the fuzziness of the input data through the
integration of an expert system and a fuzzy algorithm with a commercial
facility layout program (BLOCPLAN). The system generates the best layout
that satisfies the qualitative as well as the quantitative constraints on the
layout problem. Yang and Kuo [69] proposed a hierarchical analytic hierarchy
process (AHP) and data envelopment analysis (DEA) approach to solve a
plant layout design problem. A computer-aided layout-planning tool was used
to generate a considerable numbers of layout alternatives as well as to
generate quantitative decision-making unit (DMU) outputs. The qualitative
performance measures were weighted by AHP. DEA was then used to solve
the multiple-objective layout problem. Lee and Lee [70] presented a shape-
based block layout (SBL) approach for solving facility layout problem. The
SBL approach employs hybrid genetic algorithm to find good solution. The
objective function of SBL approach minimizes total material handling cost and
maximizes space utilization. Azadivar and Wang [71] presented a facility
layout optimization technique, using simulation and genetic algorithms, that
takes into consideration the dynamic characteristics and operational
constraints of the system, and is able to solve the facility layout design
problem based on a system's performance measures, such as the cycle time
Chapter 2 : A Review and survey of FLPs

15
and productivity. Genetic algorithms are used to optimize the layout for
manufacturing effectiveness while simulation serves as a system performance
evaluation tool.

2.6 General Comments
As a result from the survey, it is concluded that the facility layout
problem still requires effective approach that overcomes the mentioned
inadequacies. In this work, an effective approach using the Chen and Shas
formulation is presented. The approach reasonably normalizes all objectives
of the MOFL problem, and handling qualitative and quantitative and any other
objectives information in similar fashion. Because of existing optimization
methods are computationally inefficient when large numbers of facilities are
involved, stochastic heuristic methods are more appropriate for generating
effective layouts.





Chapter 3

Facility Layout Problem Formulation






3.1 Introduction:
he facility layout problem formulation considers the arrangement of N
facilities to M locations (N<=M) in order to achieve some objectives such
as:
- Minimize material handling costs.
- Utilize space efficiently.
- Utilize labor efficiently.
- Eliminate bottlenecks.
- Facilitate communication and interaction between workers, between
workers and their supervisors, or between workers and customers.
- Reduce manufacturing cycle time or customer service time.
- Eliminate waste or redundant movement.
- Facilitate the entry, exit, and placement of material, Products, or
people.
- Incorporate safety and security measures.
- Promote product and service quality.
- Encourage proper maintenance activities.
- Provide visual control of operations or activities.
- Provide flexibility to adapt changing conditions.

T
3
Chapter 3: Facility Layout ProblemFormulation
17
] ) ( ) [(
2 2
) , ( k l k l k l
y y x x D + =
Two approaches are exist for solving facility layout problems, quantitative
approach and qualitative approach [72]. These approaches are:


3.2 Quantitative Approach
This approach tries to assign N facilities to M locations in order to
minimize the material handling cost between departments. In this approach,
FLP is formulated as Quadratic Assignment Problem (QAP) [34] because the
objective function is a second-degree polynomial function of the variables, and
the constraints are identical of the constraints of the assignments problems.
The objective function is defined as:



The value W
(i,j)
is the number of pallets trips required for transferring all the
parts, which use the two facilities consecutively. Note that the quantity W
(i,j)

may also be weighted by any combination of parameters to consider special
material handling requirements, part weights, actual material handling costs,
etc. to quantify the distance D
(l,k)
between the locations l and k. Two traditional
measures can be used:
Cartesian distance; i.e.:

otherwise. 0 and , location to assigned is facility if 1 of number binary is
and ; and location between distance the is
. facility and facility between flow material of number the is
Where
______ __________
, 1 0
(3) ,..., 2 , 1 1
(2) ,..., 2 , 1 1
: _
(1) .
) , (
) , (
) , (
) , (
1
) , (
1
) , (
1
1 1
) , ( ) , ( ) , ( ) , (
1
1
v u X
k l D
j i W
M N
v u all for or X
M v X
N u X
to subject
X X D W Q Min
v u
k l
j i
v u
N
u
v u
M
v
v u
N
i
N
i j
k j l i k l j i
M
l
M
l k
s
=
= s
= =
=


=
=

= + = = =
Chapter 3: Facility Layout ProblemFormulation
18

Or the rectilinear distance; i.e.:

Where (x
l
,y
l
) and (x
k
,y
k
) are the coordinates of the geometric centers of
locations whose facility i and facility j respectively. Since the coordinate space
considered is discrete and finite, each point in the space is assigned a unique
position number in order to simplify the analysis. The problem, thus, consists
of determining the position number corresponding to each of N facilities, in
order to minimize the objective function of equation (1). Constraint (2) ensures
that the facilities do not overlap when they are assigned to adjacent position.
Furthermore, constraint (3) ensures each position cannot be occupied by
more than one facility.


3.3 Qualitative Approach
It includes assigning N facilities to M locations in order to locate
departments that utilize common materials or utilities adjacent to one another,
while separating departments for reasons of safety, noise, heat, etc. The
approach uses QAP formulation [34] and employs relationship chart (REL
chart) as input to this process. The using of lettering system provides the
desirability associated of each pair of departments located adjacently. The
objective function is defined as:


) ( ) (
) , ( k l k l k l
y y x x D + =
M N
v u all for or X
M v X
N u X
to subject
X X L R Q Max
v u
N
u
v u
M
v
v u
N
i
N
i j
M
l
M
l k
k j l i k l j i
s
=
= s
= =
=


=
=

= + = = =

, 1 0
) 6 ( ,..., 2 , 1 1
) 5 ( ,..., 2 , 1 1
: _
) 4 ( .
) , (
1
) , (
1
) , (
1
1 1 1
) , ( ) , ( ) , ( ) , ( 2
Chapter 3: Facility Layout ProblemFormulation
19

3.4 Multi-Objectives Approaches
Some techniques have been presented for solving the problem with
both qualitative and quantitative objectives. These involved combining the two
formulations into one single formulation and consider both quantitative and
qualitative information.
J acobs [73] and Shang [74] formulated the problem as multi-criteria and
consider only one quantitative or qualitative factor in the objective function.
The problem is solved using computer heuristics similar to those used for
single goal problems.
Other formulation allow problem to be solved using two quantitative and
qualitative factors simultaneously such as those proposed by Harraz [64],
Sarin et al [75], and Chen and Sha [21]. The following section will present an
overview of MOFLP approaches:
The QAP formulation of the MOFL problem is shown in equations (7) to (10):
. location at facility and location at facility locating of cost The
otherwise,
, location to asssigned is facility if
0
1
Where

(10) , 1 0
(9) ,..., 2 , 1 1
(8) ,..., 2 , 1 1
: _
) 7 ( .
) , (
) , (
1
) , (
1
) , (
1
1 1 1
) , ( ) , (
k j l i A
v u
X
M N
v u all for or X
M v X
N u X
to subject
X X A Q Min
ijlk
v u
v u
N
u
v u
M
v
v u
N
i
N
i j
M
l
M
l k
k j l i ijlk
=

=
s
=
= s
= =
=


=
=

= + = = =
otherwise. (0) and , location to assigned is facility if ) 1 ( es number tak Binary
otherwise
adjacent are locations two when the
0
1

site and site between eight Location w
and facility between value rating Closeness
Where
) , (
) , (
) , (
v u X
(k) (l) L
j i R
v u
k l
j i
=

=
=
=
Chapter 3: Facility Layout ProblemFormulation
20
A
ijlk
in equation (7) is a cost variable representing the combination of
quantitative and qualitative measures in MOFL models. Equation (8) ensures
that each location contains only one facility. Equation (9) ensures that each
facility is assigned to only one location. As mentioned Chen and Sha [21],
these models are classified into four categories:
(1) Rosenblatt [15] and Dutta and Sahu [16] defined the cost term as:

Where C
ijlk
is the total material handling cost, R
ijlk
is the total
closeness rating score, and F
C
and W
R
are weights assigned to the
total material handling cost and to the total rating score.
(2) Foretenberry and Cox [17] defined the cost term as:

Where F
ij
is the workflow between two facilities, D
lk
is the distance
between two locations and R
ij
is the closeness rating desirability of
the two facilities.
(3) Urban [19] defined the cost term as:

Where C is a constant weight that determines the importance of the
closeness rating of workflow.
(4) Khare et al [76] defined the cost term as:

Where W
1
and W
2
are weights assigned to the work flow and to
the closeness rating.
The listed models are similar in nature, and vary only in stating the
relationship between the cost term A
ijlk
and the quantitative and qualitative
measures. Although, these models have been applied to the MOFL problem,
they all have two inadequacies:
1. All factors may not be represented on the same scale: for example,
values for work flow may range from zero to a tremendous amount,
,
ijlk R ijlk C ijlk
R W C F A =
,
ij lk ij ijlk
R D F A =
, ) (
lk ij ij ijlk
D CR F A + =
, ) (
2 1 lk ij ij ijlk
D R W F W A + =
Chapter 3: Facility Layout ProblemFormulation
21
while closeness rating values may range from -1 to 4. Hence, the
closeness ratings would be dominated by workflow and have little
impact on the final layout Harmonosky and Tothero [8].
2. Measurement units used for objectives are incomparable: the
closeness rating represents an order preference indicating the
necessity that given facilities be located close together. The total
closeness rating score is only an ordinal value; on the other hand, the
material flow handling is measured according to cost. Combining
these two values with different measurement units in an algebraic
operation is unsuitable Chen and Sha [21].
For the reasons cited above, Harmonosky and Tothero [8] suggested an
approach that normalizes all factors, before combining them. To normalize a
factor, each relationship value is divided by the sum of all relationship values
for that factor, as shown in equation (11).



Where S
ijm
is the relationship value between departments i and j for factor m,
and T
ijm
is the normalized relationship value between departments i and j for
factor (objective) m.
Next, all values are multiplied by weights representing the relative importance
of each factor m. Then, the sum of all values for each departments pair is
calculated.
The resulting objective function is shown in equation (12).



(11)

=
N
u
N
v
uvm
ijm
ijm
S
S
T
s). (objective factors of No. T and m, factor for wieght the is
(12) .
) , ( ) , (
m
k j l i lk ijm
N
i
N
j
M
l
M
k
T
m
m
where
X X D T Q Min
o
o

=
Chapter 3: Facility Layout ProblemFormulation
22
Harmonosky and Tothero [8] proposed a methodology for normalizing all
factors into comparable units on the same scale. However, the scaling
problem remains unresolved. Note first that values for work flow may range
from zero to a very large positive value, while closeness rating values may
range from a negative value to a positive value. After using equation (11),
most normalized relationship values of larger scaling factor are lower than
those of smaller scaling factor. As a result, the larger scaling factor would
have very little effect on the final layout. Second, different scoring values for
closeness ratings may cause some inadequacies as mentioned in Chen and
Sha [21] and presented in the literature. However, Chen and Sha [21]
proposed an approach that normalizes all factor before combining them. In
order to achieve normalization, they subtract the mean of the layout cost
distribution from each objective value and divide the result by the standard
deviation of all feasible layout costs, as exhibited in equation (13).

The variance expression V
m
, has been proposed by Khare et al [77]. The
mean M
m
of all feasible layout costs can also be computed Nugent et al. [41].
Chen and Sha [21] considered only those objectives with distance-weighted
attributes such as flow and closeness rating. For this reason, they proposed
this approach for solving the MOFL problem, which is based on the
minimization of distance-weighted objectives. This is achieved by minimization
of total flow cost (TFC) and minimization of total numerical rating (TNR) that is
presented by Khare et al. [76]. Hence, all distance-weighted objective
functions can be characterized as a normal distribution. Using proposed
equation (13), they reasonably normalize all objectives, and resolve both the
different scale and measurement unit problems. The values obtained are then
. objective for value normalize the is
. objective for on distributi cost layout the of variance the is
. objective for on distributi cost layout the of mean value the is
) 2 1 .( objective for location at
facility and location at facility locating of value objective the is
(13) ,
2 / 1
m
m H
m V
m M
,...,t , m m k j
l i S
where
V
M S
H
m
m
m
ijlkm
m
m
N
i
N
j
M
k
M
l
ijlkm
=

=

Chapter 3: Facility Layout ProblemFormulation
23
multiplied by weights (W
m
) representing the relative importance of each
objective. In their proposed model, the resulting objective function is shown in
equation (14):


Owing to the proposed model of Chen and Sha [21], as mentioned, that has
the superiority of the previous models; it is used as the evaluation criteria for
the solution quality in the current work.


(14) .

=
t
m
m m
H W Q Min



Chapter 4





A Revi ew of Geneti c Al gori thms




4.1 What is a Genetic Algorithm?

enetic algorithms (GAs) are a problem solving technique hinted at by
living creatures evolution Whitley [78]. In GAs, chromosomes, linear
encodings of a problems possible solution, are selected from a population,
operations such as crossovers and mutations are applied; and they survive in
higher probability if they are regarded as a better ones. That is, a GAs
mechanism is similar to natures one in which superior individuals can
produce more descendants in the future.
In order to use GAs for solving a problem, important points are considered:
Representation of the chromosomes;
Design of crossover and mutation operators; and
Fitness functions.

G
4
Chapter 4 : A Revi ew of Geneti c A l gori thms

25
4.2 GA Parameters and Performance
In GAs, there are many kinds of parameters, which influence the GAs
behavior. The next section, some important GA parameters and their
influences will be briefly reviewed.

4.2.1 Crossover and Mutation: crossover usually takes two parents and
can reproduce one, two or more children. In actual GAs, the allele of either
parent is simply copied into the corresponding place of the childs
chromosome. There are some variations e.g. one-point crossover, two-point
crossover, and uniform crossover.
One-point crossover first specifies a split point on a chromosome at
random; then copies the alleles between the head and the splitting
point of one parent and those between the splitting point and the tail of
the other parent.
Two-point crossover initially choose two splitting points at random; then
duplicates the alleles between the splitting points of one parent, and
the other alleles from the other parent.
Uniform crossover randomly picks each allele from either of the two
parents.
If two parents 1-2-3-4-5 and 6-7-8-9-0 are selected, a child 1-2-8-9-0 may be
created by one-point crossover, 1-7-8-4-5 may be produced by two-point
crossover, and uniform crossover may generate 1-7-8-4-0.
In contrast, mutation may happen to one allele or probabilistically to every
allele. A chromosome 1-2-3-4-5 may be changed to 1-6-3-4-5.

In GAs, crossover rate and mutation rate are applied. For instance, if
crossover rate is .4 and mutation rate is .01, crossover will happen with 40%
probability and mutation will occur on each allele with 1% probability.
Therefore, if the chromosome consists of L alleles, a chromosomes changing
probability by the mutation is 1-(1-M)
L
LM where M is the mutation rate and M
can be assumed to be less than 1/L Goldberg [79].

Chapter 4 : A Revi ew of Geneti c A l gori thms

26
4.2.2 Population Size: the number of chromosomes is often called
population size, and it may also influence the GA. As mentioned in Goldberg
[79], a GA of large population size may have better solutions ultimately
because of large number of chromosomes may include good schemata in
some chromosome. On the other hand, GAs with smaller population can
change rapidly; therefore, it may show better performance in the early stages
rather than those with a larger population.

4.2.3 Selection Methods: There are many kinds of selection methods; three
methods are introduced here:
Rank method Baker [80] first sorts all the chromosomes in order of fitness
values; then, the probability of selecting a particular chromosome is
proportional to the inverse for the order rather than the fitness itself. If there
are five chromosomes whose fitness values are 1, 6, 3, 8, 5; then the rank
ordering is 5th, 2nd, 4th, 1st, 3rd and the probabilities of selection are 1/15,
4/15, 2/15, 5/15, 3/15.
In contrast, tournament selection Brindle [81] is as follows. First, a particular
number S is decided as the size of tournament. Second, S chromosomes are
uniformly chosen from all the chromosomes (population size). Finally, the best
one among the S chromosomes is selected as a parent. Of course, two
parents are required in normal GAs; therefore, the above process is usually
done 2N times, where N is the population size. In the tournament selection,
the same chromosome may be chosen more than once Whitley [78].
However, the tournament selection with large S causes a strong pressure to
choose very fit chromosomes. And, this leads premature convergence of
chromosomes, which usually produce only poor solutions. To explain it, let us
consider the probabilities of being chosen as a parent for the five
chromosomes: the best one in the generation; the 75th percentile; the median;
the 25th percentile; and the worse one. In tournament selection, each
candidate for parents has to win against (S-1) competitors in a group to
become a parent. Because the probabilities of meeting a weaker chromosome
for the five chromosomes are 100%, 75%, 50%, 25% and 0%; the
probabilities of becoming a parent by winning against (S-1) competitors for the
Chapter 4 : A Revi ew of Geneti c A l gori thms

27
five are 1, (0.75)
s-1
, (0.5)
s-1
, (0.25)
s-1
and 0. Thus, if S= 2, they are 1, 0.75, 0.5,
0.25 and 0; and if S=5, they are 1, 0.32, 0.06, 0.004 and 0. Hence, we can see
that very fit chromosomes will be frequently chosen as parents in large S.
Modified tournament selection method may be useful in some cases to
cope with this defect as mentioned in Ross and Hallam [82]. In this method, a
chromosome is first chosen as the first candidate at random; secondly, the
chromosome is compared with at most (S-1) chromosomes randomly chosen.
If a better chromosome than the first candidate is found from the (S-1)
chromosomes, then the better one is selected as a parent immediately;
however, if all the (S-1) chromosomes are worse than the first candidate, then
the first one is selected as a parent. Therefore, other candidates than the first
one can become the parent only by beating the first candidate. Hence, the
strong pressure to choose very fit chromosome observed in tournament
selection should become weaker in this modified tournament selection.

4.2.4 Reproduction Methods there are some variations of reproduction
methods. In the next section, two methods are explained:
Genitor method Whitley [83], is considered as one of the ( + ) evolution
strategy Baeck et al [84], in which offspring are produced from parents,
and the best chromosomes of ( + ) are retained. Because the best
chromosomes are always retained in this strategy, the population may
converge gradually without drastic drifts. On the other hand, the generation-
based GA is regarded as one of the (, ) evolution strategy, in which
offspring are produced from parents and the best chromosomes of are
retained. Because the best chromosomes may be lost in this strategy, the
population may dramatically drift in search space for solutions. Therefore, all
the chromosomes in Genitor may converge quicker than those in generation-
based GA, Davis [85]; but Genitor may produce only poor solutions due to
premature convergence Whitley [78]. For more information about genetic
algorithms Schaffer et al. [86], Goldberg [79], and Holland [87].

Chapter 4 : A Revi ew of Geneti c A l gori thms

28
4.3 On-line, Off-line and Best Individual Performance
According to Baker [80], there are three types of criteria to evaluate the GA
performance. They are:
1. On-line performance, the average of all results that have appeared;
2. The off-line performance, the average of best results of each
generation; and
3. The best individual performance, the best result that has appeared.
While the off-line and the best individual performances only take account of
the best chromosome in each generation, the on-line performance reflects the
performance of chromosomes other than the best one as well. Therefore, the
GAs showing good on-line performance may not produce remarkable
chromosomes.
Between the off-line and the best individual performances, the off-line
one can take the convergence speed into account unlike the best individual
performance. If two algorithms X and Y show the best individual performance
as shown in Figure 3.1, the off-line performance of algorithm X is better than Y
at time T1, though the best individual performance of both algorithms are
same. But, at time T2, the off-line performance of algorithm X is still better
than Y, although its best individual performance is worse. That is, off-line
performance is generally influenced by the past records. However, because
the quality of the best solution may be important in practical applications, the
best individual performance may be more useful than the other performance
measures. Hence, the best individual is used in the current thesis.








Figure 3.1 Two algorithms performance.
Time
F
i
t
n
e
s
s

o
f

t
h
e

b
e
s
t

i
n
d
i
v
i
d
u
a
l

T1 T2
Algorithm Y
Algorithm X
Chapter 4 : A Revi ew of Geneti c A l gori thms

29
4.4 GA Application
As Glover and Greenberg [88] mentioned, GAs may be effective
approaches for NP-complete problems as ones of stochastic approaches. For
example, Fang et al [89] and Ross et al [23] introduced GAs efficiency on job-
shop scheduling problems and time tabling problems, respectively. Similarly,
various layout problems and FLPs are solved by GAs. Here, some of them will
be reviewed.

4.4.1 Layout Problems with GAs: Regarding layout-related research,
Kloske and Smith [24] tackled cable routing problems with a GA. In the GA, a
chromosome consists of the index of each cables routing alternatives. For
example, if there are three cables to be routed, a chromosome will have three
alleles. And, if a chromosome is 2-3-2; the first cable will be routed by the
second possible way for the cable, the second cable will be routed by the third
possible way for the cable, and the third cable will be routed by the second
possible way for the cable. Although Kloske and Smith [24] did not report any
details how each cables alternative ways are produced, they state that the
GA worked well.
Whereas Kloske and Smith [24] were able to use traditional crossovers
and mutations,while Smith [27] had to use a modified crossover to cope with
his chromosome encoding in a bin-packing problem. In his research, a
chromosome represents a list of packing order of objects. For instance, if a
chromosome is 4-1-3-2; then it represents that object No. 4 will be first
packed, object No. 1 will be second packed, and so on. Therefore, ordinary
crossover may produce nonsense children. If 4-1-3-2 and 1-2-3-4 are one-
point crossed over, and if splitting point is set between the second and third
genes; then, it may produce twin children 4-1-3-4 and 1-2-3-2, which do not
represent solutions of this problem. In order to tackle this problem, he used
modified crossover, which keeps the genes before splitting point of the first
parent and applies the order in the second parent for the rest of objects.
Therefore, in the above example, 4-1-2-3 and 1-2-4-3 may be created instead.
Furthermore, Falkenauer [28] took account of the redundancy of the
representation of chromosomes. For example, in the encoding of Smith [27],
Chapter 4 : A Revi ew of Geneti c A l gori thms

30
1-2-3-4 and 4-3-2-1 may be different solutions. Nevertheless, if objects 1 and
2 fill a bin and if object 3 and 4 fill another bin, these two chromosomes
virtually represent the same solution. Because higher redundancy makes the
GAs search space larger and GAs power weaker, he suggested another
encoding method to reduce the redundancy. Although it might be highly
dependent on the problems domain, we may be able to see the fact that
chromosomes representation and design of crossovers and mutations will
much influence GA performance.

4.4.2 FLPs with GAs: As regards FLPs, various kinds of chromosome
representations and crossovers and mutations have been also suggested.
Cohoon and Paris [90] introduced an original crossover method for the cell
assignment representation. In a 3x3 FLP, a chromosome 1-2-5-6-7-9-3-8 may
represent a layout shown in Figure 3.2. Since the conventional crossover
tends to favor shorter schemata more Whitley [78], the relation of facilities No.
5 and No. 6 may be kept in higher probability than that of No. 2 and No. 6, in
this example. Cohoon and Paris [90] introduced another special crossover
which can take into account such two dimensional adjacencies.
1 2 3
5 6 7
4 8 9

Figure 3.2 Chromosome representation for an identical FLP.

Smith and Tate [91] used flexible bay structure representation to tackle non-
identical FLPs. In the representation, a physical layout is represented by two
chromosomes. The first one specifies the order of putting facilities into cells,
and the second chromosome specifies how many cells are included in each
bay (row). Smith and Tate [91] used the crossover as follows: the childs first
chromosome is produced from the first chromosomes of parents by the same
method of Smith [27]; and the childs second chromosome is copied from
either parents second one. As for the mutation, one of the following three
types is applied. If the first type (MU1) is applied, a bay chosen at random is
Chapter 4 : A Revi ew of Geneti c A l gori thms

31
divided into two bays. If the second type (MU2) is applied, two sequential bays
chosen at random are merged into one bay. If the third type (MU3) is applied,
a part of genes will be reversed. That is, MU1 and MU2 affect the second
chromosome, whereas MU3 affects the first chromosome. Smith and Tate [91]
set the probability ratio of MU1, MU2, and MU3 occurring to be 1:1:2.
While the flexible bay structure requires each cell to lie in rows (bays),
the slicing tree structure (STS) can generate more various physical layouts.
However, if Polish expression, which corresponds to a tree structure ant to a
layout, is directly used as a chromosomes representation, ordinary
crossovers and mutations can not be applied, because a combination
operators and operands in random order may not be a valid Polish expression
(solution).
In order to use Polish expression as chromosomes representation,
Cohoon et al [25] suggested several types of special crossover and mutation
methods. For example, one of crossover methods creates a child so that it
can inherit the trees structure from one parent and that it can inherit the
operators in the Polish expression from the other parent. As for mutations,
Cohoon et al [25] used Wong and Lin [92]s methods, which are used, for
solutions move in simulated annealing. They are, swapping adjacent
operands; switching a sequence of adjacent operators; and swapping an
operator and a neighborhood operand.
On the other hand, in order to use conventional crossovers and mutations,
Tam [26] suggested a method where the tree structure is fixed and a
chromosome includes only operators of the Polish expression. In other words,
Tam [26] limited the search space, while Cohoon et al [25] did not.
In conclusion, there have been many methods for representation,
crossovers, and mutations; and this might suggest that better methods may
appear in the future. The proposed GA and its operators will be explained in
details in the next chapter.
4.5 The Need for Good Solver Techniques
From the previous chapter, it is seen that the QAP is capable of
representing the inter-cell layout problem, but the complexity of the situation
Chapter 4 : A Revi ew of Geneti c A l gori thms

32
appear from the fact that the QAP formulation belongs to the class of NP-
complete problems as it is cited in Garey and Johnson [12], and no definite
method can arrive at an optimal solution in a reasonable time when 15 or
more facilities are considered. Consequently, many heuristic algorithms have
been developed for achieving a trade-off between computation time and the
efficiency of the final solution Kusiak and Heragu [13].
In search for effective solution procedures, the Genetic algorithm, an offshoot
of the artificial intelligence (AI) submerged as an effectual tool capable of
treating the NP-hard FLP problem.





Chapter 5


Proposed Geneti c Al gori thm




5. 1 Why Geneti c Al gori thm?
GAs differ from traditional optimization and search procedure in four
ways Davis [85]:
They work with a coding of the parameter, not the parameters
themselves;
Start search from a set of population points, not single point;
Use payoff information, not derivatives or other auxiliary knowledge; and
Use probabilistic transition rules, not deterministic rules.

5. 2 The Proposed Geneti c Al gori thm
In the following subsections, the proposed genetic algorithm variables
will be discussed in details. Such chromosome representation, initial
population, selection method, crossover and mutation operator, and
reproduction systemetc.
5
Chapter 5 : Proposed Geneti c Al gori thm

34
5. 2. 1 Chromosome Represent at i on:
Chromosome representation maps feasible solutions of the problem.
The effectiveness of the crossover operator depends greatly on the
representation scheme used. The representation should be such that the
crossover operator preserves high performing partial arrangements
(schemata) of strings, and minor changes in the chromosome translate into
minor changes in the corresponding solution.
From the three FLP representation methods, mentioned in the previous
sections, the cell assignment representation (permutation method) is used to
represent the facilities layout, such that the allele ( j ) at position ( i ) in the
genome indicates that facility ( j ) is assigned to location ( i ). For example,
Individual 3,4,7,1,8,2,9,6,5 represents a solution for the shown layout in
Figure 5.1.



Figure 5.1 Phenotype representation layout.

5.2.1.1 Representation of special layout configuration
First, if the layout area has some restricted location, at this situation,
each restricted location in the layout is encoded to 1 in the genotype. For
instance, Figure 5.2 is represented by this schema:(#,#,#,#,#,#,#,-1,#,#,-1,-1,-
1,#,#).




Figure 5.2 Available layout space with restricted area.
Where #: means any alleles can be assigned to this position except what has
assigned before.
Note that all chromosomes have this schema.
3 4 7
1 8 2
9 6 5



Chapter 5 : Proposed Geneti c Al gori thm

35
Second, how can represent the chromosome if there are any pre-specified or
occupied facilities. Figure 5.3 is represented by this schema:
(#,#,7,#,#,#,#,#,3,#,-1,-1,-1,#,#).

7
3


Figure 5.3 Available layout space of restricted area
and pre-specified facilities.
Note that all chromosomes have this schema.
5. 2. 2 Ini t i al Popul at i on:
The initial population of chromosome is generated randomly. For not
generating illegal chromosome, each process of generating a random gene
(facility) checks the previous genes (facilities), which are once picked in the
previous generations and choose a gene that has not been chosen before in
the chromosome. This procedure ensures that each gene is only once chosen
in a chromosome. This initialization keeps proceeding until the number of
chromosome reaches the pre-set population size (PopSize). In the current
study, PopSize considered is 200.
5. 2. 3 Sel ect i on Met hod
The selection criterion is used to select the two parents to apply the
crossover operator. The appropriateness of selection method for a GA
depends upon the other GA operators chosen. In the literature, a typical
selection method gives a higher priority to fitter individuals since this leads to
a faster convergence of the GA. Nevertheless, the overall results are obtained
when the selection is not biased towards fitter individuals. So, the tournament
selection method is applied in order to control convergence speed by the
tournament size, Ts. In the current study, Ts considered is 4.
Chapter 5 : Proposed Geneti c Al gori thm

36
5. 2. 4 Crossover Operat or
The crossover operation corresponds to the concept of mating. It is
hoped that the crossover (mating) of good parents may produce good
offspring. Thus, the crossover operation is a simple yet powerful way of
exchanging information and creating new solutions. Partially matched
crossover (PMX) [93] operator is employed with probability P
c
here to
generate two offspring. The PMX operator starts as follows, at first two cut
points are chosen at random for the parents. Then the genes of the father
string bounded by the cut points will be copied to the same positions of the
first offspring, and the remaining genes of the offspring will be filled up by the
mother string in the same order. In such case, the offspring may not be legal
because of possibilities of repeated genes. In this case, the repeated genes
will be replaced by genes corresponding to the mapping of the father and
mother spring bounded by the cut points. Suppose the father is (2, 4, 5, 3, 8,
9, 6, 1, 7), the mother is (3, 9, 8, 6, 5, 4, 2, 7, 1) and the cut points lie after the
third gene and before the seventh gene. Thus, the father genes inside the cut
points are 3, 8, 9, the mother genes outside the cut points are 3, 9, 8, 2, 7, 1.
The offspring is (3, 9, 8, 3, 8, 9, 2, 7, 1). This would be illegal because 3, 8, 9,
are repeated genes. Note that 3, 8, 9 of the father genes map to 6, 5, 4, thus
we replace 3 by 6, 8 by 5, and 9 by 4, to get the new offspring as (6, 4, 5, 3, 8,
9, 2, 7, 1). The second offspring is generated by the same manner but it uses
the mother genes inside the cut points, and the remaining genes are filled up
by father string in the same order. Figure 5.4 shows the PMX method to
generate feasible solutions. In the current study, P
c
considered is 0.7.

Cut points
Father 2 4 5 3 8 9 6 1 7
Mother 3 9 8 6 5 4 2 7 1
First offspring 2 4 5 6 5 4 6 1 7
Second offspring 3 9 8 3 8 9 2 7 1
Legal 1
st
offspring 2 9 8 6 5 4 3 1 7
Legal 2
nd
offspring 6 4 5 3 8 9 2 7 1
Figure 5.4 PMX crossover method.
Chapter 5 : Proposed Geneti c Al gori thm

37

5. 2. 5 Mut at i on Operat or
If the entire population has only one type of string (or strings are very
similar), then the crossover of two strings does not produce any new strings.
To escape from this scenario, the mutation operator may be used. In our GA,
The mutation operation may happen with probability (P
m
, mutation rate), to
swap every allele (gene) and selected allele at random (order change
mutation). For instance, chromosome 1, 5, 6,3, 4, 2 may be change to 1, 3, 6,
5, 4, 2. In the current study, P
m
considered is 0.1.
Note that pre-specified or occupied facilities and/or restricted locations are not
affected by the crossover and/or mutation operators.

5. 2. 6 Reproduct i on Syst em
The generation-based system is used. That is, offsprings from
parents are produced and the best chromosome of are retained. Owing to
making new population only by new offspring can cause lost of the best
chromosome from the last population. This is true, so called Elitism is often
used. This means, that at least one best solution is copied without changes to
a new population, so the best solution found can survive to end of run. For
more details, see section (4.2.4).

5. 2. 7 Eval uat i on Funct i on ( Fi t ness)
The objective function of the proposed model of Chen and Sha [21] is
used as evaluation criteria for the solution quality in the current work.

5. 2. 8 Termi nat i on Cri t eri a
The GA is stopped when the number of iterations equal to the
maximum iteration number (Max.Iter input data). In the current study,
Max.Iter considered is 500.
Chapter 5 : Proposed Geneti c Al gori thm

38

5. 2. 9 Al gori t hm St eps
Figure 5.5 exhibits flow of logic in the proposed GA search procedure
for MOFLP and the algorithm steps as follow:

Step (1) Tune the GAs parameters ( PopSize, Ts, Pm, Pc, Max.Iter,
).
Step (2) Input the problem data (From-To-Chart,Rel-Chart,
Weights,).
Step (3) Randamly generate the initial feasible population.
Step (4) Evaluate the populations individuals, and select the best
one.
Step (5) Using tournment selection method with tournment size Ts,
select the first parent and second parent.
Step (6) Apply the crossover operation with probability Pc to
generate two feasible childern; otherwise the two parents
become two childern. , see section (5.3.4).
Step (7) Apply the mutation operation with probability Pm, see
section (5.3.5).
Step (8) Apply steps (5 to 8) until the new population is compeleted.
Step (9) Apply steps (4 to 9) until the stop criterion is achieved.
Step (10) Print out best layout.









Chapter 5 : Proposed Geneti c Al gori thm

39

Start





















Figure 5.5 Genetic algorithm flow chart.

5. 2. 10 The Def aul t Val ues of t he Proposed GA
Paramet ers
To get the effective default values of the proposed GA parameters, a
random 25-celI problem (see appendix A) was generated and using a
combination of the parameters shown in Table 5.1 solved. Hill-Climbing (HC)
method is used to get the best combination values of the parameters and
selected them as default parameters. The procedure of Hill-Climbing
investigation is presented in Table 5.2.

Reproduction system
Input Genetic Parameters
End
Yes
Yes
Input Problem Data
Initial population
Termination
criteria
Get Best results
and draw layout
Evaluation
Apply Crossover with
probability Pc
Selection
Apply Mutation with
probability Pm
Is pop. size
Completed?
No
No
Chapter 5 : Proposed Geneti c Al gori thm

40

Table 5.1 GA parameters to be investigated.
Investigating parameters

Population size 10 20 40 50 100 200 250 500
Max. Number of gen. 10000 5000 2500 2000 1000 500 400 200
Crossover rate 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1
Mutation rate .001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0.15, 0.2, 0.25,
0.3
Tournament size 2, 3, 4, 5, 6, 7, 8
Common parameters

Reproduction system Generation-based
Number of population 1


Table 5.2 Hill-climbing investigation procedure.
Step 1: Default parameters set up
A combination of GA parameters to be investigated is selected
arbitrarily. Call them default parameters
Step 2: Population size investigation
To find the best population size among eight alternatives
shown in Table 5.1, do ten experiments for each alternative. At
that time, set the other GA parameters as default. Choose the
best population size among the alternatives by seeing the best
individual performance, and regard it as a new default
parameter of population size
Step 3: Crossover rate investigation
Decide the best crossover rate from eleven alternatives in
similar way to step 2, and regard it as a new default parameter
of crossover rate.
Step 4: Mutation rate investigation
Decide the best mutation rate from eleven alternatives in similar
way to step 2, and regard it as a new default parameter of
mutation rate.
Step 5: Tournament size investigation
Decide the best Tournament rate from seven alternatives in
similar way to step 2, and regard it as new default parameter of
Tournament rate.
Step 6: Final results
Regard the final set of default parameters as the best
combination values of the proposed GAs parameters.
Chapter 5 : Proposed Geneti c Al gori thm

41

5. 3 User Interface
In this section, a software call GAMOFLP for the proposed solution
methodology based GA of the Multi-objectives FLP is designed and
presented. The following screens give a picture of the proposed system. The
software code was written using C++ language (see appendix C). The
software has many features for solving the inter-cell layout problems (search
for the best relative locations of the facilities). That is, the program is capable
of addressing the following FLP problems:
Find best relative locations for FLP (single or multi-objectives).
Find best relative locations for FLP subject to restricted locations.
Find best relative location(s) for a new facility (facilities) inside an
existing layout (plant).


5. 3. 1 GAMOFLP Feat ures
The proposed system is capable of dealing with some special FLPs
problems such as:

1. FLPs subject to restricted locations in the available space. Figure (5.6)
shows some restricted shapes.
2. FLPs have some pre-specified facilities. This feature can be classified
to two types of problem:
a. First type; add a new facility (facilities) to an existing layout
(plant). In this type, the proposed system search for the best
position from some available empty locations in the existing
layout to add a new facility (facilities).
b. Second type, find the best layout for a new plant if there is a
facility or more should be at a certain location (locations).




Chapter 5 : Proposed Geneti c Al gori thm

42



Figure 5.6 Some basic restricted shapes for the FLPs available space.

5. 3. 2 GAMOFLP Screens
In this sub section, The program's screens are explained. In order to
cover the program features, an illustrative example are solved and the related
screens and their variables are exhibited step by step.

Illustrative example
This example is one of the eight test problems of Harraz [64]. Problem
data source from appendix (B) Figure B.8. in this problem, number of facilities
are 12, the available space and the pre-specified facilities are as shown in
Figure 5.7. Weight of quantitative objective is 0.5.





Figure 5.7 Available space and prespecified facilities.

Figure 5.8 shows the first screen, which contains the GA parameters
and its default values. Screen no.1 consists of six options. The user can
change (adjust) any GA parameters and then select option no. 6 to confirm
the acceptance of GA parameters.








U-Shape





O-Shape





L-Shape

3
7 1

Restricted locations
Chapter 5 : Proposed Geneti c Al gori thm

43
Genetic Algorithm For Facility Layout Problem


Genetic Algorithm Information
1 - Max. Iteration Number = 500
2 - Population Size = 200
3 - Tournament Size = 4
4 - Crossover Probability = 0.7
5 - Mutation Probability = 0.1
6 - Ok...
Enter option No. : 6

Figure 5.8 Screen no.(1) Genetic Algorithm parameters.

Screen no. 2 is shown in Figure 5.9, this screen is designed for selecting the
criteria type. That is, single objective or muli-objectives.


1 - Quantitative problem.
2 - Qualitative problem.
3 Multi-objective problem.
4 Examples.
Enter criteria type (1, 2 or 3) 3
Figure 5.9 Screen no.(2) Criteria type.

Screen no.2 consists of 4 options:
First option is to solve "Quantitative FLP problem ". Second option is to
solve " Qualitative FLP problem ". Third option is to solve "Multi-objective FLP
problem (Quantitative and Qualitative objectives)". Fourth option has the most
popular problems published in previous researches and ability to generate
random problems between 5 to 50 facility. For the current example option no.
3 is selected.
Chapter 5 : Proposed Geneti c Al gori thm

44
Screen no. 3 is as shown in Figure 5.10 that concerns entering no. of facilities,
no. of locations and space in rectangle form. After entering the number of
facilities the proposed program suggest the recommended number of
locations in rectangular form where the value of rows number and number of
columns are close as possible. In the current example, number of facilities is
12 and the space dimension is changed from the recommended one to four
rows and four columns in order to accommodate the problem space.



Enter No of facilities between (5 and 50) 12

2D. Space Dimensions
Recommended 34

Do you want changing space dimensions (y/n) y
Enter No. of cells in the first direction 4
Enter No. of cells in the second direction 4

Figure 5.10 Screen no. (3) Layout space.


Screen no. 4 Figure 5.11 exhibits facilities number, locations number ,
facilities names and locations names. If no. of locations is bigger than no. of
facilities, the program gives an optional question to adjust no. of locations by
receiving any neglected location(s) for verifying special layout space. For the
current problem locations 3, 4, 7, and 8 are neglected.






Chapter 5 : Proposed Geneti c Al gori thm

45
No. of facilities 12 No. of locations 1 6
Locations Names
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16

Facility Names
- Real Facilities From 1 to 12
- Dummy Facility From 13 to 16
Any neglected locations y/n Y
Enter No. of neglected locations ( 4 ) 4
1- Enter the neglected location No. 3
2- Enter the neglected location No. 4
3- Enter the neglected location No. 7
4- Enter the neglected location No. 8
Figure 5.11 Screen no. (4) Available layout space.
After adjusting no. of locations and modifying space shape to suit the current
problem, Screen no. 5 Figure 5.12 appears to verify any pre-assigned facili-
ties. For the current problem, facilities 3,7, and 1 are pre-specified facilities.

No. of facilities 12 No. of locations 12
Locations Names
1 2
5 6
9 10 11 12
13 14 15 16

Facility Names
- Real Facilities From 1 to 12
- Dummy Facility From 13 to 16
Any prespecified facilities y/n y
No. of prespecified facilities (<=12) 3
1 - Facility No. 1
At location No. 12

2 - Facility No. 3
At location No. 6

3 - Facility No. 7
At location No. 10
Figure 5.12 Screen no. (5) Pre-specified facilities.
Chapter 5 : Proposed Geneti c Al gori thm

46
Figure 5.13 exhibits screen no. 6 that interests in entering the relationship
matrix.

Enter Relationship Matrix

Enter relationship between facility 1 and facility 2 U
Enter relationship between facility 1 and facility 3 U
Enter relationship between facility 1 and facility 4 I
Enter relationship between facility 1 and facility 5 U



Enter relationship between facility 11 and facility 12 U
Figure 5.13 Screen no. (6) Entering relationship matrix.
The flow matrix (from-to-chart) is entered in screen no 7. For the current
problem see Figure 5.14.

Enter Flow Matrix

Enter flow between facility 1 and facility 2 5
Enter flow between facility 1 and facility 3 2
Enter flow between facility 1 and facility 4 4
Enter flow between facility 1 and facility 5 1



Enter flow between facility 11 and facility 12 2
Figure 5.14 Screen no. (7) Entering flow matrix.

Screen no. 8 is to modify cost matrix where the default handling cost between
any two facilities is unity. For the current problem, no change in the cost
matrix, see Figure 5.15.

Default cost between any two facilities = 1 .
Do you want modifying the cost matrix (y/n) N
Figure 5.15 Screen no. (8) Entering cost matrix.
Chapter 5 : Proposed Geneti c Al gori thm

47
Weight of objectives is entered in screen no. 9, weight of the quantitative
objective in the current problem is 0.5, see Figure 5.16.


Hybrid Criteria is
1 - Minimizing The Quantitative Objective, and
2 - Maximizing The Qualitative Objective .



Enter weight of The Quantitative Objective 0.5
Figure 5.16 Screen no. (9) Entering the objectives weight.
The problem's relationship matrix appears in screen no. 10 to confirm all
entering relationship data and has capability to modify and repair any mistake.
For the current problem, see Figure 5.17.

Relationship matrix
1 2 3 4 5 6 7 8 9 10 11 12
1
2
3
4
5
6
7
8
9
10
11
12
0
U
U
I
U
U
U
U
U
E
A
I
U
0
U
O
O
U
U
U
I
O
A
U
U
U
0
I
U
U
U
U
A
U
U
X
I
O
I
0
I
I
O
I
I
O
U
U
U
O
U
I
0
E
U
I
U
U
U
A
U
U
U
I
E
0
U
E
U
U
E
U
U
U
U
O
U
U
0
U
A
U
O
O
U
U
U
I
I
E
U
0
E
U
U
E
U
I
A
I
U
U
A
E
0
U
A
I
E
O
U
O
U
U
U
U
U
0
I
X
A
A
U
U
U
E
O
U
A
I
0
U
I
U
X
U
A
U
O
E
I
X
U
0
Do you want modifying the relationship matrix y/n N

Figure 5.17 Sscreen no. (10) Confirming relationship matrix data.
Screen no. 11 is to adjust the numerical values of the coding system if the
default values is not suitable, see Figure 5.18.

Enter Weight Of The Two Objectives Between 0 and 1
1 means pure Quantitative objective is taken .
0 means Quantitative objective is neglected .
Chapter 5 : Proposed Geneti c Al gori thm

48






Do you want modifying the relationship values y/n N
Figure 5.18 Screen no. (11) Adjusting coding system values.

The problem's Flow matrix appears in screen no. 12 to confirm all entering
flow data and has capability to modify and repair any mistake. For the current
problem, see Figure 5.19.
Flow matrix
1 2 3 4 5 6 7 8 9 10 11 12
1
2
3
4
5
6
7
8
9
10
11
12
0
5
2
4
1
0
0
6
2
1
1
1
5
0
3
0
2
2
2
0
4
5
0
0
2
3
0
0
0
0
0
5
5
2
2
2
4
0
0
0
5
2
2
10
0
6
5
5
1
2
0
5
0
10
0
0
0
5
1
1
0
2
0
2
10
0
5
1
1
5
4
0
0
2
0
2
0
5
0
10
5
2
3
3
6
0
5
10
0
1
10
0
0
0
5
0
2
4
5
0
0
1
5
0
0
0
10
10
1
5
2
0
5
5
2
0
0
0
5
0
1
0
2
5
1
4
3
5
10
5
0
2
1
0
2
5
1
0
3
0
10
0
2
0
Do you want modifying the flow matrix (y/n) N

Figure 5.19 Screen no. (12) Confirming flow matrix data.
At this point all input data are confirmed. Therefore, Screen no. 13 is the
searching and detection progress. In this screen, GA begins searching for the
best solution of the problem and the detection progress is simultaneously
appeared (i.e. best fitness, generation number, CPU time).
Figure 5.20 exhibits screen no. 13 for the current problem. this screen is
continuity changing at each run because the GA begins searching from
different solutions.

Relationship values
A
E
I
O
U
X
4
3
2
1
0
-1
Chapter 5 : Proposed Geneti c Al gori thm

49
Fitness Improved= -0.420937 Time = 0 sec
Fitness Improved= -0.427411 Time = 0 sec
Fitness Improved= -0.479178 Time = 0 sec
Fitness Improved= -0.587445 Time = 0 sec



Fitness Improved= -1.37108 Time = 0.11 sec
Fitness Improved= -1.40909 Time = 0.33 sec
Fitness Improved= -1.97445 Time = 0.44 sec
Figure 5.20 Screen no. (13) Solution progress.
Screen no. 14 is shown in Figure 5.21. This screen is the final one. It has five
options as follow: The first option for displaying the best layout solution of the
problem, its score and the consumed time to find it. The second option is to
display the solution improvement sequence (i.e. each solution in the
improvement path). The third option is to modify any data of the GA and/or the
problem. The fourth option is to solve a new problem. The fifth one is to finish
the program.

1 - Best solution.
2 - Display the solution improvement sequence.
3 - Modify current problem.
4 - Solve anther problem.
5 Quit.
Enter option from 1 to 5 1

Figure 5.21 Screen no. (14). Final solution and improvement path.
For the current problem, option one is selected and the result is shown in
Figure 5.22. this sub screen shows the best solution of the current problem
after 500 generations by GA, quantitative fitness and qualitative fitness and
the weight between them, Multi-objective function value (MOFLP Score) that
Chapter 5 : Proposed Geneti c Al gori thm

50
is calculated using equation no. (14) , CPU time consumed, and the relative
locations for the facilities.

Best block layout
No. of Facilities =12
Best layout Fitness :
Quantitative Fitness = -1.69978 Weight = 0.5
Qualitative Fitness = -2.24911 Weight = 0.5
MOFLP Score = -1.97445
Computation Time = 0.44 sec
Facilities Layout
12 9
8 3
4 7 11 1
5 6 2 10
...Press Enter to continue
Figure 5.22 Best illustrative example solution after 500 generation.

The proposed GA approach for the multi-objective inter-cell layout
problem was achieved. The approach is validated by consulting it a
reasonable number of times using a set of known test problems with
different boundary conditions, to illustrate its performance and capabilities.
Results from consultation, are included in the next chapter.



Chapter 6



System Eval uati on and Val i dati on




6. 1 Performance Eval uati on

he proposed procedure is evaluated using two standard criteria. One is
computation time, and the other is solution quality. The comparison has
been done with Harraz's procedure [64] using eight-test problem. Also, a
comparison is made for Chen and Shas procedure [21] using four test
problems. Further comparisons are made with eight test problems of Nugent
et al. [41] using other heuristic methods. These comparisons verified that the
proposed procedure provides acceptable quality solutions in reasonable
amount of computation time. The proposed algorithm was programmed with
C++language and run on a Pentium I-233MMX computer.

6. 2 Harraz' s Procedure Compari son

Harraz [64] developed knowledgebased system for solving multi-
objectives FLP and used eight test problems to evaluate her system. A
comparison is made for the results obtained by Harraz [64]. All layouts for
each weight combination generated by the proposed approach are listed and
scores are compared. The results are introduced in Tables 6.1 to 6.8. The
T
6
Chapter 6: System Eval uati on and V al i dati on

52
eight tables exhibit that the proposed genetic algorithm is capable of achieving
good-quality solutions and is superior to Harraz's procedure.
Table 6.1 Best solution qualities for test problem in Harraz [64].
Wei ghts

HZ Approach The Proposed Approach


I mprovement
(%)
W1 W2 Score

L ayout Score Ti me* L ayout Score
1 0 - 1.7138
2
1
3
4

5
- 1.7137 0.001
1
2
4
3
5
0.00
0.9 0.1 - 1.6072
2
1
3
4

5
- 1.6719 0.001
4
3
1
2 5
4.03
0.8 0.2 - 1.5006
2
1
3
4

5
- 1.6301 0.001
1
2
4
3
5
8.63
0.7 0.3 - 1.3940
2
1
3
4

5
- 1.5883 0.001
1
2
4
3
5
13.94
0.6 0.4 0.3305
1
4
2
5

3
- 1.5536 0.001
1
3
4
2 5
570.08
0.5 0.5 - 0.0595
1
4
2
5

3
- 1.5646 0.001
1
4
3
2 5
2529.58
0.4 0.6 - 0.2115
1
4
2
5

3
- 1.5755 0.001
1
4
3
2 5
644.92
0.3 0.7 - 0.5618
1
4
5
2

3
- 1.7974 0.001
4
5
1
2 3
219.94
0.2 0.8 - 0.6984
1
4
5
2

3
- 2.0619 0.001
4
5
1
2 3
195.23
0.1 0.9 - 0.8350
1
4
5
2

3
- 2.3265 0.001
4
1
5
2 3
178.62
0.0 1.0 - 0.9716
1
4
5
2

3
- 2.5910 0.001
4
1
5
2 3
166.67
Ave r age i mprove me nt 411. 97
HZ Abbrevi ati on of Harraz [64].

HZ l ayout i s eval uated by the propos ed s ys tem
* T i me i n s econds .


0
500
1000
1500
2000
2500
3000
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
W1( weight of Quntitative Obj.)
%

i
m
p
r
o
v
m
e
n
t

i
n

t
h
e

O
F
V
Score

Figure 6.1: Five-department problem % improvement in the OFV.




Chapter 6: System Eval uati on and V al i dati on

53
Table 6.2 Best solution qualities for test problem in Harraz [64].
Wei ghts HZ Approach The Proposed Approach
I mprovement
(%)
W1 W2 Score L ayout Score Ti me L ayout Score
1 0 - 0.8933
3
4
2
6
1
5
- 2.5910 0.02
6
3
5
2
4
1
190.05
0.9 0.1 - 0.9558
3
4
2
6
1
5
- 2.0816 0.04
6
3
5
2
4
1
117.79
0.8 0.2 - 1.0183
3
4
2
6
1
5
- 1.9937 0.04
6
3
5
2
4
1
95.79
0.7 0.3 - 1.0807
3
4
2
6
1
5
- 1.9057 0.01
6
3
5
2
4
1
76.34
0.6 0.4 - 0.3339
6
5
1
3
4
2
- 1.8903 0.04
3
2
1
5
4
6
466.13
0.5 0.5 - 0.4174
6
5
1
3
4
2
- 1.9801 0.06
3
2
1
5
4
6
374.39
0.4 0.6 - 0.5009
6
5
1
3
4
2
- 2.0698 0.02
3
2
1
5
4
6
313.22
0.3 0.7 - 0.5844
6
5
1
3
4
2
- 2.1595 0.05
3
2
1
5
4
6
269.52
0.2 0.8 - 0.6679
6
5
1
3
4
2
- 2.2493 0.06
3
2
1
5
4
6
236.77
0.1 0.9 - 0.7514
6
5
1
3
4
2
- 2.3390 0.02
3
2
1
5
4
6
211.29
0.0 1.0 - 0.8349
6
5
1
3
4
2
- 2.4287 0.02
3
2
1
5
4
6
190.90
Av e r age i mprove me nt 231. 11




0
50
100
150
200
250
300
350
400
450
500
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
W1
%

i
m
p
r
o
v
m
e
n
t

i
n

t
h
e

O
F
V
Score


Figure 6.2: Six-department problem% improvement in the OFV.






Chapter 6: System Eval uati on and V al i dati on

54
Table 6.3 Best solution qualities for test problem in Harraz [64].
Wei ghts HZ Approach The Proposed Approach
I mprovement
(%)
W1 W2 Score L ayout Score Ti me L ayout Score
1 0 - 1.632
2
3
7

1
4

5
6
- 2.954 2.92
3
7
6
2
5

1
4
81.01
0.9 0.1 - 1.590
2
3
7

1
4

5
6
- 2.764 2.87
3
7
6
2
5

1
4
73.89
0.8 0.2 - 0.499
7
6
4

1
5

2
3
- 2.575 3.02
3
7
6
2
5

1
4
416.38
0.7 0.3 - 0.644
7
6
4

1
5

2
3
- 2.386 3.20
3
7
6
2
5

1
4
270.55
0.6 0.4 - 0.789
7
6
4

1
5

2
3
- 2.556 3.08
4
5
1
6
2

7
3
223.88
0.5 0.5 - 0.934
7
6
4

1
5

2
3
- 2.457 3.18
4
5
1
6
2

7
3
162.92
0.4 0.6 - 1.080
7
6
4

1
5

2
3
- 2.357 3.43
4
5
1
6
2

7
3
118.34
0.3 0.7 - 1.225
7
6
4

1
5

2
3
- 2.285 3.24
3
2
1
6
5

7
4
86.51
0.2 0.8 - 1.370
7
6
4

1
5

2
3
- 2.412 3.12
3
2
1
5
6

7
4
76.01
0.1 0.9 - 1.515
7
6
4

1
5

2
3
- 2.560 3.28
3
2
1
5
6

7
4
68.93
0.0 1.0 - 1.661
7
6
4

1
5

2
3
- 2.708 2.53
3
2
1
5
6

7
4
63.09
Av e r age i mprove me nt 149. 23

0
50
100
150
200
250
300
350
400
450
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
W1
%

i
m
p
r
o
v
m
e
n
t

i
n

t
h
e

O
F
V

Figure 6.3: Seven department problem % improvement in the OFV .

Chapter 6: System Eval uati on and V al i dati on

55
Table 6.4 Best solution qualities for test problem in Harraz [64].
Wei ghts HZ Approach The Proposed Approach
I mprovement
(%)
W1 W2 Score L ayout Score Ti me L ayout Score
1 0 - 1.4590
2
3
1
6
8
5
4
7
- 2.9814 5.26
2
3
1
8
4
7
5
6
104.35
0.9 0.1 - 1.4998
2
3
1
6
8
5
4
7
- 2.7824 3.83
2
3
1
8
5
4
6
7
85.52
0.8 0.2 - 1.5405
2
3
1
6
8
5
4
7
- 2.7103 3.90
2
3
1
8
5
4
6
7
75.94
0.7 0.3 - 1.5813
2
3
1
6
8
5
4
7
- 2.6382 5.19
2
3
1
8
5
4
6
7
66.84
0.6 0.4 - 1.6221
2
3
1
6
8
5
4
7
- 2.6122 4.64
2
3
5
1
6
8
7
4
61.04
0.5 0.5 - 0.3903
8
7
4
1
2
5
6
3
- 2.7101 2.35
2
3
5
1
6
8
7
4
594.36
0.4 0.6 - 0.3922
8
7
4
1
2
5
6
3
- 2.8081 5.47
2
3
5
1
6
8
7
4
615.99
0.3 0.7 - 0.3941
8
7
4
1
2
5
6
3
- 2.9061 3.44
2
3
5
1
6
8
7
4
637.40
0.2 0.8 - 0.3961
8
7
4
1
2
5
6
3
- 3.0041 3.62
2
3
5
1
6
8
7
4
658.42
0.1 0.9 - 0.3981
8
7
4
1
2
5
6
3
- 3.1021 3.97
2
3
5
1
6
8
7
4
679.23
0.0 1.0 - 0.4000
8
7
4
1
2
5
6
3
- 3.2001 5.11
2
3
5
1
6
8
7
4
700.03
Av e r age i mprove me nt 389. 01




0
100
200
300
400
500
600
700
800
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
W1
%

i
m
p
r
o
v
m
e
n
t

i
n

t
h
e

O
F
V

Figure 6.4: Eight department problem% improvement in the OFV .





Chapter 6: System Eval uati on and V al i dati on

56
Table 6.5 Best solution qualities for test problem in Harraz [64].
Wei ghts HZ Approach The Proposed Approach
I mprovement
(%)
W1 W2 Score L ayout Score Ti me L ayout Score
1 0 - 3.1826
4
5
6
8
2
7
1
3
9
- 3.5571 3.97
5
3
9
6
7
2
4
8
1
11.77
0.9 0.1 - 2.9841
8
7
6
4
3
5
1
9
2
- 3.2201 2.39
4
8
1
6
7
9
5
3
2
7.91
0.8 0.2 - 1.7272
1
8
7
5
4
6
2
9
3
- 2.9752 2.97
2
5
6
1
4
8
9
3
7
72.26
0.7 0.3 - 1.7172
1
8
7
5
4
6
2
9
3
- 2.9089 5.38
2
5
6
1
4
8
3
9
7
69.40
0.6 0.4 - 1.7071
1
8
7
5
4
6
2
9
3
- 2.9425 2.81
2
5
6
1
4
8
3
9
7
72.37
0.5 0.5 - 1.6971
1
8
7
5
4
6
2
9
3
- 2.9760 2.82
2
5
6
1
4
8
3
9
7
75.36
0.4 0.6 - 1.6870
1
8
7
5
4
6
2
9
3
- 3.0096 3.92
2
5
6
1
4
8
3
9
7
78.40
0.3 0.7 - 1.6769
1
8
7
5
4
6
2
9
3
- 3.0430 3.31
2
5
6
1
4
8
3
9
7
81.47
0.2 0.8 - 1.6669
1
8
7
5
4
6
2
9
3
- 3.0767 4.15
2
5
6
1
4
8
3
9
7
84.58
0.1 0.9 - 1.6568
1
8
7
5
4
6
2
9
3
- 3.1103 4.83
2
5
6
1
4
8
3
9
7
87.73
0.0 1.0 - 1.6468
1
8
7
5
4
6
2
9
3
- 3.1438 4.13
2
5
6
1
4
8
3
9
7
90.90
Av e r a g e i mprove me nt 66. 56

0
20
40
60
80
100
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
W1
%

i
m
p
r
o
v
e
m
e
n
t

i
n

t
h
e

O
F
V

Figure 6.5: Nine department problem % improvement in the OFV.
Chapter 6: System Eval uati on and V al i dati on

57
Table 6.6. Best solution qualities for test problem in Harraz [64].
Wei ghts HZ Approach The Proposed Approach
I mprovement
(%)
W1 W2 Score L ayout Score Ti me L ayout Score
1 0 - 3. 7317
8
7
6
4
3
5
1
9
2


10
- 4. 0381 5. 14
10
6
5
9
2
1
3
7
8 4
8.21
0.9 0.1 - 3. 5164
8
7
6
4
3
5
1
9
2


10
- 4. 1147 5. 41
5
6
10
4
1
2
8
7
3 9
17.01
0.8 0.2 - 3. 3011
8
7
6
4
3
5
1
9
2


10
- 3. 5387 4. 30
10
1
2
5
4
9
6
8
7 3
7.20
0.7 0.3 - 1. 7355
1
8
7
5
4
6
2
9
3


10
- 3. 5028 4. 07
3
7
8
9
1
4
2
10
6 5
101.83
0.6 0.4 - 1. 6487
1
8
7
5
4
6
2
9
3


10
- 3. 4989 3. 50
10
5
6
1
4
8
2
9
7 3
112.22
0.5 0.5 - 1. 5620
1
8
7
5
4
6
2
9
3


10
- 3. 5104 4. 18
10
5
6
1
4
8
2
3
9 7
124.74
0.4 0.6 - 1. 4752
1
8
7
5
4
6
2
9
3


10
- 3. 2031 6. 15
9
7
8
3
1
4
2
10
6 5
117.13
0.3 0.7 - 1. 3885
1
8
7
5
4
6
2
9
3


10
- 3. 7282 3. 71
10
1
2
5
4
3
6
8
9 7
168.51
0.2 0.8 - 1. 3017
1
8
7
5
4
6
2
9
3


10
- 3. 8371 3. 67
10
5
6
1
4
8
2
3
9 7
194.78
0.1 0.9 - 1. 2149
1
8
7
5
4
6
2
9
3


10
- 3. 9460 3. 79
10
1
2
5
4
3
6
8
9 7
224.80
0.0 1.0 - 1. 128
1
8
7
5
4
6
2
9
3


10
- 4. 0549 3. 57
10
1
2
5
4
3
6
8
9 7
259.41
Av e r age i mprove me nt 121. 44

0
50
100
150
200
250
300
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
W1
%

i
m
p
r
o
v
e
m
e
n
t

i
n

t
h
e

O
F
V

Figure 6.6: Ten department problem % improvement in the OFV.

Chapter 6: System Eval uati on and V al i dati on

58
Table 6.7. Best solution qualities for test problem in Harraz [64].
Wei ghts HZ Approach The Proposed Approach
I mprove
ment
W1 W2 Score L ayout Score Ti me L ayout Score(%)
1 0 - 3. 3493
8
7
11
4
3
9
1
6
5
2
10
- 4. 2867 2. 94
5
4
1
6
8
2
10
7
3
11
9
27.99
0.9 0.1 - 3. 1960
8
7
9
4
3
11
1
6
5
2
10
- 3. 8124 5. 66
5
4
1
6
8
2
10
7
3
11
9
19.29
0.8 0.2 - 2. 9022
8
7
9
4
3
11
1
6
5
2
10
- 3. 6772 5. 66
5
4
8
6
11
7
10
1
9
2
3
26.70
0.7 0.3 - 2. 6083
8
7
9
4
3
11
1
6
5
2
10
- 3. 5131 4. 83
5
4
8
6
11
7
10
1
9
2
3
34.69
0.6 0.4 - 2. 3144
8
7
9
4
3
11
1
6
5
2
10
- 3. 3490 2. 72
5
4
8
6
11
7
10
1
9
2
3
44.70
0.5 0.5 - 0. 7350
9
8
11
5
4
1
2
7
6
3
10
- 3. 1849 2. 76
5
4
8
6
11
7
10
1
9
2
3
333.32
0.4 0.6 - 0. 7184
9
8
11
5
4
1
2
7
6
3
10
- 3. 2649 5. 36
3
9
7
2
4
8
10
1
6
11
5
354.47
0.3 0.7 - 0. 7018
9
8
11
5
4
1
2
7
6
3
10
- 3. 4930 6. 16
3
9
7
2
4
8
10
1
6
11
5
397.72
0.2 0.8 - 0. 6852
9
8
11
5
4
1
2
7
6
3
10
- 3. 7454 4. 45
3
9
7
2
4
8
10
5
6
1
11
446.61
0.1 0.9 - 0. 6686
9
8
11
5
4
1
2
7
6
3
10
- 4. 0117 5. 01
3
9
7
2
4
8
10
5
6
1
11
500.01
0.0 1.0 - 0. 6520
9
8
11
5
4
1
2
7
6
3
10
- 4. 2780 5. 06
7
9
3
2
4
5
10
8
6
1
11
556.13
Av e r age i mprove me nt 249. 24

0
100
200
300
400
500
600
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
W1
%

i
m
p
r
o
v
e
m
e
n
t

i
n

t
h
e

O
F
V
Figure 6.7: Eleven department problem % improvement in the OFV .

Chapter 6: System Eval uati on and V al i dati on

59
Table 6.8. Best solution qualities for test problem in Harraz [64].
Wei ghts HZ Approach The Proposed Approach
I mprov-
ement
(%)
W1 W2 Score L ayout Score Ti me L ayout Score
1 0
-
1. 8617
1
6
5
10
12
4
2
3
8
7
9
11
-
4. 45181
5. 31
3
12
9
1
8
7
2
4
11
10
5
6
139.13
0.9 0.1
-
1. 3632
12
4
3
9
11
2
7
1
6
5
8
10
-
3. 94929
3. 54
8
7
12
4
11
9
1
10
3
5
6
2
189.71
0.8 0.2
-
1. 3099
12
4
3
9
11
2
7
1
6
5
8
10
-
3. 81873
5. 16
1
3
2
12
9
10
4
11
5
8
7
6
191.53
0.7 0.3
-
1. 2566
12
4
3
9
11
2
7
1
6
5
8
10
-
3. 96391
5. 51
3
9
12
1
7
8
2
11
4
10
6
5
215.45
0.6 0.4
-
1. 2033
12
4
3
9
11
2
7
1
6
5
8
10
-
4. 01344
6. 12
12
4
5
7
8
6
9
11
10
3
1
2
233.54
0.5 0.5
-
1. 1500
12
4
3
9
11
2
7
1
6
5
8
10
- 3. 9112 4. 90
12
4
5
7
8
6
9
11
10
3
1
2
240.10
0.4 0.6
-
1. 0967
12
4
3
9
11
2
7
1
6
5
8
10
-
3. 57607
5. 51
3
9
7
2
11
12
1
4
8
10
6
5
226.08
0.3 0.7
-
1. 0435
12
4
3
9
11
2
7
1
6
5
8
10
-
4. 05169
4. 93
3
1
10
9
11
2
7
4
6
12
8
5
288.28
0.2 0.8
-
0. 9902
12
4
3
9
11
2
7
1
6
5
8
10
-
4. 17376
5. 98
12
8
5
7
4
6
9
11
2
3
1
10
321.51
0.1 0.9
-
0. 9369
12
4
3
9
11
2
7
1
6
5
8
10
-
4. 29583
4. 94
12
8
5
7
4
6
9
11
2
3
1
10
358.52
0.0 1.0
-
0. 8836
12
4
3
9
11
2
7
1
6
5
8
10
- 4. 4179 5. 88
12
8
5
7
4
6
9
11
2
3
1
10
399.99
Av e r age i mprove me nt 254. 89


0
50
100
150
200
250
300
350
400
450
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
W1
%

i
m
p
r
o
v
e
m
e
n
t

i
n

t
h
e

O
F
V

Figure 6.8: Twelve department problem % improvement in the OFV.
Chapter 6: System Eval uati on and V al i dati on

60
6. 3 Compari son wi th Chen and Shas Procedure
Chen and Sha [21] have shown the superiority of their procedure over
previous algorithms presented by Hormonosky and Tothero [8], Rosenblatt
[15], Dutta and Sahu [16], Fortenberry and Cox [17] and Urban 1987 [19],.
Hence, the results obtained by Chen and Sha [21] are considered in the
presented evaluation. All layouts for each weight combination generated by
the proposed approach are listed and scores are compared. These results are
introduced in Tables 6.9 and 6.10. Table 6.9 summarizes the results for 8-
department, 12-department, and 15-department problems; and verify that the
proposed algorithm give the same quality solution. In Table 6.10, the results
for 20-department problem are summarized and exhibit that the proposed
algorithm is capable of obtaining good-quality solutions. The two tables show
that the proposed genetic algorithm is superior to Chen and Shas procedure.


Table 6.9. Best solution qualities for test problems in Chen and Sha [21].
Wei ghts Probl em si ze=8 Probl em si ze=12 Probl em si ze=15
W1

W2

Scores
f or the
C+S
l ayout
Scores
f or the
proposed
l ayout
Scores
f or the
C+S
l ayout
Scores
f or the
proposed
l ayout
Scores
f or the
C+S
l ayout
Scores
f or the
proposed
l ayout
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
- 3.8730
- 3.4312
- 3.0038
- 2.6113
- 2.2188
- 2.0705
- 2.0199
- 2.2302
- 2.5735
- 2.9899
- 2.4063
- 3.8730
- 3.4312
- 3.0038
- 2.6113
- 2.2188
- 2.0705
- 2.0199
- 2.2302
- 2.5735
- 2.9899
- 2.4063
- 4.2233
- 3.7797
- 3.4235
- 3.1550
- 3.0986
- 3.1647
- 3.3025
- 3.4403
- 3.7008
- 4.0271
- 4.4277
- 4.2233
- 3.7797
- 3.4235
- 3.1550
- 3.0986
- 3.1647
- 3.3025
- 3.4403
- 3.7008
- 4.0271
- 4.4277
- 5.7751
- 5.0971
- 4.4392
- 4.1012
- 4.0121
- 3.9556
- 3.9674
- 4.3027
- 4.7276
- 5.2320
- 5.8092
- 5.7751
- 5.0971
- 4.4392
- 4.1012
- 4.0121
- 3.9556
- 3.9674
- 4.3027
- 4.7276
- 5.2320
- 5.8092
C+S i s a symbol representi ng Chen and Sha.
No t e s : CPU ti me not avai l abl e.
Probl em si ze n=8 ( area l i mi ted to two rows and f our col umns) .
Probl em si ze n=12 ( area l i mi ted to three rows and f our col umns) .
Probl em si ze n=15 ( area l i mi ted to three rows and f i vecol umns) .









Chapter 6: System Eval uati on and V al i dati on

61

Table 6.10. Best solution qualities for test problem in Chen and Sha [21].
Wei ghts
C+S Approach Proposed Approach
I mprov-
ement(%)
W1 W2 Score L ayout Score L ayout Score
1 0 - 5.6513
16
13
17
20
7
2
5
18
1
4
8
11
10
3
15
6
14
12
19
9
- 5.7265
18
13
16
20
5
17
7
11
19
2
1
4
15
8
10
6
12
3
14
9
1.31
0.9 0.1 - 4.9734
13
17
16
20
5
18
8
11
15
2
7
9
19
4
1
6
12
3
10
14
- 5.042
18
13
16
20
5
17
7
11
19
2
1
4
15
8
10
6
12
3
14
9
1.36
0.8 0.2 - 4.5214
19
12
15
6
5
10
3
9
4
1
2
7
18
14
11
8
20
16
17
13
- 4.6264
8
16
17
13
11
7
2
9
4
1
14
3
6
10
19
15
20
18
5
12
2.27
0.7 0.3 - 4.3692
20
12
18
5
6
4
1
19
11
14
10
16
15
3
2
17
8
9
7
13
- 4.4234
13
17
19
5
16
2
10
18
7
14
1
12
9
3
4
15
8
11
6
20
1.23
0.6 0.4 - 4.3766
20
4
6
8
10
1
11
7
12
14
9
16
18
2
3
17
5
19
15
13
- 4.399
5
18
11
20
15
12
4
6
19
10
1
9
17
2
14
7
13
3
16
8
0.51
0.5 0.5 - 4.5022
5
19
15
17
18
14
2
13
1
10
9
7
4
12
3
16
20
11
6
8
- 4.5843
8
6
11
20
16
7
1
4
3
9
10
12
13
2
14
18
17
15
19
5
1.79
0.4 0.6 - 4.8599
5
19
15
17
1
10
2
7
18
14
9
3
4
12
16
13
20
11
6
8
- 4.8599
8
6
11
20
13
16
12
4
3
9
14
18
7
2
10
1
17
15
19
5
0
0.3 0.7 - 5.2405
15
17
19
5
7
2
1
10
3
9
14
18
13
16
11
12
8
6
4
20
- 5.3521
5
19
17
15
10
2
9
7
1
14
16
3
18
11
12
13
4
20
6
8
2.09
0.2 0.8 - 5.8506
5
19
17
15
1
10
2
7
18
14
9
3
11
12
16
13
4
20
6
8
- 5.9017
5
19
17
15
10
2
9
7
1
14
16
3
18
11
12
13
4
20
6
8
0.87
0.1 0.9 - 6.4512
15
17
19
5
7
9
2
10
3
16
14
1
13
12
11
18
8
6
20
4
- 6.4687
8
6
20
4
3
16
13
11
17
12
14
18
7
9
2
1
15
19
10
5
0.27
0 1 - 7.0729
6
11
13
8
4
20
16
3
12
14
9
7
15
18
2
17
5
1
10
19
- 7.1091
8
6
20
4
3
16
13
11
17
12
14
18
7
9
2
1
15
19
10
5
0.51
Av e r ag e i mprov e me nt 1 . 1 09
No t e : Probl em si ze n=15 ( area l i mi ted to f our rows and f i ve col umns) .



Chapter 6: System Eval uati on and V al i dati on

62
0
0.5
1
1.5
2
2.5
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
W1
%

i
m
p
r
o
v
e
m
e
n
t

i
n

t
h
e

O
F
V

Figure 6.9: 20-department problem % improvement in the OFV.





6. 4 Common Test Probl ems

Further proving the effectiveness of the proposed algorithm, another
important evaluation analysis is made with other published heuristic
approaches to the eight commonly used test problems proposed in Nugent et
al. [41]. For the eight single objective problems, the solutions were obtained
by setting the value of the qualitative weight equal to 0. Comparative study
were made in terms of the solutions quality obtained and the computation time
required. With respect to the solution quality, Kusiak and Heragu [13] took it
as (OV 100)/LB, where OV is the objective value and LB is the lower bound
as given by Nugent et al. [41]. Thus, the lower value of the solution quality
measure, is the better solution.
The proposed genetic algorithm was run 10 times for each test problem. The
results are presented in Tables 6.11 and 6.12. Table 6.11 provides the best
solutions obtained for these heuristic methods. Table 6.12 provides the
average solution quality obtained for these heuristic methods. Tables 6.11 and
6.12 verify that the proposed solutions are better than those provided by other
heuristic methods, or are at least as good. As mentioned by Kusiak and
Heragu [13], the computation time provided in Table 6.12 cannot be directly
used for comparison because the computation time for each of the algorithms
Chapter 6: System Eval uati on and V al i dati on

63
depends on factors such as the programmers efficiency, the computer system
used, etc. However, it is obvious that the proposed approach does yield
solutions of very competitive quality in reasonable computation time.



Table 6.11. Best solution qualities for the eight test problems in Nugent et al.[41].
Problem
size (n) H63 H63-66 CRAFT
Biased
Sampling TSP FLAC STEP
Proposed
approach
Best
known
5
6
7
8
12
15
20
30
100.0
104.5
114.9
119.8
123.9
125.8
136.5
145.0
100.0
104.5
110.4
117.6
125.1
120.7
130.1
141.2
100.0
104.5
110.4
117.6
118.9
121.7
130.6
140.7
100.0
104.5
110.4
117.6
118.9
120.0
128.6
138.2
100.0
104.9
110.5
117.6
118.9
122.1
127.9
137.9
100.0
104.9
110.4
117.6
118.9
122.1
128.5
137.6
104.0
112.2
110.4
122.0
118.9
123.6
129.9
139.2
1 00 . 0
1 04 . 5
11 0. 4
11 7. 6
11 8. 9
1 20 . 0
1 26 . 7
1 37 . 6
100.0
104.5
110.4
117.6
118.9
120.0
126.7
136.8
Computer
System

GE 265

GE265

GE265 GE265 CL 470 IBM 4341 VAX 6000
Pentium 1
233MMX


Note1: Resul ts f or H63, H63- 66, CRA FT and Bi ased sampl i ng were obtai ned f rom
Nugent et al . [ 41] .
Note 2: Resul ts f or ST EP were obtai ned f rom L i and Smi th [ 94] .
Note 3: Resul ts f or T SP and FL A C were obtai ned f rom Hi tchi ngs and Cottam [ 95] and
Scri abi n and V ergi n [ 96] respecti vel y.
Note 4: For n<20, the best known resul ts ( n=5 : 8 ) are gl obal opti mal sol uti ons
obtai ned f rom Nugent et al . [ 41] , the best known resul ts ( n=12, 15) are
obtai ned f rom Burkard and Stratmann [ 48] and the best known resul ts ( n=20,
30) were obtai ned f rom Burkard and Bonni nger [ 97] .

























Chapter 6: System Eval uati on and V al i dati on

64

k
n
o
w
n


S
o
l
u
t
i
o
n

q
u
a
l
i
t
y

1
0
0

1
0
4
.
9

1
1
0
.
4

1
1
7
.
6

1
1
8
.
9

1
2
0
.
0

1
2
6
.
7

1
3
6
.
8


S
t
d
.

0
.
0
0
5

0
.
0
2

0
.
2
3

0
.
9
2

0
.
6
8

7
.
3
4

2
1
.
6
3

7
2
.
5
8

C
P
U

T
i
m
e

(
s
e
c
)

M
e
a
n

0
.
0
1

0
.
0
3

3
.
0
8

4
.
2
5

5
.
2
5

2
5
.
1

7
8
.
2

1
7
7
.
3

P
r
o
p
o
s
e
d

m
e
t
h
o
d

S
o
l
u
t
i
o
n

q
u
a
l
i
t
y

1
0
0
.
0

1
0
4
.
5

1
1
0
.
4

1
1
7
.
6

1
1
9
.
9

1
2
1
.
4

1
2
9
.
4

1
4
1
.
6

P
e
n
t
i
u
m

1
-
2
3
3
M
M
X

C
P
U

T
i
m
e

(
s
e
c
)

2
.
8

2
.
4

3
.
1

3
.
3

4
.
8

6
.
1

1
1
.
9

3
2
.
4

F
A
T
E

S
o
l
u
t
i
o
n

q
u
a
l
i
t
y

1
0
4

1
2
3
.
4

1
1
6
.
4

1
3
9
.
2

1
3
4
.
3

1
3
8

1
4
1
.
6

1
5
1
.
5

I
C
L
1
9
0
3
T

C
P
U

T
i
m
e

(
s
e
c
)

1
1

2
1

5
7

1
0
9

6
5
8

2
1
9
2

6
9
1
5

4
2
2
4

B
a
i
s
e
d

s
a
m
p
l
i
n
g

S
o
l
u
t
i
o
n

q
u
a
l
i
t
y

1
0
7
.
2

1
0
6
.
3

1
1
1
.
6

1
1
7
.
6

1
2
0
.
6

1
2
1
.
1

1
2
9
.
4

1
3
9
.
6

G
E
2
6
5

C
P
U

T
i
m
e

(
s
e
c
)

1

2

5

1
0

7
0

1
6
0

5
2
8

3
1
5
0

C
R
A
F
T

S
o
l
u
t
i
o
n

q
u
a
l
i
t
y

1
1
2
.
8

1
0
7
.
8

1
1
8
.
8


1
2
4
.
6

1
2
1
.
9

1
2
6
.
5

1
3
2
.
1

1
4
2
.
5

G
E
2
6
5

C
P
U

T
i
m
e

(
s
e
c
)

1
0

9

1
2

1
4

1
9

4
0

7
5

2
8
5

H
6
3
-
6
6

S
o
l
u
t
i
o
n

q
u
a
l
i
t
y

1
1
7
.
6

1
0
7
.
8

1
1
7
.
0

1
2
1
.
1

1
2
7
.
7

1
2
5
.
3

1
3
2
.
6

1
4
3
.
3

G
E
2
6
5

C
P
U

T
i
m
e

(
s
e
c
)

6


7

1
5

1
4

5
5

7
8

1
6
8

3
9
8

H
6
3

S
o
l
u
t
i
o
n

q
u
a
l
i
t
y

1
1
0
.
4

1
0
7
.
8

1
1
7
.
6

1
2
5
.
7

1
3
0
.
6

1
3
2
.
1

1
3
8
.
1

1
4
6
.
1

G
E
2
6
5

T
a
b
l
e

6
.
1
2
.

a
v
e
r
a
g
e

s
o
l
u
t
i
o
n

q
u
a
l
i
t
i
e
s

f
o
r

t
e
s
t

p
r
o
b
l
e
m
s

i
n

N
u
g
e
n
t

e
t

a
l
.

[
4
1
]
.

P
r
o
b
l
e
m

S
i
z
e

(

n

)

5


6


7

8

1
2

1
5

2
0

3
0

C
o
m
p
u
t
e
r

s
y
s
t
e
m

N
o
t
e

1
:

R
e
s
u
l
t
s

f
o
r

H
6
3
,

H
6
3
-
6
6
,

C
R
A
F
T

a
n
d

B
i
a
s
e
d

s
a
m
p
l
i
n
g

w
e
r
e

f
r
o
m

N
u
g
e
n
t

e
t

a
l
.
[
4
1
]
.

N
o
t
e

2
:

R
e
s
u
l
t
s

f
o
r

F
A
T
E

w
e
r
e

o
b
t
a
i
n
e
d

f
r
o
m

L
e
w
i
s

a
n
d

B
l
o
c
k

[
9
8
]
.





Chapter 7

Conclusions and Future Work


7.1 Snapshot about Thesis
he facility layout problem is one of the truly difficult ill-structured, multi-
criteria, multi-objectives, and NP-completeness problem; the Artificial
Intelligence techniques are the best-preferred tools to deal with this type of
problems. Therefore, the prime objective of this study was to apply the
Genetic Algorithm, (GA) as an efficient AI tool, capable of dealing with this
problem from all sides. To verify this objective, a review of important
techniques for the assignment of facilities to locations has been carried out.
And the problem formulation developments over the years, especially multi
objectives one, have been investigated. In addition, a review of GAs, including
genome representation and their relevant operators with respect to FLPs, has
been presented. After these overviews, GAMOFLP, a solution methodology
based GA for MOFLP is developed. The focus of this dissertation is to handle
the conflicting criteria that affected the idealized relative location of cells on
the floor plan, and some constraints, such as pre specified facilities and /or
restricted locations are considered.

7.2 Conclusion
In this work, GAMOFLP, a genetic algorithm (GA) to tackle and
resolve the multi-objective facility layout problem (MOFLP) is presented. It
incorporates qualitative and quantitative objectives and resolves the problem
T
7
Chapter 7 : Conclusion and Future Work
66
of inconsistent scales and different measurement units to find the idealized
relative locations of cells (facilities) on the floor plan (inter-cell layout). The
proposed GAMOFLP program is designed to tackle the following types of
FLPs:
1. Establish a layout for new facilities.
2. Establish a layout for new facilities subject to restricted areas.
3. Select the best position to add new facility (facilities) to an existing
layout (plant).
The proposed genetic approach seems simple, applicable and
computationally efficient. It is optimistic that the proposed approach will be
helpful in assisting layout planners select good-quality solutions to practical
facility layout problems. The comparisons verified that the proposed
procedure provides acceptable suboptimal solutions in reasonable amount of
computing time, and the rendering of solutions are better than those provided
by other heuristic methods, or are at least as good.

7.3 Scope and Recommendation of Future Work

As a part of future work in this area, appropriate enhancements should
be implemented to further consider practical issues. The proposed GAMOFLP
algorithm, in this form, does not accommodate for actual cell sizes where the
cell area constraints are restricted to equal partitions, so it would be
interesting to extend the current work to incorporate actual cell shapes. Actual
shop-floor dimensions can be taken into account by defining an appropriate
solution space. Permanent blocks may be defined to represent the walls and
other physical obstacles in an actual shop-floor which impede regular traffic
flow. In this case, the algorithm would have to be suitably enhanced to
determine the traffic distances along regular flow paths around these
obstacles.

Another part of future work in this area, a critical consideration that
needs to be examined is the robustness of the solutions obtained, in terms of
Chapter 7 : Conclusion and Future Work
67
the material flow, to projected changes in the product mix. Since a
manufacturing system is dynamic, the parts produced in the system may
undergo changes in terms of both design characteristics and production
volumes. Therefore, an efficient layout should fulfill not only current, but also
the future production requirements.

Furthermore, Although the present analysis uses minimization of total
flow cost and minimization of total numerical rating as the only objectives that
governs cell placement, any combination of certain other objectives, such as
material flow times, traffic congestion along channels, accessibility, flexibility,
space utilization, intersection flow-lines, should also be considered.
Finally, that technique might be augmented with production cell design
and scheduling modules to get a more integrated problem-solving tool. The
combination of this technique with artificial neural networks and computers
that are more powerful would increase its proficiency.

References

[1] Ham, I., Hitomi, K. and Yashida, T., Group technology: Applications to
Production Management, (Boston: Kluwer-Nijhoff Publishing), 1985.
[2] Tompkins, J .A. and White, J .A., Facilities Planning, Wiley, New York,
1984.
[3] Seehof, J .M., and Evans, W.O., Automated Layout Design Program, the
J ournal of Industrial Engineering 18(2), 690-695, 1967.
[4] Lee, R., and Moore, J . M., CORLAP-Computerized Relationship Layout
Planning, journal of industrial engineering 18, 195-200, 1967.
[5] Muther, R., and McPherson, K., Four Approaches to Computerized Layout
Planning, Industrial Engineering, February, 39-42, 1970.
[6] Muther, R., Systematic Layout Planning, Cahners Books, Boston, MA, 1973.
[7] Sule, D. R., Manufacturing Facilities: Location, Planning and Design, 2
nd

edn (Boston: PWS Publishing), 435-443, 1994.
[8] Harmonosky, C. M., and Tothero, G. K. A multi-Factor Plant Methodology
, International J ournal of Production Research, 30, 1773-1789, 1992.
[9] Gilmore, P.C., Optimal and Suboptimal Algorithms for The Quadratic
Assignment Problems, J ournal of the Society for Industrial and Applied
Mathematics, 10, 305-313, 1962.
[10] Lawler, E.L. The Quadratic Assignment Problem Management Science 9,
586-599, 1963.
[11] Gavett, J ., and Plyter, N., The Optimal Assignment of Facilities to
Locations by Branch and Bound, Operation Research, 14, 210-232, 1966.
[12] Garey, M. R. and J ohnson, D. S., Computers and Intractability: a Guide to
Theory of NP-Completeness, (San Francisco: W. H. Freeman), 1979.
[13] Kusiak, A.,and Heragu, S.S., The Facility Layout Problem, European
J ournal of Operational Research, 29, 229-251, 1987.
[14] Malakooti, B., and Tsurushima, A., An Expart System Using Priorities for
Solving Multiple-Criteria Facility Layout Problems International J ournal of
Production Research, 27( 5), 793-808, 1989.
[15] Rosenblatt, M. J ., The Facilities Layout Problem : A multigoal Approach,
International J ournal of Production Research, 17, 323-332, 1979.
Ref erences
68
[16] Dutta, K. N., and Sahu, S., A multigoal Heuristic for Facilities Design
Problems: MUGHAL, International J ournal of Production Research, 20,147-
154, 1982.
[17] Fortenberry, J . C., and Cox, J . F., Multiple Criteria Approach to The
F0acilities Layout Problem" International J ournal of Production Research,
23, 773-782, 1985.
[18] Waghodekar, P. H., and Sahu, S., Facility Layout with Multiple Objectives:
MFLAP, Engineering Cost and Production Economics, 10, 105-112, 1986.
[19] Urban, T. L., A multiple Criteria Model for The Facilities Layout
Problems, International J ournal of Production Research, 25, 1805-1812,
1987; Combining Qualitative and Quantitative Analysis in Facility Layout",
Production and Inventory Management, 30, 73-77, 1989.
[20] Houshyar, A., Computer Aided Facilities Layout: An interactive Multi-Goal
Approach, Computer Industrial Engineering, 20, 177-186, 1991.
[21] Chen, C. W., and Sha D. Y., A design Approach to The Multi-Objective
Facility Layout Problem International J ournal of Production Research, 37,
1175-1196, 1999.
[22] Arunkumar, S., and Chockalingam, T., Genetic Search Algorithms and
Their Randomized Operators, Computers in Math Applications, 25(5), 91-
100, 1993.
[23] Ross, P., Corne, D., and Fang H. L., Successful Lecture Timetabling with
Evolutionary Algorithms, In ECAI94 Workshop W17: Applied Genetic and
other Evolutionary Algorithms, 1994.
[24] Kloske, D., and Smith, R., Bulk Cable Routing using Genetic Algorithms",
Technical report TCGA Report No. 94001, the Clearinghouse for Genetic
algorithms, The University of Alabama, Dept. of Engineering Science and
Mechanics, 1994.
[25] Cohoon, J . P., Hegde, S. U., Martin, W. N., and Richaeds, D. S., Distributed
Genetic Algorithms for The Floorplan Design Problem, IEEE Transactions
on Computer-Aided Design, 10(4), 483-492, 1991.
[26] Tam, K. Y. Genetic Algorithms, Function Optimization, and Facility
Layout Design, European J ournal of Operational Research, 63(2), 322-346,
1992.
Ref erences
69
[27] Smith, D., Bin Packing with Adaptive Search, In Proceedings of the first
International Conference on Genetic Algorithms, 202-207, 1985.
[28] Falkenauer, E., Setting New Limits in Bin Packing with A grouping GA
Using Reduction, Technical Report, CRIF Technical Report RO108, 1994.
[29] Larmore, L.L.; gajski, D.D., and Wu, A. C. H., Layout Placement for Sliced
Architecture, IEEE Transactions on computer-Aided Design, 11(1), 102-
114, 1992.
[30] Saab, Y. G., and Rao, V. B., Combinatorial Optimization by Stochastic
Evolution, IEEE transaction on Computer-Aided Design, 10(4), 525-535,
1991.
[31] Souilah, A., Simulated Annealing for Manufacturing System Layout
Design", Technical Report INRIA Reports No. 1909, Institute National de
Rechecrche en Informatique (INRIA),1993.
[32] Steadman, P., Architecture- Spatial Layout, In J . Rooney and P. Steadman,
editors, Principals of Computer aided design, chapter 13, 245-262, Pitman,
1987.
[33] Steinberg, L. "The Backboard-Wiring Problem: A placement Algorithm",
SIAM Review, 3(1), 37-50, 1961.
[34] Koopmans, T.C., and Beckmann, M., Assignment Problems and The
Location of Economic Activities, Econometrica, 25, 3-76, 1957.
[35] Bazaraa, M.S., Computerized Layout Design: A Branch and Bound
Approach, AIIE Transactions, 432-437, 1975.
[36] Love, R.F., and Wong, J .W., Solving Quadratic Assignment Problems with
Rectilinear Distance and Integer Programming , Naval Research Logistics
Quarterly 23, 623-627, 1976.
[37] Kaufman,L., and Broeckx, F., An algorithm for The Quadratic Assignment
Problem using Benders Decomposition, European J ournal of Operational
Research, 2, 204-211, 1978.
[38] Ritzman, L.P., Bardford, J ., and Iacobs, R., A multiple Objective Approach
to Space Planning for Academic Facilities, Management science, 25(9),
895-906, 1979.
[39] Flouds, L. R., and Robinson, D. F., A strategy for Solving The Plant Layout
Problem, Operations Research Quarterly, 27( 4), 845-855, 1976.
Ref erences
70
[40] Sahni, S., and Gonzalez, T., P-Complete Approximation Problem J ournal
of ACM, 23, 555-565, 1976.
[41] Nugent, C. E., Vollmann, T.E.,and Ruml, J ., An Experimental Comparison
of Techniques for Assignment of Facilities to Locations, Operations
Research, 16, 150-173, 1968.
[42] Kazuhiro K., An Investigation of Genetic Algorithms for Facility Layout
Problems, Msc., Thesis, University of Edinburgh,1995.
[43] Land, A. H., A problem of Assignment with Inter Related Costs,
Operational Research Quarterly, 14, 185-199, 1963.
[44] Edwards, H. K., Gillett, B. E., and Hale, M. E., Modular Allocation
Technique (MAT ) , Management Science, 17(3) :161- 169, 1970.
[45] Neghabat, F., An Efficient Equipment Layout Algorithm, Operations
Research, 22, 622-628, 1974.
[46] Buffa, E. S., Armour, G. C. and T. E. Vollmann, Allocating Facilities with
Craft, Harvard Business Review, 2, 136-159, 1964.
[47] Hiller, F., and Connors, M., Quadratic Assignment Problem Algorithms
and The Location of Indivisible Facilities, Management Science, 13, 42-57,
1966.
[48] Burkard, R. E., and Stratmann, K. H., Numerical Investigations on
Quadratic Assignment Problems, Naval Research Logistics quarterly, 25,
129-148, 1978.
[49] Bazaraa, M. S., and Kirca, O., A branch and Bound Based Heuristic for
Solving The Quadratic Assignment Problem, Naval Research Logistics
quarterly, 30, 287-304,1983.
[50] Scriabin, M., and Vergin, R. C., A cluster-analytic Approach to Facility
Layout, Management Science, 31(1): 33-49, 1985.
[51] Foulds, L. R. Techniques for Facilities Layout: Deciding which Pairs of
Activities should be Adjacent, Management Science, 29(12), 1414-1426,
1983.
[52] Leung, J ., A new Graph-theoretic Heuristic for Facility Layout, Manage-
ment Science, 38(4), 594-605, 1992.
Ref erences
71
[53] Bazaraa, M.S., and Elshafie, A.N., An exact Branch and Bound Procedure
for Quadratic Assignment Problems, Naval Research Logistics quarterly,
26, 109-21, 1979.
[54] Bazaraa, M.S., and Sherali, M.D., Benders Partitioning Scheme Applied to
A new Formulation of The Quadratic Assignment Problem, Naval Research
Logistics quarterly, 27(1), 29-41, 1980.
[55] Hanan, M., and Kurtzberg, J . M., Placement Techniques, In M. A. Breuer,
editor, Design Automation of Digital Systems volume one Theory and
techniques, chapter 5, 213-282, Prence-Hall, 1972.
[56] Lavalle, I., and Roucairol, C. Parallel Branch and Bound Algorithms,
presented at Euro VIII, Bologna, Italy, 1985.
[57] Burkard, R.E., Locations with Spatial Interaction-Quadratic Assignment
Problem, in: R.L. Francis and P.B. Mirchandani(eds.),Discrete location
theory, Academic press, New York,1984.
[58] Deiseroth, M. P., and Apple, J . M. , A Computerized Plant Layout Analysis
and Evaluation Technique (PLANT), American Institute of Industrial
Engineers, Norcross, GA, 1972.
[59] Zoller, K., and Adendorff, K. "Layout Plant by Computer Simulation", AIIE
Transactions 116-125, 1972.
[60] Block, T. E.," FATE: A New Construction Algorithm for Facilities Layout"
J ournal of Engineering Production 2, 111-120, 1978.
[61] O'Brien, C., and Abdel Barr, S.E.Z., "An Interactive Approach to Computer
Aided Facility Layout", International J ournal of Production Research,
18(2),201-211, 1980.
[62] Heragu, S.S and Kusiak, A., "A Construction Algorithm for The Facility
Layout Problem", Working paper #14/86, department of Mechanical and
Industrial Engineering, University of Manitoba, Winnipeg, Manitoba,
Canada, 1986.
[63] Kumara, S. R., Kashyap, R. L., and Moodie, C. L., Expert System for
Industrial Facilities Layout Planning and Analysis, Computers Industrial
Engineering, 12(2), 143-152, 1987.
[64] Harraz, N., A Knowledge Based Decision Support System for Facility
Layout, MSc., Thesis, Alexandria University, 1997.
Ref erences
72
[65] Raoot, A., and Rakshit, A., A Linguistic Pattern Approach for Multi-
Criteria Facility Layout Problem, International J ournal of Production
Research, 31(1), 203-222, 1993.
[66] Dweiri, F., and Meier, F., Application of Fuzzy Decision-Making in
Facility Layout Planning, International J ournal of Production Research
34(11), 3207-3225, 1996.
[67] Hamamoto, S., Yih, Y., and Salvendy, G., Development and Validation of
Genetic Algorithm-Based Facility Layout: A Case study in the
Pharmaceutical Industry, International J ournal of Production Research,
37(4), 749-768, 1999.
[68] Badiru, A., and Arif, A., FLEXPERT: Facility Layout Expert System Using
Fuzzy Linguistic Relationship Codes, IIE Transactions, 28(4), 295-308,
1996.
[69] Yang, T. and Kuo, C. " A Hierarchical AHP/DEA Methodology for The
Facilities Layout Design Problem", European J ournal of Operational
Research, 147 (1), 128 136, 2003.
[70] Lee, Y.H. and Lee, M.H. " A Shape-Based Block Layout Approach to
Facility Layout Problems using Hybrid Genetic Algorithm", Computers and
Industrial Engineering 42 ( 2), 237 248,2002.
[71] Farhad Azadivar and J ohn (J ian) Wang " Facility Layout Optimization using
Simulation and Genetic Algorithms" International J ournal of Production
Research, 38(17) , 4369 - 4383, 2000.
[72] Evans, G., Wilhelm, M., and Karwowski, W., (1987), " A Layout Design
Heuristic Employing The Theory of Fuzzy Sets", International J ournal of
Production Research , 25 (10), 1431-1450, 1987.
[73] J acobs, F. R., A Layout Planning System with Multiple Criteria and
Variable Domain Representation, Management. Science., 33(8), 1020-1034,
1987.
[74] Shang, J . S., Multicriteria Facility Layout Problem: An Integrated
Approach, European J ournal of Operational Research, 66, 291-304, 1993.
[75] Sarin, S. C., Loharjun, P., Malmborg, C., and Krishnaumar, B., Multi-
attribute Decision-Theoretic Approach to The Layout Design Problem,
European J ournal of Production Research, 57(2), 231-242, 1992.
Ref erences
73
[76] Khare, V. K., Khare, M. K., and Neema, M. L., Combined Computer-Aided
Approach for The Facilities Design Problem and Estimation of The
Distribution Parameter in The Case of Multigoal Optimization, Computers
Industrial Engineering, 14, 465-476, 1988.
[77] Khare, V. K., Khare, M. K., and Neema, M. L., Estimation of Distribution
Parameters Associated with Facilities Design Problem Involving Forward
and Backtracking of Materials, Computers Industrial Eng., 14, 63-75, 1988.
[78] Whitley, A Genetic Algorithm Tutorial, Technical Report CS-93-103,
Department of computer science, Colorado State University, 1993.
[79] Goldberg, D. E., Genetic Algorithms in Search, Optimization, and Machine
Learning, Addison-Wesley, 1989.
[80] Baker, J .E., Adaptive Selection Methods for Genetic Algorithms, In
Proceedings of the first International Conference on Genetic Algorithms,
101-111, 1985.
[81] Brindle, A., Genetic Algorithms for Function Optimization., Technical
Report TR81-02, Dept. of Computer science, University of Alberta,
Edmonton, Alberta,Canada,T6G 2H1, 1981.
[82] Ross, P. and Hallam, J ., Connectionist Computing (DAI Teaching Report
no.21), Technical Report, The department of Artificial Intelligence,
Edinburgh University, 1995.
[83] Whitley, D., The Genitor Algorithm and Selection Pressure: Why Rank-
Based Allocation of Reproductive Trials is Best, In Proceedings of the
Third International Conference Genetic algorithms, 116-121, 1989.
[84] Baeck, T., Hoffmeister, F., and Schwefel, H. P., A Survey of Evolution
Strategies, In Proceedings of the Fourth International Conference on
Genetic algorithms, 2-9, 1991.
[85] Davis, L., Handbook of Genetic Algorithms, Chapter 2, 23-42, Van
Nostrand Reinhold, 1991.
[86] Schaffer, J .D., Whitley, D., and Eshelman, L.J ., Combinations of Genetic
Algorithms and Neural Networks: A Survey of The State of The Art,
Proceedings of the International Conference on the Combinations of Genetic
Algorithms, San Mateo, CA: Morgan Kaufmann Publishers, 1992.
Ref erences
74
[87] Holland, J .H., 1992, Genetic Algorithms, Scientific American, July, 66-
72, 1992.
[88] Glover, F., and Greenberg, H. J ., New Approaches for Heuristic Search: A
Bilateral Linkage with Artificial Intelligence, European J ournal of
Operational Research, 39, 119-130, 1989.
[89] Fang, H. L., Ross P., and Corne D., A Promising Genetic Algorithm
Approach to J ob-shop Scheduling, Rescheduling, and Open-shop Scheduling
Problems In Proceedings of the Fifth International Conference on Genetic
algorithms, pages 375-382, 1993.
[90] Cohoon, J .P., and Paris, W. D., Genetic Placement, IEEE Transactions on
Computer-Aided Design, 6, 956-964, 1987.
[91] Smith, A., and Tate, Genetic Optimization using A Penalty Function, In
Proceedings of the Fifth International Conference on Genetic algorithms,
499-505, 1993.
[92] Wong, D. F., and Lin, C. L., A New Algorithm for Floorplan Design, In
Proceedings of 23rd ACM/IEEE Design Automation Conference, 101-107,
1986.
[93] Goldberg, D.E., Lingle, R., "Alleles, loci, and the TSP", Presented at the
First International Conference on Genetic Algorithms, Lawrence Erlbaum
Associates, Hillsdale, NJ , 154159, 1985.
[94] Li, W. J . and smith, J . M., "An Algorithm for Quadratic Assignment
Problems", European J ournal of Operational Research, 81, 195-200. 1995
[95] Hitchings, G.G., and Cottam, M., "An efficient Heuristic Procedure for
Solving The Layout Design Problem", Omega 4(2), 205-214, 1976.
[96] Scriabin, M., and Vergin, R.C., "A Cluster-analytic Approach to Facility
Layout" Management Science, 31(1), 33-49, 1985.
[97] Burkard, R. E. and Bonniger, T., "A Heuristic for Quadratic Boolean
Programs with Applications to Quadratic Assignment Problems", European
J ournal of Operational Research, 13, 374-386, 1983.
[98] Lewis, W. P. and Block, T.E., "On The Applications of The Computer Aids
to Plant Layout", International J ournal of Production Research, 18, 11-20.
1980


Appendix (A)

Steps of Hill-Climbing method for getting the default parameters of the
proposed GA by solving a randomly generated 25-cell problem. The following
figures shows the problem data.

Fi gure A. 1 Fl ow, adj ac e nc y and di s t anc e dat a f or a r andoml y
ge ne r at e d 25- c e l l probl e m ( 5 rows x 5 c ol umns ) .
1. Adj acency dat a:
F T 1

2

3

4

5

6

7

8

9

1
0

1
1

1
2

1
3

1
4

1
5

1
6

1
7

1
8

1
9

2
0

2
1

2
2

2
3

2
4

2
5

1 - I U U O U U O U I I O O O U U U I I U U U O U U
2 I - U U O O U U I I O U U U U O U A U O U O O U A
3 U U - U U I I O O O I U U U U U I U I A O U U O I
4 U U U - U U U O O I U U U I U U U O U O I U E U U
5 O O U U - U A U U U E O U I I I U A U O U U O I E
6 U O I U U - I U U E E O U U E U U U U U U U O E U
7 U U I U A I - U X I A O A O U U I E U I U U I U U
8 O U O O U U U - U O U U I O A U I O U U U I U E I
9 U I O O U U X U - U O O I E U O O O E O U O E E U
10 I I O I U E I O U - U I O U X U A I E E U U O U U
11 I O I U E E A U O U - U O E U U U E U O U A O A E
12 O U U U O O O U O I U - O O U O X U O U A E O U U
13 O U U U U U A I I O O O - U E A U U O U E O I O I
14 O U U I I U O O E U E O U - O U I X O U U U U O U
15 U U U U I E U A U X U U E O - U U E I O I U U U U
16 U O U U I U U U O U U O A U U - E U I O U I U U O
17 U U I U U U I I O A U X U I U E - U I U U I U O O
18 I A U O A U E O O I E U U X E U U - U O O U U I O
19 I U I U U U U U E E U O O O I I I U - U U I E X E
20 U O A O O U I U O E O U U U O O U O U - I O I U O
21 U U O I U U U U U U U A E U I U U O U I - I O U E
22 U O U U U U U I O U A E O U U I I U I O I - I O I
23 O O U E O O I U E O O O I U U U U U E I O I - A I
24 U U O U I E U E E U A U O O U U O I X U U O A - I
25 U A I U E U U I U U E U I U U O O O E O E I I I -
Appendix (A)
76
2. Fl ow and Di s t ance dat a:
F T 1

2

3

4

5

6

7

8

9

1
0

1
1

1
2

1
3

1
4

1
5

1
6

1
7

1
8

1
9

2
0

2
1

2
2

2
3

2
4

2
5

1 0 17 0 0 8 0 0 2 0 17 11 4 3 7 0 0 0 13 12 0 0 0 8 0 0
2 17 0 0 0 7 9 0 0 10 17 6 0 0 0 0 0 0 23 0 4 0 1 8 0 23
3 0 0 0 0 0 16 15 8 5 6 11 0 0 0 0 0 15 0 17 24 2 0 0 5 16
4 0 0 0 0 0 0 0 9 8 13 0 0 0 16 0 0 0 8 0 0 11 0 21 0 0
5 8 7 0 0 0 0 24 0 0 0 18 8 0 17 14 16 0 24 0 3 0 0 21 0 18
6 0 9 16 0 0 0 12 0 0 18 21 6 0 0 22 0 0 0 0 0 0 0 5 21 0
7 0 0 15 0 24 12 0 0 0 16 23 12 4 1 0 0 12 19 0 14 0 0 10 0 0
8 2 0 8 9 0 0 0 0 0 4 0 0 17 5 24 0 10 3 0 0 0 12 0 20 16
9 0 10 5 8 0 0 0 0 0 0 7 9 0 21 0 5 3 8 20 6 0 7 19 22 0
10 17 17 6 13 0 18 16 4 0 0 0 16 9 0 0 0 24 13 2 18 0 0 0 0 0
11 11 6 11 0 18 21 23 0 7 0 0 0 9 20 0 0 0 18 0 5 0 24 0 24 22
12 4 0 0 0 8 6 1 0 9 16 0 0 6 7 0 6 0 0 0 0 24 20 8 0 0
13 3 0 0 0 0 0 24 17 0 9 9 6 0 0 19 24 0 0 2 0 18 9 14 2 12
14 7 0 0 16 17 0 1 5 21 0 20 7 0 0 1 0 15 0 8 0 0 0 0 2 0
15 0 0 0 0 14 22 0 24 0 0 0 0 19 1 0 0 0 21 11 0 10 0 0 0 0
16 0 0 0 0 16 0 0 0 5 0 0 6 24 0 0 0 20 0 13 1 0 13 0 0 0
17 0 0 15 0 0 0 10 10 3 24 0 0 0 15 0 20 0 0 10 0 0 12 0 3 9
18 13 23 0 8 24 0 19 3 8 13 18 0 0 0 21 0 0 0 0 4 6 0 0 16 7
19 12 0 17 0 0 0 0 0 20 22 0 0 2 8 11 13 10 0 0 0 0 11 22 0 21
20 0 4 24 0 3 0 14 0 6 18 5 0 0 0 0 1 0 4 0 0 16 4 15 0 5
21 0 0 2 11 0 0 0 0 0 0 0 24 18 0 10 0 0 6 0 16 0 12 9 0 19
22 0 1 0 0 0 0 0 12 7 0 24 20 9 0 0 13 12 0 11 4 12 0 13 8 10
23 8 8 0 21 2 5 10 0 19 0 0 8 14 0 0 0 0 0 22 15 9 13 0 23 13
24 0 0 5 0 10 21 0 20 2 0 24 0 2 2 0 0 3 16 0 0 0 8 23 0 17
25 0 23 16 0 18 0 0 16 0 0 2 0 12 0 0 0 9 7 21 5 19 10 13 17 0

Using Hill-Climbing Method shown in Table 5.5, the following results were
obtained:
Step 1: Default parameters set up: selected arbitrarily
Population size 40
Crossover rate 0.5
Mutation rate 0.05
Tournament size 4
Max. Number of generations 2500
Appendix (A)
77
Step 2: Population size and Max. No. of generation investigation
Population size
10 20 40 50 100 200 250 500
Max. no. of gen.
10000 5000 2500 2000 1000 500 400 200
Score

-6.960 -7.035 -7.103 -7.168 -7.062 -7.182 -7.16 -6.916


Crossover rate 0.5 Pre-default
Mutation rate 0.05 Pre-default
Tournament size 4 Pre-default
Set Population size =200 & Max. No. of generations=500 as a new default.

Step 3: crossover rate investigation
Cross. rate 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
Score -6.355 -6.983 -7.189 -7.203 -7.225 -7.304 -7.148 -7.344 -7.170 -7.322 -7.186
Population size 200 Default parameter
Mutation rate 0.05 Pre-default
Tournament size 3 Pre-default
Max. no. of gen. 500 Default parameter
Set Crossover rate =0.7 as a new default.

Step 4: mutation rate investigation
Mut. rate
0.001 0.002 0.005 0.01 0.02 0.05 0.1 0.15 0.2 0.25 0.3
Score -6.984 -7.034 -7.033 -6.981 -7.025 -7.227 -7.325 -7.292 -7.204 -7.136 -7.125
Population size 200 Default parameter
Crossover rate 0.7 Default parameter
Tournament size 3 Pre-default
Max. No. Of gen. 500 Default parameter
Set Mutation rate =0.1 as a new default.

Step 5: tournament size investigation
Tournament size 2 3 4 5 6 7 8
Score -7.324 -7.325 -7.439 -7.354 -7.398 -7.427 -7.323
Population size 200 Default parameter
Crossover rate 0.7 Default parameter
Mutation rate 0.1 Default parameter
Max. no. of gen. 500 Default parameter
Set Tournament size =4 as a new default.

Step 6: the default parameters
Population size 200
Crossover rate 0.7
Mutation rate 0.1
Tournament size 4
Max. Number of generations 500

The objective function score relate to Equation (14), Chapter 3.


Appendix ( B ): Test Problems Data

This appendix contains Harrazs eight test problems data, which are
taken from Harraz [64] and Chen and Shas four test problems, which are
taken form Chen and sha [21] and Khare et al [77].
First: Harrazs eight test problems data:
Figure (B.1): Flow, adjacency and distance data for a 5-cell problem.
Flow, adjacency data Distance data
1 2 3 4 5 1 2 3 4 5
1
5 2 4 1
1 1 1 2 3
2
A 3 0 2
2 1 2 1 2
3
O A 0 0
3 1 2 1 2
4
E I U 5
4 2 1 1 1
5
U E O I
5 3 2 2 1

Figure (B.2): Flow, adjacency and distance data for a 6-cell problem.
Flow, adjacency data Distance data
1 2 3 4 5 6 1 2 3 4 5 6
1
5 2 4 1 0
1 1 2 1 2 3
2
E 3 0 2 2
2 1 1 2 1 2
3
O E 0 0 0
3 2 1 3 2 1
4
U U X 5 2
4 1 2 3 1 2
5
A A U U 10
5 2 1 2 1 1
6
I U X U A
6 3 2 1 2 1

Figure (B.3): Flow, adjacency and distance data for a 7-cell problem.
Flow, adjacency data Distance data
1 2 3 4 5 6 7 1 2 3 4 5 6 7
1
5 2 4 1 0 0
1 1 2 3 2 3 4
2
E 3 0 2 2 2
2 1 1 2 1 2 3
3
O E 0 0 0 5
3 2 1 1 2 1 2
4
U U X 5 2 2
4 3 2 1 3 2 1
5
A A U U 10 0
5 2 1 2 3 1 2
6
I U X U A 5
6 3 2 1 2 1 1
7
U U U O U U
7 4 3 2 1 2 1

Figure (B.4): Flow, adjacency and distance data for a 8-cell problem.
Flow, adjacency data Distance data
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
1
5 2 4 1 0 0 6
1 1 2 3 1 2 3 4
2
E 3 0 2 2 2 0
2 1 1 2 2 1 2 3
3
O E 0 0 0 5 5
3 2 1 1 3 2 1 2
4
U U X 5 2 2 10
4 3 2 1 4 3 2 1
5
A A U U 10 0 0
5 1 2 3 4 1 2 3
6
I U X U A 5 1
6 2 1 2 3 1 1 2
7
U U U O U U 10
7 3 2 1 2 2 1 1
8
U U U I I E U
8 4 3 2 1 3 2 1
Appendix (B)
79
Figure (B.5): Flow, adjacency and distance data for a 9-cell problem.
Flow, adjacency data Distance data
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
1
5 2 4 1 0 0 6 2
1
1 2 1 2 3 2 3 4
2
U 3 0 2 2 2 0 4
2
1 1 2 1 2 3 2 3
3
U U 0 0 0 5 5 5
3
2 1 3 2 1 4 3 2
4
I O I 5 2 2 10 0
4
1 2 3 1 2 1 2 3
5
U O U I 10 0 0 0
5
2 1 2 1 1 2 1 2
6
U U U I E 5 1 1
6
3 2 1 2 1 3 2 1
7
U U U O U U 10 5
7
2 3 4 1 2 3 1 2
8
U U U I I E U 0
8
3 2 3 2 1 2 1 1
9
U I A I U U A E
9
4 3 2 3 2 1 2 1

Figure (B.6): Flow, adjacency and distance data for a 10-cell problem.
Flow, adjacency data Distance data
1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
1
5 2 4 1 0 0 6 2 1
1 1 2 1 2 3 2 3 4 5
2
U 3 0 2 2 2 0 4 5
2 1 1 2 1 2 3 2 3 4
3
U U 0 0 0 5 5 5 2
3 2 1 3 2 1 4 3 2 3
4
I O I 5 2 2 10 0 0
4 1 2 3 1 2 1 2 3 4
5
U O U I 10 0 0 0 5
5 2 1 2 1 1 2 1 2 3
6
U U U I E 5 1 1 5
6 3 2 1 2 1 3 2 1 2
7
U U U O U U 10 5 2
7 2 3 4 1 2 3 1 2 3
8
U U U I I E U 0 0
8 3 2 3 2 1 2 1 1 2
9
U I A I U U A E 0
9 4 3 2 3 2 1 2 1 1
0
E O U O U U U U U
0 5 4 3 4 3 2 3 2 1

Figure (B.7): Flow, adjacency and distance data for a 11-cell problem.
Flow, adjacency data Distance data
1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11
1 5 2 4 1 0 0 6 2 1 1 1 1 2 1 2 3 4 2 3 4 5
2 U 3 0 2 2 2 0 4 5 0 2 1 1 2 1 2 3 3 2 3 4
3 U U 0 0 0 5 5 5 2 2 3 2 1 3 2 1 2 4 3 2 3
4 I O I 5 2 2 10 0 0 5 4 1 2 3 1 2 3 1 2 3 4
5 U O U I 10 0 0 0 5 1 5 2 1 2 1 1 2 2 1 2 3
6 U U U I E 5 1 1 5 4 6 3 2 1 2 1 1 3 2 1 2
7 U U U O U U 10 5 2 3 7 4 3 2 3 2 1 4 3 2 1
8 U U U I I E U 0 0 5 8 2 3 4 1 2 3 4 1 2 3
9 U I A I U U A E 0 10 9 3 2 3 2 1 2 3 1 1 2
10 E O U O U U U U U 5 10 4 3 2 3 2 1 2 2 1 1
11 A X U U E I U U U U 11 5 4 3 4 3 2 1 3 2 1


Appendix (B)
80
Figure (B.8): Flow, adjacency and distance data for a 12-cell problem.
Flow, adjacency data Distance data
1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12
1 5 2 4 1 0 0 6 2 1 1 1 1 1 2 3 1 2 3 4 2 3 4 5
2 U 3 0 2 2 2 0 4 5 0 0 2 1 1 2 2 1 2 3 3 2 3 4
3 U U 0 0 0 5 5 5 2 2 2 3 2 1 1 3 2 1 2 4 3 2 3
4 I O I 5 2 2 10 0 0 5 5 4 3 2 1 4 3 2 1 5 4 3 2
5 U O U I 10 0 0 0 5 1 1 5 1 2 3 4 1 2 3 1 2 3 4
6 U U U I E 5 1 1 5 4 4 6 2 1 2 3 1 1 2 2 1 2 3
7 U U U O U U 10 5 2 3 3 7 3 2 1 2 2 1 1 3 2 1 2
8 U U U I I E U 0 0 5 5 8 4 3 2 1 3 2 1 4 3 2 1
9 U I A I U U A E 0 10 10 9 2 3 4 5 1 2 3 4 1 2 3
10 E O U O U U U U U 5 5 10 3 2 3 4 2 1 2 3 1 1 2
11 A A U U U E O U A I 2 11 4 3 2 3 3 2 1 2 2 1 1
12 I U X U A U O E I X U 12 5 4 3 2 4 3 2 1 3 2 1

Second:Chen and Shas four test problems data
The flow matrices data are take from Khare et al [77], and the adjace-
ncy matrices data are taken from Chen and Sha [21].

Figure (B.9): Flow, adjacency and distance data for an 8-cell problem.
Flow data Adjacency and distance data
F T
1 2 3 4 5 6 7 8
F T
1 2 3 4 5 6 7 8
1 4 5 2 3 5 6 7 1 1 2 3 1 2 3 4
2 3 4 6 2 8 3 2 2 X 1 2 2 1 2 3
3 2 5 5 4 6 2 3 3 I O 1 3 2 1 2
4 5 4 7 4 5 6 1 4 I U I 4 3 2 1
5 6 6 6 5 5 6 7 5 U U U A 1 2 3
6 2 4 2 4 5 2 3 6 A U E U U 1 2
7 3 3 3 3 4 2 4 7 I O I I X U 1
8 4 2 4 2 3 1 4 8 U E U E E U U

Figure (B.10): Flow, adjacency and distance data for a 12-cell problem.
Flow data Adjacency and distance data
1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12
1 2 4 1 3 5 2 4 6 3 5 7 1 1 2 3 1 2 3 4 2 3 4 5
2 2 2 3 1 3 4 2 4 3 3 5 2 A 1 2 2 1 2 3 3 2 3 4
3 4 2 5 3 1 6 4 3 7 5 3 3 X O 1 3 2 1 2 4 3 2 3
4 1 3 5 2 4 1 3 5 2 4 6 4 U U I 4 3 2 1 5 4 3 2
5 3 1 3 2 2 3 1 3 4 2 4 5 I O U U 1 2 3 1 2 3 4
6 5 3 1 4 2 5 3 1 6 4 3 6 U E A O E 1 2 2 1 2 3
7 2 4 6 1 3 5 2 4 1 3 5 7 U E U O U U 1 3 2 1 2
8 4 2 4 3 1 3 2 3 5 3 6 8 E U O U O U U 4 3 2 1
9 4 5 3 1 4 2 0 5 1 3 5 9 I U X O I A E E 1 2 3
10 7 2 4 6 1 3 5 0 2 5 3 10 E O O U U U X U O 1 2
11 5 4 2 4 3 1 3 2 0 2 5 11 I O A U U O U E E U 1
12 3 6 4 3 5 3 1 4 2 0 5 12 E O U U O U U I I I X
Appendix (B)
81
Figure (B.11): Flow, adjacency and distance data for a 15-cell problem.

Flow data:
















Adjacency and
Distance data:













F T 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 4 5 8 12 16 3 7 2 6 8 9 12 17 12
2 15 6 8 12 0 9 35 4 7 3 6 9 8 12
3 15 16 9 2 0 15 6 17 6 12 3 5 8 9
4 1 25 9 2 6 5 8 0 0 0 0 3 2 9
5 5 0 15 6 2 0 8 0 9 0 6 6 3 2
6 8 5 0 6 9 5 8 8 0 6 0 3 5 8
7 0 3 5 0 8 9 9 9 8 7 12 0 13 15
8 16 17 0 16 15 11 14 1 4 12 2 15 15 13
9 17 6 9 11 25 6 12 12 5 7 8 9 2 6
10 3 8 9 6 0 0 0 0 0 0 5 6 0 7
11 8 9 0 12 15 16 0 0 2 4 5 0 5 7
12 6 7 2 8 9 12 15 5 5 0 0 7 0 5
13 6 4 3 8 9 0 11 5 15 15 10 10 5 10
14 12 6 9 8 10 11 15 5 16 12 10 10 5 7
15 2 3 4 8 0 12 15 16 12 0 0 0 0 2
F T 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 1 2 3 4 1 2 3 4 5 2 3 4 5 6
2 I 1 2 3 2 1 2 3 4 3 2 3 4 5
3 U E 1 2 3 2 1 2 3 4 3 2 3 4
4 E O U 1 4 3 2 1 2 5 4 3 2 3
5 U I E X 5 4 3 2 1 6 5 4 3 2
6 X E O U U 1 2 3 4 1 2 3 4 5
7 I I U O O I 1 2 3 2 1 2 3 4
8 U A I U E U U 1 2 3 2 1 2 3
9 E U X A U U U O 1 4 3 2 1 2
10 O E U A I E U A E 5 4 3 2 1
11 A U A U O U X E U O 1 2 3 4
12 X O U O U O I I I U E 1 2 3
13 I O I I O E O E O O I X 1 2
14 I U O U U E U E U U O O U 1
15 U O U I U U O I E O O O O U
Appendix (B)
82
Figure (B.12): Flow, adjacency and distance data for a 20-cell problem.
Flow data:
F T 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
1 12 2 53 6 9 8 6 3 52 4 1 2 23 6 9 8 6 3 4
2 10 23 6 9 6 23 5 8 4 2 3 9 6 5 3 6 9 12 2
3 5 6 3 3 6 6 9 9 9 9 23 5 8 16 5 3 2 6 3
4 9 6 12 3 9 9 6 3 5 8 12 6 5 2 3 3 6 9 3
5 6 9 6 3 3 6 9 6 5 6 8 6 3 6 3 6 23 9 6
6 8 5 6 3 6 2 12 3 6 9 6 3 2 12 2 2 3 8 9
7 26 5 2 3 5 6 3 6 9 6 3 5 2 8 9 6 3 2 7
8 3 6 3 6 3 6 9 3 4 6 9 6 3 1 2 3 6 9 3
9 3 3 3 6 6 9 9 9 3 6 6 6 9 9 3 3 3 3 5
10 5 6 9 3 6 9 6 9 6 2 6 3 6 3 6 3 6 3 6
11 9 6 8 7 4 6 3 6 5 2 2 3 6 9 6 9 6 3 6
12 9 6 5 2 8 3 2 2 3 6 3 5 6 9 3 6 5 9 3
13 3 6 2 5 6 3 6 9 6 3 2 2 3 6 9 6 3 2 3
14 3 6 9 6 3 2 5 9 8 23 6 9 6 1 2 6 3 6 9
15 6 3 5 8 9 6 3 6 5 3 6 9 6 3 3 6 3 6 3
16 3 5 2 9 8 6 5 6 3 7 6 3 6 9 6 9 6 3 5
17 6 9 6 3 9 6 8 12 3 6 9 4 23 6 9 6 2 3 6
18 9 6 3 5 6 3 3 6 3 6 9 6 3 2 5 6 9 2 3
19 6 3 3 6 9 6 3 2 3 6 3 3 6 3 6 3 9 6 3
20 2 1 2 5 9 6 8 3 6 2 3 1 2 5 6 3 6 9 6

Adjacency and Distance data:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
1 1 2 3 4 1 2 3 4 5 2 3 4 5 6 3 4 5 6 7
2 I 1 2 3 2 1 2 3 4 3 2 3 4 5 4 3 4 5 6
3 O U 1 2 3 2 1 2 3 4 3 2 3 4 5 4 3 4 5
4 I U I 1 4 3 2 1 2 5 4 3 2 3 6 5 4 3 4
5 O U X O 5 4 3 2 1 6 5 4 4 2 7 6 5 4 3
6 U X U I U 1 2 3 4 1 2 3 4 5 2 3 4 5 6
7 O O E U X U 1 2 3 2 1 2 3 4 3 2 3 4 5
8 O U O U U U I 1 2 3 2 1 2 3 4 3 2 3 4
9 O A I O O E E I 1 4 3 2 1 2 5 4 3 2 3
10 O E O U I U E U E 5 4 3 2 1 6 5 4 3 2
11 I E O O U E O U U I 1 2 3 4 1 2 3 4 5
12 U X U I O A I U I E O 1 2 3 2 1 2 3 4
13 X E A O X O U U O O E U 1 2 3 2 1 2 3
14 A E I I I U O U I X I I A 1 4 3 2 1 2
15 U E O U I I O O I U U O U O 5 4 3 2 1
16 U U E U U I I O A O I E I E U 1 2 3 4
17 X O A X I O E U E U U I U E U I 1 2 3
18 I E U O I U U U I E E E I E O U I 1 2
19 A E U U O U U U I A U I U I I I A U 1
20 U O U E U I U E I U E E X E U E O E U
Appendix ( C ): Proposed GAMOFLP Code


This appendix contains the code of the proposed GAMOFLP using C++ language.


//Header File of the program "refrences.h"

#include<iostream.h>
#include<time.h>
#include<math.h>
#include<iomanip.h>
#include<cstdlib>
//=====================
const int MaxNoFacility=50;
const int populationSize=500;
int counter=0;
int count=0;

void Genetic_Data();
void inputs();
void Fitness();
void ImproveFitness(int);
void selection();
void Mutation();
int tournament();
void crossover();
void RepaireChromosome( int,int );

void criteria_type();
void distance_matrix();
void location_weight();
void input_prespecifiedFacilities();
void UserModifying();
void adjustPrespecifiedFacilities();
void flow_matrix();
void cost_matrix();
void relationship_matrix();
void read_rel_matrix();
void read_flow_matrix();
void facility_relationship_statistic(int);
void generate_random_example();
void modify_current_proplem();
void modify_rel_matrix();
void modify_flow_matrix();
void modify_cost_matrix();
void adjustWeight();
void spaceDimension();
void convert_rel_to_value();
bool checkLocation(int);
void showLocation(int );
bool checkFacility(int);
bool check_relation(int,int);
bool SolveAnotherProblem();
float rnd(); //generate random numder
void display();
void MomAllocate();
Appendix (C)

84
84
void delmem();
void free_memory();
void selection_memory();
void refresh();
//=================
void top(char);
void center(char); //graphic functions
void bottom(char );
void Line(int);
//=================

void Chen_score();
float Hormonosky_score_system();
void Chen_statistics();

void examples();
void ExampleNo();
float alpha1=1;
float alpha2=0;
bool hybrid=0;
bool priority=1;
int Example_No=0;

int no_of_prespecified_facilities=0;
int N=0;
double Start_time=0;
double Computation_time=0;
bool mdfy=0;
int row=0;
int col=0;
int col_row=0;
int adjustDimension=0;
char NonExamples='N';
float BestFitness1=0;
float BestFitness2=0;
float BestFitness11=0;
float BestFitness22=0;
float BestFitness=0;
float fitness[populationSize]={0};
float fitness1[populationSize]={0};
float fitness2[populationSize]={0};
int *dist[MaxNoFacility];
int *flow[MaxNoFacility];
int *string[populationSize];
float* cost[MaxNoFacility];
int *relationship_value[MaxNoFacility];
int *BestLayout;
void progressTable(float);
char *relationship[MaxNoFacility];
float* adj_matrix[MaxNoFacility];
int value[]={4,3,2,1,0,-1}; // equivelent qualititative factors (QF)
int Fac_rel[MaxNoFacility][6]; // used for statistc information of (QF)
int total[6]; // used for statistc information of (QF)
int NoOfNeglectedLocation=0;
int *neglected_loc;
int *nieghborhood[8];

const int imp_seq=200;
int *stringtemp[3];
int *layoutSequance[imp_seq];
int *F;
Appendix (C)

85
85
int *L;
int IterationNo[imp_seq];
double consumedTime[imp_seq];
float QuantitativeFitness[imp_seq];
float QualitativeFitness[imp_seq];
float MROS[imp_seq];
float CumulativeMROS[imp_seq];
int *temporary[populationSize];
float *tour;
float crossoverProbability=.7F; //
double mutationProbability=.1F; //
int maxIteration=500; // the default genetic algorithm
int population_Size=200; // parameters
int tournamentSize=4; //

bool cost_change=0;
bool rand_example =0;
float SD1=0;
float SD2=0;
float GM1=0;
float GM2=0;

///////////////////////////////////////////////////////////////////////////////////////////////////
//This program is written by Engineer Raafat hussien El-shaer, E-mail: r_h_elshaer@yahoo.com//
//This a code of program to solve the multi-objectives multi-criteria//
//Facility layout problem using the Genetic Algorithm technique //
//=================================================//
/////////////////////// CPP FILE /////////////////////////////////////
#include"refrences.h"
//////////////////////////////// MAIN FUNCTION ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void main()
{
cout<<'\n'<<" "<<char(201);Line(71);cout<<char(187);
cout<<'\n'<<" "<<char(186)<<setw(60)
<<"Genetic Algorithm For Facility Layout Problem"
<<setw(6)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(200);Line(71);cout<<char(188)<<'\n';

Genetic_Data();
do
{
inputs();
Start_time=clock();
Fitness();
selection();

do
{
counter++;
crossover();
Fitness();
Mutation();
Fitness();
selection();
Fitness();
cout<<counter<<'\r';
if(count>=population_Size ) refresh();
}while(counter<maxIteration);
}while(SolveAnotherProblem());

return;
Appendix (C)

86
86

}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//======================== Functions Definitions ==============================//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void Fitness()
{
int i,j,p=0;
for(p=0;p<population_Size;p++)
{
if((alpha1==0 || alpha1 ==1) && hybrid==0)
{
fitness[p] =0;

for (i=0;i<col_row;i++)
{
for (j=0;j<col_row;j++)
{
if(i==j) continue;
fitness[p] +=alpha1* dist[i][j]*
flow[string[p][i]][string[p][j]]*
cost[string[p][i]][string[p][j]]
+alpha2 * dist[i][j]
* relationship_value[string[p][i]][string[p][j]];
}
}
//==================================
float BestFitness12=0;
BestFitness1=((fitness[p]-GM1)/SD1);
BestFitness2=((fitness[p]-GM2)/SD2);
if(alpha1)
BestFitness12=alpha1*BestFitness1 ;
else
BestFitness12=alpha2 *BestFitness2;
//==================================

if(BestFitness ==0)//initiation
{
Computation_time=(clock()-Start_time)/CLOCKS_PER_SEC;
BestFitness =BestFitness12;
for(int k=0;k<col_row;k++)
BestLayout[k]=1+string[0][k];
progressTable(0 );
}
//===================================
if(BestFitness >BestFitness12 )
{
Computation_time=(clock()-Start_time)/CLOCKS_PER_SEC;
BestFitness =BestFitness12 ;
for(int k=0;k<col_row;k++)
BestLayout[k]=1+string[p][k];
cout<<"\n\aFitness Improved="<<BestFitness<<setw(18)
<<"Time ="<<setw(3)<<Computation_time<<" sec ";
progressTable(1 );
}
}//end if
else
{ ///////////////////hybrid
fitness1[p] =0;
fitness2[p] =0;

Appendix (C)

87
87

for (i=0;i<col_row;i++)
{
for (j=0;j<col_row;j++)
{
if(i==j)continue;
fitness1[p] +=dist[i][j]*
flow[string[p][i]][string[p][j]]*
cost[string[p][i]][string[p][j]];

fitness2[p] +=dist[i][j]*
relationship_value[string[p][i]][string[p][j]];
}
}
//========================================
float BestFitness12=0;
BestFitness1=((fitness1[p]-GM1)/SD1);
BestFitness2=((fitness2[p]-GM2)/SD2);
BestFitness12=alpha1* BestFitness1+alpha2 *BestFitness2;
//===========================================

if(BestFitness ==0)//initiation
{
Computation_time=(clock()-Start_time)/CLOCKS_PER_SEC;
BestFitness =BestFitness12;
BestFitness11=BestFitness1;
BestFitness22=BestFitness2;
for(int k=0;k<col_row;k++)
BestLayout[k]=1+string[0][k];
progressTable(0 );
}
//=====================================
if(BestFitness >BestFitness12)
{
Computation_time=(clock()-Start_time)/CLOCKS_PER_SEC;
BestFitness =BestFitness12;
BestFitness11=BestFitness1;
BestFitness22=BestFitness2;
for(int k=0;k<col_row;k++)
BestLayout[k]=1+string[p][k];
cout<<"\n\aFitness Improved="<<BestFitness<<setw(18)
<<"Time ="<<setw(3)<<Computation_time<<" sec ";

progressTable(1);
}
}//else
}

return;
}
////////////////////////////////////////////////////////////////////////////////////
void InitiationPopulation()
{

if(rand_example ==0) srand(time(NULL));
int s,n,p;
int *stg[MaxNoFacility];
////////////////////////////////

for(p=0;p<population_Size;p++)
{
Appendix (C)

88
88

for(int i=0; i<col_row ;i++)
stg[i] =new int[col_row];
for(i=0; i<col_row ;i++)
{
for(int b=0;b<col_row;b++)
stg[i][b]=0;
}

for(n=0; n<col_row ;n++)
{
do
{
s=int(col_row*rnd());
int y=0 ;
for(int o=0; o<col_row ;o++)
if( stg[o][s]==1) y=10;
if(y==10)continue;

stg[n][s]=1;
break;
}while(1);
string[p][s]=n;
}
for(i=0; i<col_row ;i++) delete stg[i];

}


return;
}
////////////////////////////////////////////////////////////////////////////////////
void inputs()
{
if(mdfy==0)
{

criteria_type();
if(NonExamples=='N')
{
do
{

cout<<"\n\n Enter No of facilities between(5 and 50) "<<char(16)<<' ';
cin>>N;

}while(N<5 || N>MaxNoFacility);
}
spaceDimension();
adjustDimension=col_row;

MomAllocate();
if(NonExamples=='Y')
{
ExampleNo();
distance_matrix();
location_weight();

}
else//if(NonExamples=='N')
{
Appendix (C)

89
89
InitiationPopulation();
input_prespecifiedFacilities();
adjustPrespecifiedFacilities();
if(alpha1==0 && hybrid==0)
{
distance_matrix();
location_weight();
relationship_matrix();
UserModifying();
}
else if(alpha1==1&& hybrid==0)
{
distance_matrix();
flow_matrix();
cost_matrix();
UserModifying();
}
else //Hybird
{
distance_matrix();
location_weight();
relationship_matrix();

flow_matrix();
cost_matrix();
UserModifying();
}
}//if(NonExamples)
}//if(mdfy==0)
else
{
modify_current_proplem();
}
Chen_statistics();
if(rand_example ==1) srand(time(NULL));
return;

}
////////////////////////////////////////////////////////////////////////////////////
void Best()
{
int k=0;
cout<<'\n'<<" "<<char(201);Line(71);cout<<char(187);
cout<<'\n'<<" "<<char(186)<<setw(43)<<"Best Block Layout "
<<setw(14)<<char(169)<<setw(15)<<char(186);
cout<<'\n'<<" "<<char(204);Line(71);cout<<char(185);
cout<<'\n'<<" "<<char(186)<<setw(35)<<"No. of Facilities ="
<<setw(6)<<N<<setw(31)<<char(186);
if(alpha1==0&& hybrid==0)
cout<<'\n'<<" "<<char(186)<<setw(35)<<"Best Qualitative Fitness ="
<<setw(6)<<BestFitness<<setw(31)<<char(186);
else if(alpha1==1 && hybrid==0)
cout<<'\n'<<" "<<char(186)<<setw(35)<<"Best Quantitative Fitness ="
<<setw(6)<<BestFitness<<setw(31)<<char(186);
else
{
cout<<'\n'<<" "<<char(186)<<setw(35)<<"Best Layout Hybrid Fitness :"
<<setw(20)<<"Priority ="<<setw(3)<<alpha1<<setw(14)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(35)<<"Quantitative Fitness ="
<<setw(6)<<BestFitness11<<setw(14)<<"Weight ="<<setw(3)<<alpha1
<<setw(14)<<char(186);
Appendix (C)

90
90
cout<<'\n'<<" "<<char(186)<<setw(35)<<"Qualitative Fitness ="
<<setw(6)<<BestFitness22<<setw(14)<<"Weight ="<<setw(3)<<alpha2
<<setw(14)<<char(186);
}

cout<<'\n'<<" "<<char(186)<<setw(35)<<"Computation time ="
<<setw(4)<<Computation_time<<setw(4)<<"sec"<<setw(29)<<char(186);
cout<<'\n'<<" "<<char(204);Line(71);cout<<char(185);
cout<<'\n'<<" "<<char(186);

top('F');cout<<setw(62-6*col)<<char(186);

for(int i=0;i<row;i++)
{
cout<<'\n'<<" "<<char(186)<<setw(10)<<char(186);
for(int j=0;j<col;j++)
{
if(BestLayout[k]<=N)
cout<<setw(3)<<BestLayout[k]<<" "<<char(186);
else
cout<<setw(3)<<' '<<" "<<char(186);
k++;
}
cout<<setw(62-6*col)<<char(186);

if(i<row-1)
{
cout<<'\n'<<" "<<char(186) ;
center('F');cout<<setw(62-6*col)<<char(186);
}
}
cout<<'\n'<<" "<<char(186) ;
bottom('F');
cout<<setw(62-6*col)<<char(186);
cout<<'\n'<<" "<<char(200);Line(71);cout<<char(188);
cin.ignore();
cin.ignore();

cin.ignore();
cout<<"\n Harmonosky score systemscore ="<<Hormonosky_score_system();
Chen_score();
return;
}
////////////////////////////////////////////////////////////////////////////////////
void MomAllocate()
{
for(int i=0;i<col_row;i++)
{
dist[i]=new int [col_row];
cost[i]=new float [col_row];
flow[i]=new int [col_row];
relationship[i]=new char [col_row];
adj_matrix[i]=new float [col_row];
relationship_value[i]=new int [col_row];
}
for(i=0;i<population_Size;i++)
{
if(i<3) stringtemp[i]=new int [col_row];
string[i]=new int [col_row];
}

Appendix (C)

91
91
for(i=0;i<imp_seq;i++)
layoutSequance[i]=new int [col_row];
BestLayout =new int [col_row];


return;
}
////////////////////////////////////////////////////////////////////////////////////
void delmem()
{
for(int i=0;i<col_row;i++)
{
delete dist[i];
delete cost[i];
delete flow[i];
}
for(i=0;i<imp_seq;i++)
delete layoutSequance[i];

for(i=0;i<population_Size;i++)
{
if(i<3)delete stringtemp[i];
delete string[i];
}

delete [] BestLayout;
if(no_of_prespecified_facilities!=0)
{
delete [] F;
delete [] L;
}
return;
}
////////////////////////////////////////////////////////////////////////////////////
void Mutation()
{
int temp1=0,temp2=0;
for(int p=0;p<population_Size;p++)
{
if(col_row - (no_of_prespecified_facilities+NoOfNeglectedLocation)<2) break;
for(int j=0;j<col_row;j++)
{
if(checkLocation(j)) continue;
if(rnd()<mutationProbability)
{

do
{
temp1=rand()%col_row;
}while(checkLocation(temp1) || j==temp1 ||
(string[p][j]>=N && string[p][temp1]>=N));
//==============================================
temp2=string[p][j];
string[p][j]=string[p][temp1];
string[p][temp1]=temp2;
ImproveFitness( p); //Evaluation after every interchange
}
}
}
return;
}
Appendix (C)

92
92
////////////////////////////////////////////////////////////////////////////////////
void ImproveFitness(int r)
{

if((alpha1==0 ||alpha1==1) && hybrid ==0)
{
float fitness=0;
for (int i=0;i<col_row;i++)
{
for (int j=0;j<col_row;j++)
{
if(i==j)continue;
fitness +=alpha1* dist[i][j]*
flow[string[r][i]][string[r][j]]*
cost[string[r][i]][string[r][j]]+

alpha2* dist[i][j]

* relationship_value[string[r][i]][string[r][j]];
}

}
//========================================
float BestFitness12=0;
BestFitness1=((fitness-GM1)/SD1);
BestFitness2=((fitness-GM2)/SD2);
BestFitness12=alpha1*BestFitness1 +alpha2 *BestFitness2;
//===========================================


if(BestFitness >BestFitness12)
{
Computation_time=(clock()-Start_time)/CLOCKS_PER_SEC;
BestFitness =BestFitness12;
for(int k=0;k<col_row;k++)
BestLayout[k]=1+string[r][k];
cout<<"\n\aFitness Improved="<<BestFitness<<setw(18)
<<"Time ="<<setw(3)<<Computation_time<<" sec ";
progressTable(1);

}
}//alpha1==0 or 1
else
{ /// hybrid problem
float fitness1 =0;
float fitness2 =0;
for (int i=0;i<col_row;i++)
{
for (int j=0;j<col_row;j++)
{
if(i==j)continue;
fitness1 +=dist[i][j]*
flow[string[r][i]][string[r][j]]*
cost[string[r][i]][string[r][j]];

fitness2 +=dist[i][j]
* relationship_value[string[r][i]][string[r][j]];
}
}

//========================================
Appendix (C)

93
93
float BestFitness12=0;
BestFitness1=((fitness1-GM1)/SD1);
BestFitness2=((fitness2-GM2)/SD2);
BestFitness12=alpha1* BestFitness1+alpha2 *BestFitness2;
//===========================================
if(BestFitness >BestFitness12)
{
Computation_time=(clock()-Start_time)/CLOCKS_PER_SEC;
BestFitness =BestFitness12;
BestFitness11=BestFitness1;
BestFitness22=BestFitness2;

for(int k=0;k<col_row;k++)
BestLayout[k]=1+string[r][k];
cout<<"\n\aFitness Improved="<<BestFitness<<setw(18)
<<"Time ="<<setw(3)<<Computation_time<<" sec ";
progressTable(1);
}
}//else

return;
}
////////////////////////////////////////////////////////////////////////////////////
void cost_matrix()
{
int i,j;
for(i=0;i<col_row;i++)
{
for(j=0;j<col_row;j++)
{
if(i>=N || j >=N || i==j)
cost[i][j]=0;
else
cost[i][j]=1;
}
}
char yn;
cout<<'\n'<<" "<<char(201);Line(71);cout<<char(187);
cout<<'\n'<<" "<<char(186)<<setw(50)
<<"Default cost between any two facilities =1 ."<<setw(22)<<char(186);
cout<<'\n'<<" "<<char(200);Line(71);cout<<char(188)<<'\n';
cout<<" Do you want modifying the cost matrix (y/n) "<<char(16);
cin>>yn;
if(toupper(yn)=='Y')
{
cout<<'\n'<<" "<<char(201);Line(71);cout<<char(187);
cout<<'\n'<<" "<<char(186)
<<setw(45)<<"Enter Cost Matrix"<<setw(27)<<char(186);
cout<<'\n'<<" "<<char(200);Line(71);cout<<char(188)<<'\n';
int i=0,j=0;
for(int n=0 ;n<col_row;n++)
{
j =i;
for(int M=n ;M<col_row;M++)
{
if(n==M)
cost[n][M]=0.0F;
else
{
if(n<N && M<N)
{
Appendix (C)

94
94
cout<<" Enter cost between facility "<<n+1
<<" and facility "<<M+1<<' '<<char(16)<<' ';
cin>>cost[n][M] ;
cost[M][n]=cost[n][M] ;
j++;
}
else
cost[M][n]=cost[n][M]=0 ;

}//else
}
i++;
}
}//if
return;
}
////////////////////////////////////////////////////////////////////////////////////
void input_prespecifiedFacilities()
{
char p;
nieghbor();
if(N<col_row)
{
showLocation(NoOfNeglectedLocation);
cout<<"\nAny neglected locations y/n "<<char(16)<<' ';
cin>>p;
if(toupper(p)=='Y')
{
do
{
cout<<"\nEnter No. of neglected locations (<="<<col_row-N<<") "
<<char(16)<<' ';
cin>>NoOfNeglectedLocation;
}while(NoOfNeglectedLocation>col_row-N);

neglected_loc=new int[col_row-N];
int h=0;
do
{
h++;
do
{
cout<<" "<<h<<"- Enter the neglected location No. "<<char(16)<<' ';
cin>>neglected_loc[h-1];
if(neglected_loc[h-1]>col_row)
cout<<"\t\tERROR...enter a correct location!\n";
}while(neglected_loc[h-1]>col_row);
}while(!(h==NoOfNeglectedLocation));

F=new int [NoOfNeglectedLocation];
L=new int [NoOfNeglectedLocation];
for(int t=0;t<NoOfNeglectedLocation;t++)
{
F[t]=N+t;
L[t]=neglected_loc[t]-1;
}
}
}

showLocation(NoOfNeglectedLocation);
cout<<"\nAny prespecified facilities y/n "<<char(16)<<' ';
Appendix (C)

95
95
cin>>p;

if(toupper(p)!='Y')
{
no_of_prespecified_facilities=0;
return;
}

do
{
cout<<"\nNo. of prespecified facilities (<="<<col_row-NoOfNeglectedLocation<<") "
<<char(16)<<' ';
cin>>no_of_prespecified_facilities;
}while(no_of_prespecified_facilities<1 ||
no_of_prespecified_facilities>col_row-NoOfNeglectedLocation);

//=================
if(NoOfNeglectedLocation>0)
{
delete F;
delete L;
}
F=new int [no_of_prespecified_facilities +NoOfNeglectedLocation];
L=new int [no_of_prespecified_facilities +NoOfNeglectedLocation];
//=====================
for(int t=0;t<NoOfNeglectedLocation;t++)
{
F[t]=N+t;
L[t]=neglected_loc[t]-1;
}
//========================
int count=0;
for(t=NoOfNeglectedLocation;t<no_of_prespecified_facilities +NoOfNeglectedLocation;t++)
{
do{

int x=0;
cout<<"\n\t\t\t"<<++count<<" - Facility No. "<<char(16)<<' ';
cin>>F[t];
if(t>0)
for(int i=0;i<t;i++)
{
if(F[t]==F[i]+1)
{
cout<<"This facility is assigned..";
x=1;
}
}
if(x) continue;

if(F[t]<=col_row && F[t]>0) break;
cout<<" Error...!!!, No. of facilities are "
<<N<<" No. of dummy facilities ="<<col_row-N;
}while(1);


do
{
int x=0;
cout<<"\t\t\t At location No. "<<char(16)<<' ';
cin>>L[t];
Appendix (C)

96
96
if(t>0)
for(int i=0;i<t;i++)
{
if(L[t]==L[i]+1)
{
cout<<" This location is assigned..\n";
x=1;
}
}
if(x) continue;
if(L[t]<=col_row &&L[t]>0) break;
cout<<" Error...!!!,No. of locations are "<<col_row<<'\n';
}while(1);
--F[t];
--L[t];
}

return;
}
////////////////////////////////////////////////////////////////////////////////////
void adjustPrespecifiedFacilities()
{
if(no_of_prespecified_facilities==0&&NoOfNeglectedLocation==0)
return;

//=================
int i,j,t;
for(i=0;i<population_Size;i++)
{
for(t=0;t<no_of_prespecified_facilities +NoOfNeglectedLocation;t++)
{
for(j=0;j<col_row;j++)
{
if(string[i][j]==F[t])
{
string[i][j]=string[i][L[t]];
string[i][L[t]]=F[t];
break;
}
}
}
}

return;
}
////////////////////////////////////////////////////////////////////////////////////
bool checkFacility(int a)
{
if(no_of_prespecified_facilities==0 && NoOfNeglectedLocation==0)
return (0);

for(int t=0;t<no_of_prespecified_facilities +NoOfNeglectedLocation;t++)
if(a==F[t])
return(1);

return (0);
}
////////////////////////////////////////////////////////////////////////////////////
bool checkLocation(int a)
{
if(no_of_prespecified_facilities==0&& NoOfNeglectedLocation==0)
Appendix (C)

97
97
return 0;

for(int t=0;t<no_of_prespecified_facilities+NoOfNeglectedLocation;t++)
if(a==L[t])
return 1 ;

return 0;
}
////////////////////////////////////////////////////////////////////////////////////
void distance_matrix()
{
int i,j,x1,y1,x2,y2;
x1=x2=y1=y2=1;

for(i=0;i<col_row;i++)
{
for(j=0;j<col_row;j++)
{
if(i==j)
{
if(y2==col) {y2=0; x2++;}
dist[i][j]=0;
y2++;
continue;
}

dist[i][j]=abs(y2-y1)+abs(x2-x1);
if(y2==col)
{
y2=0;
x2++;
}
y2++;
}
x2=y2=1;
if(y1==col) {y1=0; x1++;}
y1++;
}

return;
}
////////////////////////////////////////////////////////////////////////////////////
void flow_matrix()
{
cout<<'\n'<<" "<<char(201);Line(71);cout<<char(187);
cout<<'\n'<<" "<<char(186)
<<setw(45)<<"Enter Flow Matrix"<<setw(27)<<char(186);
cout<<'\n'<<" "<<char(200);Line(71);cout<<char(188)<<'\n';
int i=0,j=0;
for(int n=0 ;n<col_row;n++)
{
j =i;
for(int M=n ;M<col_row;M++)
{
if(n==M)
flow[n][M]=0;
else
{
if(n<N && M<N)
{
cout<<" Enter flow between facility "<<n+1
Appendix (C)

98
98
<<" and facility "<<M+1<<' '<<char(16)<<' ';
cin>>flow[n][M] ;
flow[M][n]=flow[n][M] ;
j++;
}
else
flow[M][n]=flow[n][M]=0 ;

}
}
i++;
}

return;
}
////////////////////////////////////////////////////////////////////////////////////
bool SolveAnotherProblem()
{

int yn;
do{
cout<<"\n "<<char(201);Line(71);cout<<char(187);
cout<<'\n'<<" "<<char(186)<<setw(35)<<"1 - Best solution "
<<setw(31)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(48)<<"2 - Display the solution improvment sequance"
<<setw(18)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(35)<<"3 - Modify current problem "
<<setw(31)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(35)<<"4 - Solve anther problem "
<<setw(31)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(35)<<"5 - Quit. "
<<setw(31)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(200);Line(71);cout<<char(188)<<'\n';
do
{
cout<<" Enter option from 1 to 5 :";
cin>>yn;
}while(!(yn==1 ||yn==2 ||yn==3||yn==4||yn==5) );
switch(yn)
{
case(1):
{
Best();
cout<<"\nPress Enter to continue...";
cin.ignore();cin.ignore();

continue;
}
case(2):
{
display();
continue;
}
case(3):
{
mdfy=1;
break;
}
case(4):
{
NoOfNeglectedLocation=0;
Appendix (C)

99
99
mdfy=0;
hybrid=0;
NonExamples='N';
rand_example =0;
delmem();
break;
}
default:
{
delmem();
return (0);
}
}
counter=1;
BestFitness=BestFitness1=BestFitness2=0;
if(1)
{
for(int i=0;i<100;i++)
{
IterationNo[i]=0;
consumedTime[i]=0;
QuantitativeFitness[i]=0;
QualitativeFitness[i]=0;
MROS[i]=0;
CumulativeMROS[i]=0;
}
count=0;
}
return(1);
}while(1);
return 0;
}
////////////////////////////////////////////////////////////////////////////////////
void location_weight()
{
int i,j,x1,y1,x2,y2;
x1=x2=y1=y2=1;
for(i=0;i<col_row;i++)
{
for(j=0;j<col_row;j++)
{
if(i==j)
{
adj_matrix[i][j]=0;
continue;
}

adj_matrix[i][j]=1/float(dist[i][j]);
}

}
return;
}
////////////////////////////////////////////////////////////////////////////////////
void relationship_matrix()
{
cout<<'\n'<<" "<<char(201);Line(71);cout<<char(187);
cout<<'\n'<<" "<<char(186)
<<setw(45)<<"Enter Relationship Matrix"<<setw(27)<<char(186);
cout<<'\n'<<" "<<char(200);Line(71);cout<<char(188)<<'\n';

Appendix (C)

100
100
int i=0,j=0;
for(int n=0 ;n<col_row;n++)
{
j =i;
for(int M=n ;M<col_row;M++)
{
if(n==M)
relationship[n][M]='0';
else
{
if(n<N && M<N)
{
do
{
cout<<" Enter relationship between facility "<<n+1
<<" and facility "<<M+1<<" "<<char(16)<<' ';
cin>>relationship[n][M] ;
}while(check_relation(n,M));

relationship[M][n]=relationship[n][M] ;
j++;
}
else
relationship[M][n]=relationship[n][M]='0' ;

}
}
i++;
}

return;

}
////////////////////////////////////////////////////////////////////////////////////
bool check_relation(int a,int b)
{
char rel[]={'A','E','I','O','U','X'};

for(int i=0;i<6;i++)
{
if(toupper(relationship[a][b])==rel[i])
return 0;
}
cout<<"\n ERROR ...relation\n Enter A-E-I-O-U OR X\n\n";

return 1;
}
////////////////////////////////////////////////////////////////////////////////////
void relation_values()
{


char yn;
int i=0,j=0;
char rel[]={'A','E','I','O','U','X'};
do
{
cout<<setw(4)<<char(201);Line(23);cout<<char(187);
cout<<'\n'<<setw(4)<<char(186)<<" Relationship values "<<char(186);
cout<<'\n'<<setw(4)<<char(204);Line(11);
cout<<char(203);Line(11);cout<<char(185);
Appendix (C)

101
101

for(i=0;i<6;i++)
cout<<'\n'<<setw(4)<<char(186)
<<setw(6)<<rel[i]<<" "<<char(186)
<<setw(8)<<value[i]<<" "<<char(186);
cout<<'\n'<<setw(4)<<char(200);Line(11);
cout<<char(202);Line(11);cout<<char(188);

cout<<"\n Do you want modifying the relationship values y/n "<<char(16)<<' ';
cin>>yn;
if(toupper(yn)=='Y')
{
for(i=0;i<6;i++)
{
cout<<"\n\tEnter value of "<<rel[i]<<" "<<char(16)<<' ';
cin>>value[i];
}
}

else break;
}while(1);
//======================
convert_rel_to_value();

return;
}

////////////////////////////////////////////////////////////////////////////////////
void selection()
{
selection_memory();
int X=rand()%population_Size;
for (int j=0;j<col_row;j++)
string[X][j]=BestLayout[j]-1;//copy best choromosome for good election

for (int i=0;i<population_Size;i++)
{
X=tournament();
for (int j=0;j<col_row;j++)
temporary[i][j]=string[X][j];
}
//====================copy matrix
for ( i=0;i<population_Size;i++)
{
for (int j=0;j<col_row;j++)
string[i][j]=temporary[i][j];
}
free_memory();
return;
}
////////////////////////////////////////////////////////////////////////////////////
void selection_memory()
{

tour=new float[tournamentSize];

for(int i=0;i<population_Size;i++)
temporary[i]=new int[col_row];

return;
}
Appendix (C)

102
102
////////////////////////////////////////////////////////////////////////////////////
void free_memory()
{
delete []tour;

for(int i=0;i<population_Size;i++)
delete temporary[i];
return;
}
////////////////////////////////////////////////////////////////////////////////////
int tournament()
{
int x;

for(int i=0;i<tournamentSize;i++)
{
int e=i;
int E=0;
int T=rand()%population_Size;
if((alpha1==0 || alpha1==1) && hybrid==0)
{

tour[i]=fitness[T];
if(i>0 )
for(;e;--e)
if(tour[i]<tour[e-1])
E++;

if(E==i) x=T;
}
else
{
if(priority)
tour[i]=fitness1[T];
else
tour[i]=fitness2[T];
if(i>0 )
for(;e;--e)
if(tour[i]<tour[e-1])
E++;


if(i==E) x=T;
}
}
return(x);
}
////////////////////////////////////////////////////////////////////////////////////
void criteria_type()
{
int option;
do
{
int i,T=30;
cout<<setw(25)<<char(201);for(i=0;i<T;i++)cout<<char(205);cout<<char(187);
cout<<'\n'<<setw(25)<<char(186)<<" 1 - Quantitative problem . "<<char(186);
cout<<'\n'<<setw(25)<<char(186)<<" 2 - Qualitative problem . "<<char(186);
cout<<'\n'<<setw(25)<<char(186)<<" 3 - Hybrid problem . "<<char(186);
cout<<'\n'<<setw(25)<<char(204);for(i=0;i<T;i++)cout<<char(205);cout<<char(185);
cout<<'\n'<<setw(25)<<char(186)<<" 4 - Examples . "<<char(186);
cout<<'\n'<<setw(25)<<char(200);for(i=0;i<T;i++)cout<<char(205);cout<<char(188);
Appendix (C)

103
103
cout<<"\n Enter criteria type (1,2 or 3) "<<char(16);
cin>>option;

switch(option)
{
case(1):
{
alpha1=1;
alpha2=0;
break;
}
case(2):
{
alpha1=0;
alpha2=1;

break;
}
case(3):
{

hybrid=1;
break;
}
case(4):
{
NonExamples='Y';
examples();
break;
}
default:
{
cout<<"\n Error...\n Enter 1,2 or 3 Not "<<option<<'\n';

break;
}
}//switch
}while(option <1 ||option >4 );

return;
}
////////////////////////////////////////////////////////////////////////////////////
void examples()
{
//int Example_No=0;
int i,T=30;
cout<<setw(25)<<char(201);Line(30);cout<<char(187);
cout<<'\n'<<setw(25)<<char(186)<<" Ex. No."<<setw(10)<<" No. of facilities "<<char(186);
cout<<'\n'<<setw(25)<<char(204);Line(30);cout<<char(185);
for( i=0;i<8;i++)
cout<<'\n'<<setw(25)<<char(186)<<setw(5)<<1+i<<setw(18)<<5+i<<setw(8)<<char(186);
cout<<'\n'<<setw(25)<<char(186)<<setw(5)<<++i<<setw(18)<<15<<setw(8)<<char(186);
cout<<'\n'<<setw(25)<<char(186)<<setw(5)<<++i<<setw(18)<<20<<setw(8)<<char(186);
cout<<'\n'<<setw(25)<<char(186)<<setw(5)<<++i<<setw(18)<<30<<setw(8)<<char(186);
cout<<'\n'<<setw(25)<<char(186)<<setw(5)<<++i<<setw(18)<<"12sha"<<setw(8)<<char(186);
cout<<'\n'<<setw(25)<<char(186)<<setw(5)<<++i<<setw(18)<<"12fort"<<setw(8)<<char(186);
cout<<'\n'<<setw(25)<<char(186)<<setw(5)<<++i<<setw(18)<<"8fort"<<setw(8)<<char(186);
cout<<'\n'<<setw(25)<<char(186)<<setw(5)<<++i<<setw(18)<<"6fort"<<setw(8)<<char(186);
cout<<'\n'<<setw(25)<<char(186)<<setw(5)<<++i<<setw(18)<<"8Chen_Khare"<<setw(8)<<char(186);
cout<<'\n'<<setw(25)<<char(186)<<setw(5)<<++i<<setw(18)<<"12Chen_Khare"<<setw(8)<<char(186);
cout<<'\n'<<setw(25)<<char(186)<<setw(5)<<++i<<setw(18)<<"15Chen_Khare"<<setw(8)<<char(186);
Appendix (C)

104
104
cout<<'\n'<<setw(25)<<char(186)<<setw(5)<<++i<<setw(18)<<"20Chen_Khare"<<setw(8)<<char(186);
cout<<'\n'<<setw(25)<<char(204);Line(30);cout<<char(185);
cout<<'\n'<<setw(25)<<char(186)<<setw(4)<<++i<<setw(26)
<<" - Generate Random Example"<<setw(1)<<char(186);
cout<<'\n'<<setw(25)<<char(200);Line(30);cout<<char(188)<<'\n';

rand_example =1;
do
{
cout<<"\n Enter No of facilities between(5 and 50) "<<char(16)<<' ';
cin>>N;
}while(N<5 || N>MaxNoFacility);
return;
}
////////////////////////////////////////////////////////////////////////////////////
void generate_random_example()
{
int i,j,t=0;
if(N<5)
{
char rel[]={'A','A','E','E','E','I','I',
'I','O','O','O','U','U','U','U','U','X'};
for( i=0;i<N;i++)
{
for( j=i;j<N;j++)
{
if(i==j)
relationship[i][j]='0';
else
relationship[i][j]=relationship[j][i]=rel[rand()%17];
}
}
for( i=0;i<N;i++)
{
for( j=i;j<N;j++)
{
if(i==j)
relationship[i][j]='0';
else
{
int x =rand()%100;
if(x<5)
{
if(rnd()<.5)
relationship[i][j]=relationship[j][i]='A';
else
relationship[i][j]=relationship[j][i]='X';
}
else if(x<15)
relationship[i][j]=relationship[j][i]='E';
else if(x<30)
relationship[i][j]=relationship[j][i]='I';
else if(x<50)
relationship[i][j]=relationship[j][i]='O';
else
relationship[i][j]=relationship[j][i]='U';
}
}
}
}

Appendix (C)

105
105
//===========================
for( i=0;i<N;i++)
{

for( j=i;j<N;j++)
{
if(i==j){flow[j][i]=0;relationship[i][j]=relationship[j][i]='-';continue;}
if(rnd()<.5)
{
flow[i][j]=flow[j][i]=rand()%col_row;
if(flow[i][j]>=.90*col_row)
relationship[i][j]=relationship[j][i]='A';
else if(flow[i][j]>=.7*col_row)
relationship[i][j]=relationship[j][i]='E';
else if(flow[i][j]>=.4*col_row)
relationship[i][j]=relationship[j][i]='I';
else
relationship[i][j]=relationship[j][i]='O';
}
else
{
flow[i][j]=flow[j][i]=0;t++;
if(rnd()>=.03)
relationship[i][j]=relationship[j][i]='U';
else
relationship[i][j]=relationship[j][i]='X';
}
}
}
//====================
for( i=0;i<col_row;i++)
{
for( j=N;j<col_row;j++)
{
flow[i][j]=flow[j][i]=0;
relationship[i][j]=relationship[j][i]='0';
}
}
return;
}
////////////////////////////////////////////////////////////////////////////////////
void UserModifying()
{
if(NonExamples=='Y'||hybrid==1)
adjustWeight();
if(alpha1 !=1 || hybrid==1)
{
modify_rel_matrix();
}
//////////////////////User Modification//////////////////
if(alpha1 !=0 || hybrid ==1)
{
modify_flow_matrix();
modify_cost_matrix();
}//if(alpha1!=0)
return;
}
////////////////////////////////////////////////////////////////////////////////////
void ExampleNo()
{
generate_random_example();
Appendix (C)

106
106

InitiationPopulation();
input_prespecifiedFacilities();
adjustPrespecifiedFacilities();
UserModifying();

return;
}
////////////////////////////////////////////////////////////////////////////////////
void top(char x)
{
int t,T=5;
cout<<setw(18);
if(x=='L')
cout<<"Locations Names ";
else
cout<<"Facility Layout ";
cout<<setw(3)<<char(16)<<setw(51)<<char(186)<<endl<<setw(3)
<<char(186)<<setw(10)<<char(201);
Line(T);
for(t=0;t<col-1;t++)
{
cout<<char(203);Line(T);
}
cout<<char(187);
return;
}
////////////////////////////////////////////////////////////////////////////////////
void center(char x)
{
int t,T=5;
cout<<setw(10)<<char(204);
Line(T);

for(t=0;t<col-1;t++)
{
cout<<char(206);Line(T);
}
cout<<char(185);
return;
}
////////////////////////////////////////////////////////////////////////////////////
void bottom(char x)
{
int t,T=5;
cout<<setw(10)<<char(200);
Line(T);
for(t=0;t<col-1;t++)
{
cout<<char(202);Line(T);
}
cout<<char(188);
return;
}
////////////////////////////////////////////////////////////////////////////////////
void upLine(int t)
{
cout<<'\n'<<setw(4)<<char(201); Line(N*t+1);
cout<<char(187)<<'\n'<<setw(4)<<char(186);
return;
}
Appendix (C)

107
107
////////////////////////////////////////////////////////////////////////////////////
void centerLine(int t)
{
int i;
for(i=0;i<=N*t-21;i++)cout<<' ';cout<<char(186);
cout<<'\n'<<setw(4)<<char(186);
for( i=0;i<N;i++){cout<<setw(t)<<i+1;}cout<<' '<<char(186);

cout<<'\n'<<setw(4)<<char(204);
for(i=0;i<=N*t;i++)cout<<char(205);cout<<char(185);
return;
}
////////////////////////////////////////////////////////////////////////////////////
void downLine(int t)
{
int i=0;
cout<<'\n'<<setw(4)<<char(200);
for(i=0;i<=N*t;i++)cout<<char(205);cout<<char(188);
return;
}
////////////////////////////////////////////////////////////////////////////////////
void Line(int r)
{
int i;
for(i=0;i<r;i++)cout<<char(205);
return;
}
////////////////////////////////////////////////////////////////////////////////////
void adjustWeight()
{
// hybrid=1;
cout<<'\n'<<" "<<char(201);Line(71);cout<<char(187);
cout<<'\n'<<" "<<char(186)<<setw(40)<<"Hybrid Criteria is"
<<setw(32)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(50)<<"1 - Minimizing The Quantitative Objective,and."
<<setw(22)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(46)<<"2 - Maximizing The Qualitative Objective ."
<<setw(26)<<char(186);
cout<<'\n'<<" "<<char(200);Line(71);cout<<char(188);

cout<<'\n'<<" "<<char(201);Line(71);cout<<char(187);
cout<<'\n'<<" "<<char(186)<<setw(60)<<"Enter Weight Of The Two Objectives Between 0 and 1
"<<setw(6)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(204);Line(71);cout<<char(185);
cout<<'\n'<<" "<<char(186)<<setw(50)<<"1 means pure Quantitative objective is taken . "<<setw(22)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(50)<<"0 means Quantitative objective is neglected . "<<setw(22)<<char(186);
cout<<'\n'<<" "<<char(200);Line(71);cout<<char(188)<<'\n';
do
{
cout<<"\n Enter weight of The Quantitative Objective "<<char(16)<<' ';
cin>>alpha1;
if(alpha1>=0 && alpha1<=1) break;
cout<<" Error ...!!!,Weight between 0 and 1 .";
}while(1);
alpha2=1-alpha1;
cout<<"\t Weight of The Qualitative Objective "<<char(16)<<' '<<alpha2<<'\n';
//////////////////////////////priority
if(alpha1>0.5 && alpha1<=1)
priority=1;
else
priority=0;
Appendix (C)

108
108

return;
}
////////////////////////////////////////////////////////////////////////////////////
void progressTable(float m=0)
{

IterationNo[count]=counter;
for(int i=0;i<col_row;i++)
layoutSequance[count][i]=BestLayout[i];
consumedTime[count]=Computation_time;
if(alpha1==1 && hybrid==0)
QuantitativeFitness[count]=BestFitness;
else if(alpha1==0&& hybrid==0)
QualitativeFitness[count]=BestFitness;
else
{
QuantitativeFitness[count]=BestFitness1;
QualitativeFitness[count]=BestFitness2;
MROS[count]=m;

if(count==0)
CumulativeMROS[count]=m;
else
CumulativeMROS[count]=CumulativeMROS[count-1]+m;
}
count++;
return;
}
////////////////////////////////////////////////////////////////////////////////////
void solutionSequance(int x)
{
int k=0;
cout<<'\n'<<" "<<char(201);Line(71);cout<<char(187);
cout<<'\n'<<" "<<char(186)<<setw(16)<<"Improvment No. "
<<char(16)<<setw(3)<<x+1<<setw(26)<<"Iteration No.="<<setw(5)
<<IterationNo[x]<<setw(21)<<char(186);
cout<<'\n'<<" "<<char(204);Line(71);cout<<char(185);

cout<<'\n'<<" "<<char(186)<<setw(35)<<"No. of Facilities ="
<<setw(6)<<N<<setw(31)<<char(186);
if(alpha1==0 && hybrid ==0)
cout<<'\n'<<" "<<char(186)<<setw(35)<<"Qualitative Fitness ="
<<setw(6)<<QualitativeFitness[x]<<setw(31)<<char(186);
else if(alpha1==1 && hybrid ==0)
cout<<'\n'<<" "<<char(186)<<setw(35)<<"Quantitative Fitness ="
<<setw(6)<<QuantitativeFitness[x]<<setw(31)<<char(186);
else
{
cout<<'\n'<<" "<<char(186)<<setw(25)<<"Hybrid Fitness ::"<<setw(47)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(25)<<"Quantitative Fitness
="<<setw(6)<<QuantitativeFitness[x]<<setw(11)<<"Weight ="<<setw(3)<<alpha1<<setw(14)<<"MROS =
"<<setw(10)<<MROS[x]<<setw(3)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(25)<<"Qualitative Fitness
="<<setw(6)<<QualitativeFitness[x]<<setw(11)<<"Weight ="<<setw(3)<<alpha2<<setw(14)<<"CumMROS =
"<<setw(10)<<CumulativeMROS[x]<<setw(3)<<char(186);
}

cout<<'\n'<<" "<<char(186)<<setw(35)<<"Computation time =
"<<setw(4)<<consumedTime[x]<<setw(4)<<"sec"<<setw(29)<<char(186);
cout<<'\n'<<" "<<char(204);Line(71);cout<<char(185);
Appendix (C)

109
109
cout<<'\n'<<" "<<char(186);

top('F');cout<<setw(62-6*col)<<char(186);

for(int i=0;i<row;i++)
{
cout<<'\n'<<" "<<char(186)<<setw(10)<<char(186);
for(int j=0;j<col;j++)
{
if(layoutSequance[x][k]<=N)
cout<<setw(3)<<layoutSequance[x][k]<<" "<<char(186);
else
cout<<setw(3)<<' '<<" "<<char(186);
k++;
}
cout<<setw(62-6*col)<<char(186);
if(i<row-1){cout<<'\n'<<" "<<char(186) ;center('F');cout<<setw(62-6*col)<<char(186);}

}
cout<<'\n'<<" "<<char(186) ;
bottom('F');
cout<<setw(62-6*col)<<char(186);

cout<<'\n'<<" "<<char(200);Line(71);cout<<char(188);

return;
}
////////////////////////////////////////////////////////////////////////////////////
void display()
{
cin.ignore();
for(int i=0;i<count;i++)
{
solutionSequance(i);
cout<<"\nPress Enter to continue...";
cin.ignore();
}
Best(); cout<<"\nPress Enter to continue...";
cin.ignore();
return;
}
////////////////////////////////////////////////////////////////////////////////////
void adjustMemory()
{
// int* dist[30];
char *relationshipT[MaxNoFacility];
float* costT[MaxNoFacility];
int* flowT[MaxNoFacility];

for(int i=0;i<adjustDimension;i++)
{
costT[i]=new float [adjustDimension];
flowT[i]=new int [adjustDimension];
relationshipT[i]=new char [adjustDimension];
}

//===========COPY

for(i=0;i<adjustDimension;i++)
{
for(int j=0;j<adjustDimension;j++)
Appendix (C)

110
110
{
costT[i][j]=cost[i][j];
flowT[i][j]=flow[i][j];
relationshipT[i][j]=relationship[i][j];
}
}

delmem();
MomAllocate();

for(i=0;i<col_row;i++)
{
for(int j=0;j<col_row;j++)
{
if(i>=adjustDimension ||j>=adjustDimension)
{
cost[i][j]=0;
flow[i][j]=0;
relationship[i][j]='0';
continue;
}
cost[i][j]=costT[i][j];
flow[i][j]=flowT[i][j];
relationship[i][j]=relationshipT[i][j];
}
}
convert_rel_to_value();
//=======================
for( i=0;i<adjustDimension;i++)
{
delete relationshipT[i];
delete costT[i];
delete flowT[i];
}

return;
}
////////////////////////////////////////////////////////////////////////////////////////
void Genetic_Data()
{
do
{
cout<<"\n "<<char(201);Line(71);cout<<char(187);
cout<<'\n'<<" "<<char(186)<<setw(60)<<"Genetic Algorithm Informations "
<<setw(6)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(204);Line(71);cout<<char(185);
cout<<'\n'<<" "<<char(186)<<setw(33)<<"1 - Max. Iteration Number ="
<<setw(7)<<maxIteration<<setw(32)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(33)<<"2 - Population Size ="
<<setw(7)<<population_Size<<setw(32)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(33)<<"3 - Tournment Size ="
<<setw(7)<<tournamentSize<<setw(32)<<char(186);
cout<<'\n'<<" "<<char(204);Line(71);cout<<char(185);
cout<<'\n'<<" "<<char(186)<<setw(33)<<"4 - Crossover Probability ="
<<setw(7)<<crossoverProbability<<setw(32)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(33)<<"5 - Mutation Probability ="
<<setw(7)<<mutationProbability<<setw(32)<<char(186);
cout<<'\n'<<" "<<char(204);Line(71);cout<<char(185);
cout<<'\n'<<" "<<char(186)<<setw(33)<<"6 - Ok... "
<<setw(39)<<char(186);
cout<<'\n'<<" "<<char(200);Line(71);cout<<char(188)<<'\n';
Appendix (C)

111
111

int yn;
do
{
cout<<'\n'<<"Enter option No : ";
cin>>yn;
if(yn>0 && yn <7)break;
cout<<"...Error selection !!!";
}while(1);
//===============
switch(yn)
{
case(1):
{
do
{
cout<<setw(40)<<"Enter Max. Iteration Number <=1000000 : ";
cin>>maxIteration;
if(maxIteration>0 && maxIteration<=1000000)break;
cout<<"...Error...\n";
}while(1);
continue;
}
case(2):
{
for(int i=0;i<population_Size;i++)
delete string[i];
//=====================
do
{
cout<<setw(34)<<"Enter Population Size (<="<<setw(3)<<populationSize<<"):
";
cin>>population_Size;
if(population_Size<=populationSize &&population_Size>1)
{
for(i=0;i<population_Size;i++)
string[i]=new int [col_row];
InitiationPopulation();
adjustPrespecifiedFacilities();
break;
}
cout<<"...Error...Min. Population Size =2\n";
}while(1);
continue;
}
case(3):
{
do
{
cout<<setw(40)<<"Enter Tournment Size between(2 and 10) : ";
cin>>tournamentSize;
if(tournamentSize<=10 &&tournamentSize>1)break;
cout<<"...Error...\n";
}while(1);
continue;
}
case(4):
{
do
{
cout<<setw(40)<<"Enter Crossover Probability between(0 and 1) : ";
Appendix (C)

112
112
cin>>crossoverProbability;
if(crossoverProbability<=1 &&crossoverProbability>=0)break;
cout<<"...Error...\n";
}while(1);
continue;
}
/////////////////////////
case(5):
{
do
{
cout<<setw(40)<<"Enter Mutation Probability between(0 and 1) : ";
cin>>mutationProbability;
if(mutationProbability<=1 &&mutationProbability>=0)break;
cout<<"...Error...\n";
}while(1);
continue;
}
default :
{
return;
}
}
}while(1);
}
////////////////////////////////////////////////////////////////////////////////////
void RecommendedSpaceDimention(int x)
{
switch(x)
{
case(5): case(6):
{row=2; col=3;break;}
case (7):case(8):case(9):
{row=3;col=3;break;}
case (10):case(11):case(12):
{row=3;col=4;break;}
case (13):case(14):case(15):case(16):
{row=4;col=4;break;}
case (17):case (18):case (19):case (20):
{row=4;col=5;break;}
case (21):case (22):case (23):case (24):case (25):
{row=5;col=5;break;}
case (26):case (27):case (28):case (29):case (30):
{row=5;col=6;break;}
case (31):case (32):case (33):case (34):case (35):case (36):
{row=6;col=6;break;}
case (37):case (38):case (39):case (40):case (41):case (42):
{row=6; col=7;break;}
case (43):case (44):case (45):case (46):case (47):case (48):case (49):
{row=7;col=7;break;}
case (50):
{row=5;col=10;break;}
default:
{ cout<<"\nEnter correct option !<<'\n'";
col=0;break;}
}
cout<<setw(3)<<row<<" *"<<setw(3)<<col;
col_row=row*col;

return;
}
Appendix (C)

113
113
////////////////////////////////////////////////////////////////////////////////////
void crossover()
{
for(int p=0;p<population_Size;p +=2)
{
if(rnd()>crossoverProbability)continue;
int CrossSite1=0; int CrossSite2=0;
do
{
CrossSite1 =int(((col_row - 1)* rnd())+1);
CrossSite2 =int(((col_row - 1)* rnd())+1);
if(CrossSite1==CrossSite2)
continue;
else if(CrossSite1>CrossSite2)
{
int F= CrossSite2;
CrossSite2 =CrossSite1;
CrossSite1 =F ;
break;
}
else
break;
}while(1);
//========================================two point crossover
for(int b=0; b<CrossSite1;b++)
{
stringtemp[0][b] =BestLayout[b]-1;;
stringtemp[1][b] =string[p+1][b];
}
for(b=CrossSite1; b<CrossSite2;b++)
{ stringtemp[0][b] =string[p+1][b];
stringtemp[1][b] =BestLayout[b]-1;
}
for(b=CrossSite2; b<col_row;b++)
{
stringtemp[0][b] =BestLayout[b]-1;
stringtemp[1][b] =string[p+1][b];
}


RepaireChromosome(CrossSite1,CrossSite2);//RepaireChromosome illegal choromosomes

for(b=0;b<col_row;b++)
{
string[p][b] =stringtemp[0][b] ;
string[p+1][b]=stringtemp[1][b] ;
}

}
return;
}
////////////////////////////////////////////////////////////////////////////////////
void RepaireChromosome( int CP1,int CP2)
{

int S1,S2 ;
int INV1,INV2;
for( int b=0; b<col_row;b++)
{
S1=0;
INV1= stringtemp[0][b] ;
Appendix (C)

114
114
for(int c=0; c<col_row;c++)
{
if(c==b) continue;
if(INV1==stringtemp[0][c] )
{
S1++;
for( int w=0; w<col_row;w++)
{
S2=0;
INV2= stringtemp[1][w] ;
for(int n=0; n<col_row;n++)
{
if(n==w) continue;
if( INV2== stringtemp[1][n])
{
S2++;
if(b<CP1 ||b>CP2)
stringtemp[0][b] =INV2 ;
else
stringtemp[0][c] =INV2 ;

if(w<CP1 ||w>CP2)
stringtemp[1][w]= INV1 ;
else
stringtemp[1][n]= INV1 ;
break;
}
}
if( S2==1) break;
}
}
if(S1==1) break;
}
}
return;
}
///////////////////////////////////////////////////////////////////////////////////
float rnd()
{ //generate random no. bet. 0 and 0.0001
return(float(rand()%10000)/10000);
}
////////////////////////////////////////////////////////////////////////////////
void spaceDimension()
{
cout<<setw(25)<<char(201);Line(30);cout<<char(187);
cout<<'\n'<<setw(25)<<char(186)<<" 2D. Space Dimentions "<<char(186);
cout<<'\n'<<setw(25)<<char(204);Line(30);cout<<char(185);
cout<<'\n'<<setw(25)<<char(186)<<" Recmmended ";RecommendedSpaceDimention(N);
cout<<setw(9)<<char(186);
cout<<'\n'<<setw(25)<<char(200);Line(30);cout<<char(188);
char p;
cout<<"\nDo you want changing space dimentions y/n "<<char(16)<<' ';
cin>>p;

if(toupper(p)=='Y')
{ do
{ do
{
cout<<"\nEnter No. of cells in the first direction "<<char(16)<<' ';
cin>>row;
if(row>0 && row<=10) break;
Appendix (C)

115
115
cout<<"...Erorr <=10 ";
}while(1);
do
{
cout<<"Enter No. of cells in the second direction "<<char(16)<<' ';
cin>>col;
if(col>0 && col<=10) break;
cout<<"...Erorr <=10 \n";
}while(1);
col_row=row*col;
if(N>col_row)
{
cout<<" No. of locations must be >= No. of facilities !!!";
continue;
}

if(MaxNoFacility>=col_row)break;
cout<<".....Erorr...!!! No of cells <=50";
}while(1);
if(row>col)
{
int q=col;
col=row;
row=q;
}
}
}
////////////////////////////////////////////////////////////////////////////////////
void modify_current_proplem()
{
int yn;
do
{
cout<<"\n "<<char(201);Line(71);cout<<char(187);
cout<<'\n'<<" "<<char(186)<<setw(55)
<<"Modification Menu "<<setw(11)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(204);Line(71);cout<<char(185);
cout<<'\n'<<" "<<char(186)<<setw(55)
<<"1 - Modify Genetic Algorithm informations. "
<<setw(11)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(204);Line(71);cout<<char(185);
cout<<'\n'<<" "<<char(186)<<setw(55)
<<"2 - Modify Space Dimension. "
<<setw(11)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(55)
<<"3 - Modify Weight and Periority. "
<<setw(11)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(55)
<<"4 - Modify Relationship Matrix. "
<<setw(11)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(55)
<<"5 - Modify Flow Matrix. "
<<setw(11)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(55)
<<"6 - Modify Cost Matrix. "
<<setw(11)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(204);Line(71);cout<<char(185);
cout<<'\n'<<" "<<char(186)<<setw(55)
<<"7 - Problem Statistics. (Qualitative only) "
<<setw(11)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(204);Line(71);cout<<char(185);
Appendix (C)

116
116
cout<<'\n'<<" "<<char(186)<<setw(55)
<<"8 - Start Solution. "
<<setw(11)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(55)
<<"9- Quit. "
<<setw(11)<<char(169)<<setw(6)<<char(186);
cout<<'\n'<<" "<<char(200);Line(71);cout<<char(188)<<'\n';
do
{
cout<<" Enter option between 1 and 9 :";
cin>>yn;
}while(!(yn>0 &&yn<10 ));
switch(yn)
{
case(1):
{ Genetic_Data(); continue;}
case(2):
{
spaceDimension();
input_prespecifiedFacilities();
if(adjustDimension<col_row)
{
adjustMemory();
adjustDimension=col_row;
}
InitiationPopulation();
adjustPrespecifiedFacilities();
location_weight();
distance_matrix();
continue;
}
case(3):
{
if(NonExamples=='Y'||hybrid==1)
adjustWeight();
else
{
cout<<"\n You solve single objective problem...!!!Press Enter to return";
cin.ignore();cin.ignore();
}
continue;
}
case(4):
{
if(alpha1 !=1 || hybrid==1)
modify_rel_matrix();
else
{
cout<<"\n You solve Qantitative objective problem...!!!Press Enter to return";
cin.ignore();cin.ignore();
}
continue;
}
case(5):
{
if(alpha1 !=0 || hybrid ==1)
modify_flow_matrix();
else
{
cout<<"\nYou solve Qualitative objective problem...!!!Press Enter to return";
cin.ignore();cin.ignore();
Appendix (C)

117
117
}
continue;
}
case(6):
{
if(alpha1 !=0 || hybrid ==1)
modify_cost_matrix();
else {
cout<<"\nYou solve Qualitative objective problem...!!!Press Enter to return";
cin.ignore();cin.ignore();
}
continue;
}
case(7):
{
if(alpha1 !=1 || hybrid==1)

facility_relationship_statistic(0);
else
{
cout<<"\n For Qualitative objective only...!!!\n Press Enter to return";
cin.ignore();cin.ignore();
}
continue;
}
case(8): {break; }
default: {exit(1); }
}//end switch
break;
}while(1);
return;
}
////////////////////////////////////////////////////////////////////////////////////
void convert_rel_to_value()
{
for(int i=0 ;i<col_row;i++)
{
for(int j=i ;j<col_row;j++)
{
switch(toupper(relationship[i][j]))
{
case('A'): {relationship_value[i][j]=relationship_value[j][i]=value[0];
break; }
case('E'): {relationship_value[i][j]=relationship_value[j][i]=value[1];
break; }
case('I'): {relationship_value[i][j]=relationship_value[j][i]=value[2];
break; }
case('O'): {relationship_value[i][j]=relationship_value[j][i]=value[3];
break; }
case('U'): {relationship_value[i][j]=relationship_value[j][i]=value[4];
break; }
case('X'): {relationship_value[i][j]=relationship_value[j][i]=value[5];
break; }
default: {relationship_value[i][j]=relationship_value[j][i]=0;
break; }
}
}//j
}//i
return;
}
////////////////////////////////////////////////////////////////////////////////////
Appendix (C)

118
118
void modify_rel_matrix()
{
int i,j,t;
char yn ;
if(N<15) t=5; else if(N>=15 && N<19) t=4;else if(N>=19 && N<25) t=3;else t=2;
do
{ if(N<36)
{
upLine(t);cout<<" Relationship Matrix";
centerLine(t);
for( i=0;i<N;i++)
{
cout<<'\n'<<setw(3)<<i+1<<char(186);
for( j=0;j<N;j++)
cout<<setw(t)<<(char)toupper(relationship[i][j]);
cout<<' '<<char(186);
if(i%15==0)
{
if(i==0){cin.ignore();continue;}
cout<<"\nPress Enter to continue...";cin.ignore();
upLine(t);
cout<<" Relationship Matrix";
centerLine(t);
}
}
downLine(t);
}
else
{ read_rel_matrix();}
cout<<"\n Do you want modifying the relationship matrix y/n : "<<char(16);
cin>>yn;
if(toupper(yn)=='Y' )
{
int NoOfModification=0;
do
{cout<<"\nEnter No. of modifications (<="<<N*(N-1)<<" ) "<<char(16)<<' ';
cin>>NoOfModification;
}while(NoOfModification<0 ||NoOfModification>N*(N-1));
int x=1; int f1=0,f2=0;
do
{ do
{
cout<<"\nModification No. "<<char(16)<<' '<<x
<<"\n\t\t\tRelationship between facility No. "<<char(16)<<' ';
cin>>f1;
cout<<"\t\t\t\t And,facility No. "<<char(16)<<' ';
cin>>f2;
if(!(f1>N||f2>N ||f1==f2)) break;
cout<<" Error...Enter again !! ";
}while(1);
char f;
do
{cout<<"\nRelationship between facility No.("<<f1<<" and "<<f2<<" ) ="
<<(char)toupper(relationship[f1-1][f2-1])
<<" Enter New relationship =";
cin>>f; f=toupper(f);
if(f=='A'||f=='E'||f=='I'||f=='U'||f=='O'||f=='X')break;
cout<<" Error... Enter (A,E,I,U,O or X) ";
}while(1);
;
relationship[f2-1][f1-1]=relationship[f1-1][f2-1]=f;
Appendix (C)

119
119
x++;
}while(x<=NoOfModification);
}
else break;
}while(1);
relation_values();
return;
}
////////////////////////////////////////////////////////////////////////////////////
void facility_relationship_statistic(int comp=0)
{
int i,j;
for(i=0;i<N;i++)
{for(j=0;j<6;j++)
{Fac_rel[i][j]=0;total[j]=0;}
for(i=0;i<N;i++)
{for(j=0;j<N;j++)
{ switch(toupper(relationship[i][j]))
{
case('A'):{ ++Fac_rel[i][0];++total[0]; break; }
case('E'):{ ++Fac_rel[i][1];++total[1]; break; }
case('I'):{ ++Fac_rel[i][2];++total[2]; break; }
case('O'):{ ++Fac_rel[i][3];++total[3]; break; }
case('U'):{ ++Fac_rel[i][4];++total[4]; break; }
case('X'):{ ++Fac_rel[i][5];++total[5]; break; }
default:break;
}
}
}
if(comp)return;
///=============================================
cout<<setw(10)<<char(201);Line(39);cout<<char(187);
cout<<'\n'<<setw(10)<<char(186)<<setw(35)
<<" Problem Relationship statistics "<<setw(5)<<char(186);
cout<<'\n'<<setw(10)<<char(186)<<"Facility No "
<<setw(3)<<'A'<<setw(4)<<'E'<<setw(4)<<'I'
<<setw(4)<<'O'<<setw(4)<<'U'<<setw(4)<<'X'<<setw(4)<<char(186);
cout<<'\n'<<setw(10)<<char(204);Line(39);cout<<char(185);
for(i=0;i<N;i++)
{
cout<<'\n'<<setw(10)<<char(186)<<setw(6)<<i+1<<setw(6)<<' ';
for(j=0;j<6;j++)
cout<<setw(4)<<Fac_rel[i][j];
cout<<setw(4)<<char(186);
if(!(i%15))
{
if(i==0){cin.ignore();continue;}
cout<<'\n'<<setw(10)<<char(200);Line(39);cout<<char(188);
cout<<"\n press Enter to continue...";
cin.ignore();
cout<<setw(10)<<char(201);Line(39);cout<<char(187);
cout<<'\n'<<setw(10)<<char(186)<<setw(35)
<<" Problem Relationship statistics "<<setw(5)<<char(186);
cout<<'\n'<<setw(10)<<char(186)<<"Facility No "
<<setw(3)<<'A'<<setw(4)<<'E'<<setw(4)<<'I'
<<setw(4)<<'O'<<setw(4)<<'U'<<setw(4)<<'X'<<setw(4)<<char(186);
cout<<'\n'<<setw(10)<<char(204);Line(39);cout<<char(185);
}
}
cout<<'\n'<<setw(10)<<char(204);Line(39);cout<<char(185);
cout<<'\n'<<setw(10)<<char(186)<<"Total "
Appendix (C)

120
120
<<setw(3)<<total[0]/2<<setw(4)<<total[1]/2<<setw(4)<<total[2]/2
<<setw(4)<<total[3]/2<<setw(4)<<total[4]/2<<setw(4)<<total[5]/2
<<setw(4)<<char(186);
cout<<'\n'<<setw(10)<<char(200);Line(39);cout<<char(188)<<'\n';
cout<<"\n press Enter to continue...";
cin.ignore();
}

////////////////////////////////////////////////////////////////////////
void read_rel_matrix()
{
int i=0;
for(int n=0 ;n<N-1;n++)
{
for(int M=n+1 ;M<N;M++)
{
cout<<"\n Relationship between facility "<<n+1
<<" and facility "<<M+1<<" "<<char(16)<<' '
<<relationship[n][M] ;
if(!(i%20)) cin.ignore();
i++;
}
}
return;
}
///////////////////////////////////////////////////////////////////////
void modify_flow_matrix()
{
int i,j,t;
char yn ;
if(N<15) t=5; else if(N>=15 && N<19) t=4;else if(N>=19 && N<25) t=3;else t=2;

do
{
if(N<36)
{
upLine(t);cout<<" Flow Matrix ";centerLine(t);
for( i=0;i<N;i++)
{
cout<<'\n'<<setw(3)<<i+1<<char(186);
for(j=0;j<N;j++)
cout<<setw(t)<<flow[i][j];
cout<<' '<<char(186);
if(i%15==0)
{
if(i==0){continue;}
cout<<"\nPress Enter to continue...";cin.ignore();
upLine(t);cout<<" Flow Matrix ";centerLine(t);
}
}
downLine(t);
}
else
{ read_flow_matrix(); }
cout<<"\n Do you want modifying the flow matrix y/n "<<char(16)<<' ';
cin>>yn;
if(toupper(yn)=='Y' )
{
int NoOfModification=0;
do
{
Appendix (C)

121
121
cout<<"\nEnter No. of modifications (<="<<N*(N-1)<<" ) "<<char(16)<<' ';
cin>>NoOfModification;
}while(NoOfModification<0 ||NoOfModification>N*(N-1));

int x=1; int f1=0,f2=0;
do
{
do
{
cout<<"\nModification No. "<<char(16)<<' '<<x
<<"\n\t\t\tFlow between facility No. "<<char(16)<<' ';
cin>>f1;
cout<<"\t\t\t\t And,facility No. "<<char(16)<<' ';
cin>>f2;
if(!(f1>N||f2>N ||f1==f2)) break;
cout<<" Error...Enter again !! ";
}while(1);
cout<<"\nFlow between facility No.("<<f1<<" and "<<f2<<" ) ="
<<flow[f1-1][f2-1]<<" Enter New value =";
cin>>flow[f1-1][f2-1];
flow[f2-1][f1-1]=flow[f1-1][f2-1];
x++;
}while(x<=NoOfModification);
}
else break;
}while(1);

return;
}
////////////////////////////////////////////////////////////////////////////////////
void read_flow_matrix()
{
int i=1;
for(int n=0 ;n<N-1;n++)
{
for(int M=n+1 ;M<N;M++)
{
cout<<"\n Flow between facility "<<n+1
<<" and facility "<<M+1<<" "<<char(16)<<' '
<<flow[n][M] ;
if(!(i%20)) cin.ignore();
i++;
}

}
return;
}

////////////////////////////////////////////////////////////////////////////////////
void modify_cost_matrix()
{
int i,j,t;
char yn ;
if(N<15) t=5; else if(N>=15 && N<19) t=4;else if(N>=19 && N<25) t=3;else t=2;

if(NonExamples=='Y'&&cost_change==0)
{
for(i=0;i<col_row;i++)
{
for(j=0;j<col_row;j++)
{if(i>=N || j >=N || i==j)cost[i][j]=0;else cost[i][j]=1;}
Appendix (C)

122
122
}//if(NonExamples=='Y')
///////////////////cost matrix
do
{
if(N<36)
{
upLine(t);cout<<" Cost Matrix ";centerLine(t);
for( i=0;i<N;i++)
{
cout<<'\n'<<setw(3)<<i+1<<char(186);
for(j=0;j<N;j++)
cout<<setw(t)<<cost[i][j];
cout<<' '<<char(186);
if(i%15==0)
{
if(i==0){cin.ignore();continue;}
cout<<"\nPress Enter to continue...";cin.ignore();
upLine(t);cout<<" Cost Matrix ";centerLine(t);
}
}
downLine(t);
}
///================================
cout<<"\n Do you want modifying the cost matrix y/n "<<char(16)<<' ';
cin>>yn;
if(toupper(yn)=='Y' )
{
int NoOfModification=0;
do
{
cout<<"\nEnter No. of modifications (<="<<N*(N-1)<<" ) "<<char(16)<<' ';
cin>>NoOfModification;
}while(NoOfModification<0 ||NoOfModification>N*(N-1));
cost_change=1;
int x=1; int f1=0,f2=0;
do
{ do
{
cout<<"\nModification No. "<<char(16)<<' '<<x
<<"\n\t\t\tCost between facility No. "<<char(16)<<' ';
cin>>f1;
cout<<"\t\t\t\t And,facility No. "<<char(16)<<' ';
cin>>f2;
if(!(f1>N||f2>N ||f1==f2)) break;
cout<<" Error...Enter again !! ";
}while(1);

cout<<"\nCost between facility No.("<<f1<<" and "<<f2<<" ) ="
<<cost[f1-1][f2-1]<<" Enter New value =";
cin>>cost[f1-1][f2-1];
cost[f2-1][f1-1]=cost[f1-1][f2-1];
x++;
}while(x<=NoOfModification);
}
else break;
}while(1);

return;
}
//////////////////////////////////////////////////////////////////////////////////////
void showLocation(int x)
Appendix (C)

123
123
{
int k=1;
cout<<'\n'<<" "<<char(201);Line(71);cout<<char(187);
cout<<'\n'<<" "<<char(186)<<setw(20)<<"No. of facilities "
<<char(16)<<setw(3)<<N<<setw(34)<<"No. of locations "<<char(16)
<<setw(3)<<col_row<<setw(10)<<char(186);
cout<<'\n'<<" "<<char(204);Line(71);cout<<char(185);
cout<<'\n'<<" "<<char(186);

top('L');cout<<setw(62-6*col)<<char(186);
for(int i=0;i<row;i++)
{
cout<<'\n'<<" "<<char(186)<<setw(10)<<char(186);
for(int j=0;j<col;j++)
{
cout<<setw(3);
if(x==0) cout<<k;
else
{
bool check_yn=0;
for(int h=0;h<=x;h++)
if(k-1==L[h])
{check_yn=1;break;}
if(check_yn)cout<<' ';else cout<<k;
}
cout<<" "<<char(186);k++;
}
cout<<setw(62-6*col)<<char(186);
if(i<row-1)
{ cout<<'\n'<<" "<<char(186) ;center('L');
cout<<setw(62-6*col)<<char(186);
}
}
cout<<'\n'<<" "<<char(186) ;
bottom('L');
cout<<setw(62-6*col)<<char(186);
cout<<'\n'<<" "<<char(204);Line(71);cout<<char(185);
cout<<'\n'<<" "<<char(186)<<setw(18)<<"Facility Names "<<char(16)<<setw(53)<<char(186);
cout<<'\n'<<" "<<char(186)<<setw(22)<<"- Real Facilities "<<char(16)
<<" From 1 to "<<setw(3)<<N<<setw(33)<<char(186);
if(N<col_row)
{
if(col_row-N==1)
cout<<'\n'<<" "<<char(186)<<setw(22)<<"- Dummy Facility "
<<char(16)<<setw(3)<<col_row<<setw(46)<<char(186);
else if(col_row-N==2)
cout<<'\n'<<" "<<char(186)<<setw(22)<<"- Dummy Facilities "
<<char(16)<<setw(3)<<N+1<<" And "<<setw(3)<<col_row<<setw(37)<<char(186);
else
cout<<'\n'<<" "<<char(186)<<setw(22)<<"- Dummy Facilities "
<<char(16)<<" From"<<setw(3)<<N+1<<" to "<<setw(3)<<col_row<<setw(33)<<char(186);
}
else
cout<<'\n'<<" "<<char(186)<<setw(22)<<"- Dummy Facilities "<<char(16)
<<" None"<<setw(44)<<char(186);
cout<<'\n'<<" "<<char(200);Line(71);cout<<char(188);

}
/////////////////////////////////////////////////////////////////////////////////////
void refresh()
{
Appendix (C)

124
124
cout<<"\nrefresh";
int j=-1;
for(int p=count-population_Size;p<count;p++)
{
j++;
for (int i=0;i<col_row;i++)
string[j][i]=layoutSequance[p][i]-1;
}
}
////////////////////////////////////////////////////////////////////////////////////
float Hormonosky_score_system()
{

float store1=0;
float store2=0;
int i,j;
for (i=0;i<col_row;i++)
{
for (j=0;j<col_row;j++)
{
store1 +=relationship_value[i][j];
store2 +=flow[i][j];
}
}
//=======================
float score=0;
float fort=0;
for (i=0;i<col_row;i++)
{
for (j=0;j<col_row;j++)
{
score +=alpha1*( dist[i][j]*
flow[BestLayout[i]-1][BestLayout[j]-1]*
cost[BestLayout[i]-1][BestLayout[j]-1]/store2)
+alpha2 *( dist[i][j]//*adj_matrix[i][j]
*relationship_value[BestLayout[i]-1][BestLayout[j]-1]/store1);

fort +=( dist[i][j]*
flow[BestLayout[i]-1][BestLayout[j]-1]*
cost[BestLayout[i]-1][BestLayout[j]-1]*
relationship_value[BestLayout[i]-1][BestLayout[j]-1]);

}
}
cout<<"\nFortenberry score system ="<<fort;

return (score);
}
////////////////////////////////////////////////////////////////////////////////////
void Chen_statistics()
{
float f2=0; float r2=0; float f2r=0; float f2rel=0;
float d2=0; float pnf=0; float pnr=0; float pnd=0;
float qnf=0; float qnr=0; float qnd=0; float pnf1=0;
float pnr1=0; float pnd1=0; float qnf1=0; float qnr1=0;
float qnd1=0; float mean_dist=0; float mean_flow=0; float mean_rel=0;
float V1=0; float V2=0;

int i,j,k,l;
//===========================
int * Dist_fac[MaxNoFacility];
Appendix (C)

125
125
for (i=0;i<col_row;i++)
Dist_fac[i]=new int [col_row];

for (i=0;i<col_row;i++)
{
for (j=0;j<col_row;j++)
{
Dist_fac[i][j]=dist[i][j];//[BestLayout[i]-1][BestLayout[j]-1]
}
}
//============================
for (i=0;i<N;i++)
{
for (j=0;j<N;j++)
{
f2 +=flow[i][j]*flow[i][j];
r2 +=relationship_value[i][j]*relationship_value[i][j];
mean_flow +=flow[i][j];
mean_rel +=relationship_value[i][j];
if(i<j)
{
f2r +=flow[i][j]*flow[j][i];
f2rel +=relationship_value[i][j]*relationship_value[j][i];
d2 +=Dist_fac[i][j]*Dist_fac[i][j];
mean_dist +=Dist_fac[i][j];
}
}
}
float grand_mean1;//=mean_flow*2*mean_dist/(N*(N-1));
float grand_mean2;//=mean_rel*2*mean_dist/(N*(N-1));
mean_flow =mean_flow/(N*(N-1));
mean_rel =mean_rel/(N*(N-1));
mean_dist =mean_dist*2/(N*(N-1));
grand_mean1=float(pow(N*N*(N-1)*(N-1)*mean_flow*mean_dist*mean_flow*mean_dist,.5));
grand_mean2=float(pow(N*N*(N-1)*(N-1)*mean_rel*mean_dist*mean_rel*mean_dist,.5));
//=========================================

for (i=0;i<N;i++)
{
for (j=i+1;j<N;j++)
{
for (k=i;k<N;k++)
{
for (l=i+1;l<N;l++)
{
if(i!=k &&i!=l &&j!=k && j!=l && k <l)
{
qnf+=(flow[i][j]*flow[k][l]+flow[j][i]*flow[l][k]);
qnr+=(relationship_value[i][j]*relationship_value[k][l]+
relationship_value[j][i]*relationship_value[l][k]);
qnd+=(Dist_fac[i][j]*Dist_fac[k][l]+Dist_fac[j][i]*Dist_fac[l][k]);
}
else if((i==k && j==l) || k >=l || l<j)
{
continue;
}
else if(i==k ||j==k ||j==l )
{
pnf +=(flow[i][j]*flow[k][l]+flow[j][i]*flow[l][k]);
pnr +=(relationship_value[i][j]*relationship_value[k][l]
+relationship_value[j][i]*relationship_value[l][k]);
Appendix (C)

126
126
pnd +=(Dist_fac[i][j]*Dist_fac[k][l]+Dist_fac[j][i]*Dist_fac[l][k]);
}
}
}
}
}
//==================================
for (i=0;i<N;i++)
{
for (j=i+1;j<N;j++)
{
for (k=0;k<N;k++)
{
for (l=k+1;l<N;l++)
{
if(!(i==k || i==l ||j==k || j==l))
{
qnf1 +=flow[i][j]*flow[l][k];
qnr1 +=relationship_value[i][j]*relationship_value[l][k];
qnd1 +=Dist_fac[i][j]*Dist_fac[l][k];
}

if((i==k && j!=l)||(i!=k&& j==l) ||(i==l&& j!=k)||(i!=l&& j==k) )
{
pnf1 +=flow[i][j]*flow[l][k];
pnr1 +=relationship_value[i][j]*relationship_value[l][k];
pnd1 +=Dist_fac[i][j]*Dist_fac[l][k];
}
}
}
}
}
//========================
pnd1 =pnd1/2;
qnd1 =qnd1/2;
pnd =pnd/2;
qnd =qnd/2;
//========================
float u1=(2*f2*d2/(N*(N-1)));//-
float u2=((N*N*(N-1)*(N-1))*mean_flow*mean_flow*mean_dist*mean_dist);//+
float u3=((4*pnf*pnd)/(N*(N-1)*(N-2)));//+
float u4=(16*qnf*qnd/(N*(N-1)*(N-2)*(N-3)));//+
float u5=(4*pnf1*pnd1/(N*(N-1)*(N-2)));//+
float u6=(4*d2*f2r/(N*(N-1)));//+
float u7=(16*qnf1*qnd1/(N*(N-1)*(N-2)*(N-3)));
V1=u1-u2+u3+u4+u5+u6+u7;
V2=(2*r2*d2/(N*(N-1)))-
((N*N*(N-1)*(N-1))*mean_rel*mean_rel*mean_dist*mean_dist)+
4*pnr*pnd/(N*(N-1)*(N-2))+16*qnr*qnd/(N*(N-1)*(N-2)*(N-3))+
4*pnr1*pnd1/(N*(N-1)*(N-2))+4*d2*f2rel/(N*(N-1))+
16*qnr1*qnd1/(N*(N-1)*(N-2)*(N-3));

SD1=float(pow(V1,.5));
SD2=float(pow(V2,.5));
GM1=grand_mean1;
GM2=grand_mean2;

return;
}
////////////////////////////////////////////////////////////////////////////////////
void Chen_score()
Appendix (C)

127
127
{
float obj1=0;
float obj2=0;
int i,j;
for (i=0;i<col_row;i++)
{
for (j=0;j<col_row;j++)
{
obj1 +=dist[i][j]*
flow[BestLayout[i]-1][BestLayout[j]-1];
obj2 +=dist[i][j]*relationship_value[BestLayout[i]-1][BestLayout[j]-1];
}
}
obj1=(obj1-GM1)/SD1;
obj2=(obj2-GM2)/SD2;
float FLS=0;
FLS =alpha1*obj1+alpha2*obj2;

//========================
cout <<"\nFLS ="<<FLS;
return;
}
////////////////////////////////////////////////////////////////////////////////////
///////// End of program code //////////////////////////
////////////////////////////////////////////////////////////////////////////////////

I



,
,
.
:
1 .

:
-
- .
2 .
.
3 .
.
4 . .


, (NP-
Hard Problems)
(polynomial time )
.

:
1 . (NP-Hard Problems)
.
2 . .
3 .
.


II
4 .
.
5 . .
NP-hard problem
,
,
.

C++ ,
GAMOFLP ,
,
(Crossover Probability, Mutation Probability, Population Size,
Maximum number of generation, ...etc) ,
, .

:
1 . .
2 . .
3 . ) ( .
4 . ) .(


.
, 20
,
(CPU time)

.













, ,




:

. /
, , .

. /
, .

/
, , .

Вам также может понравиться