<<

Efficient for The Dynamic Layout Problem

A thesis presented to

The Faculty of the

Fritz J. and Dolores H. Russ College of Engineering and Technology

Ohio University

In Partial Fulfillment of the Requirement for the Degree Master of Science

Anish Jariwala November, 1995 ACKNOWLEDGMENTS

I am indebted to my thesis advisor, Dr. Thomas A. Lacksonen for providing constant support, advice and encouragement throughout this work. I have really enjoyed the pleasant association that I have had with him over the last couple of years.

I would also like to thank my thesis committee members Dr. Robert Williams and Dr.

Brian Manhire for their critical review of my work.

My parents and sister have my greatest love and admiration and I deeply appreciate the sacrifices they have made on my behalf. Simply saying thanks is not enough. Finally, I would like to thank my friends who have made studying at Ohio university an enjoyable experience. Table of Contents

Acknowledgments

Table of Contents

List of Tables

List of Figures

Chapter

1. Introductions

2. Literature Review

2.1 Purpose of Literature Review

2.2 Classification of Facility Layout Problems

2.3 Discrete Representation of Area

2.4 Continuous Representation of Area

2.5 Overview and Comparisons

3. Problem Statement

3.1 Mixed Integer Linear Program Model

3.2 Non-overlapping Constraints

3.3 Research Goals

4. Approach and Preliminary Testing 4.1 Introductions

4.2 Branch and Bound Algorithm

4.2.1 Stopping Criteria for Optimization

4.2.2 Using a Threshold

4.3 Preliminary test Problems

4.4 Built-in Cplex Preprocessing Rules

4.5 Node Selection Strategy

4.6 Initial Solution

4.6.1 Setting Branching Direction

4.6.2 Comparison of Different Initial Solution

4.7 Variable Selection Strategy

4.8 Setting Priority Orders

4.9 Branching Direction Strategy

4.10 Conclusion

5. Results

5.1 Experimental Design

5.2 Small Problems

5.3 Large Problems

5.4 Selection of Best Approach

5.5 Comparison 5.6 Summary

6. Conclusions and Recommendations

6.1 Conclusions

6.2 Future Recomrnendati.ons

References

Appendices

Abstract List of Tables

Tables

4.1 Preliminary Test Problems

4.2 Initial Solution Test Problems

4.3 Comparison between two starting solutions

5.1 Small problems

5.2 Large problems

5.3 ANOVA for small problems

5.4 ANOVA for large problems

5.5 Comparison of number of nodes for small problems

5.6 Comparison of cost for large problems

5.7 Comparison of nodes for large problems List of Figures

Figure Page

3.1 Coordinates of department

3.2 Separation in the x-direction

3.3 Separation in the y-direction

5.1 Design of Experiment Matrix:

5.2 Effect of threshold setting on nodes for small problems

5.3 Effect of threshold setting on cost for small problems

5.4 Effect of priority setting on nodes for small problems at 0.00 threshold

5.5 Effect of threshold setting on. cost for large problems

5.6 Effect of branching direction on cost at 0.80 threshold for large problems

5.7 New MIP-Mixed Algorithm for DLP

5.8a Block diagram for datal23a-time period 1

5.8b Block diagram for datal23a-time period 2

5.8~Block diagram for datal23a-time period 3 Chapter 1

Introduction

A company should strive to reduce indirect costs. Material handling constitutes a major part of indirect costs in a facility. ranging from 10% to 80% of the indirect cost of facility

(Tompkins and White, 1984). Therefore even small improvements in material handling costs makes a large reduction in total indirect costs. The cost of material flow is a function of the distance the material is moved between divisions called departments in a manufacturing facility. To reduce material handling costs, it is essential to have an optimal arrangement of departments to minimize the total distance traveled.

According to a survey done by 1rJicole & Hollier (1983), the average life of any layout is

2.6 years. Hence, it is necessary to consider the dynamic nature of facility layout. Other factors such as new technology, new product lines and a market-based dynamic environment also force one to think about dynamic facility layout. Material handling costs are no longer constant over the planning horizon, creating the need for radical layout changes. The Dynamic lalyout problem (DLP) finds not only the present layout but a series of layouts for the future by taking into account total flow costs and rearrangement costs.

1.1 Facility Layout

The problem of facility layout is to decide the proper positions of a collection of 2 departments to minimize total flow cost. It is a specific application of the assignment

problem. Facility layouts also include architectural space planning, manufacturing cell

layout and VLSI design, etc. Tlie type of facilities varies in each case but the problem

formulation remains the same. Hillier and Lieberman (1990) refer to the assignment

problem as resources being allocated to activities on a one-to-one basis. Only one

department is allocated to one and only one location and vice-versa.

The main objective of the facility layout problem is to minimize overall cost, which is

directly related to material flow between departments. Generally material flow is represented by the product of the amount of material and the distance the material is

moved. The distance traveled is estimated using rectilinear distance between centroids of the departments since material moves through a facility by way of aisles. Constraints ensure departments do not overlap and departments are of proper size.

1.2 Dynamic Facility Layout (DLP)

A large number of optimal and heuristic algorithms have been designed and published to solve the facility layout problems. They are mostly static in nature. A DLP generates a series of static layouts each representing the facility layout at a unique point of time. The

DLP minimizes the cost of changing from one layout to another, called the relayout cost, plus the flow cost of each layout. 1.3 Problem Statement

An existing program can solve static as well as dynamic layout problems. The current program takes a considerable amount of time and memory to obtain optimal solutions.

The greater the number of departments, the higher will be the solution time and memory required. This thesis develops a more efficient program which reduces solution time, reduces memory required, and improves total cost where optimal solution is not reached. Chapter 2

Literature Review

2.1 Purpose of Literature Review

The purpose of the literature review is to explore current research in different facility layout problems, including various models to represent the facility layout problem and algorithms that solve these models.

2.2 Classification of Facility Layout Problems

There are mainly two ways of representing areas of departments in the facility layout problem: discrete and continuous. In the discrete representation of area, the total area required by all the departments is divided into blocks of equal size. The algorithms which use this representation either prespecify the dimensions of the departments or represent each department as a set of grid blocks. This often leads to irregularly shaped departments and inaccurate representation of areas. Continuous representation of areas overcome the drawbacks of discrete representation. It allows unequal department areas to be represented accurately by the coordinates of their comers- upper right and lower left.

Constraints are used to limit their length-to-width (aspect) ratio. 2.3 Discrete Representation of Area

This section discusses models and algorithms that allow a discrete representation of unequal areas. In this case there are two different types of algorithms-heuristic and optimal.

2.3.1 Heuristic Algorithm

A heuristic algorithm works towards an optimal solution but ends its search when it finds a 'good enough' solution. As computation increases, these algorithms will approach the optimal solution. The purpose of the heuristic algorithm is not to find the best or optimal solution but to find an acceptable solution in an acceptable amount of time using an acceptable amount of computer memory.

2.3.la Construction Algorithms

ALDEP (Seehof and Evans, 1967) randomly selects a department and assigns it to the upper left comer of the layout. The next department selected for the assignment is one which has highest closeness rating in the relationship (REL) chart to the initial department and places it in the layout. The closeness ratings are qualitative ratings signifying the desirability of placing two departments adjacent to each other. The above process is repeated until all the departments are placed in the layout. Several layouts can 6 be generated because the initial department is chosen randomly. ALDEP has the ability to handle up to 63 departments and up to three floors. Some of the disadvantages of this algorithm are that the total area requirement for the floor must be known, the departments areas are restricted to integer multiple of blocks and layouts generated may contain unacceptably irregular shaped departments.

CORELAP (Lee and Moore, 1967) also uses a total closeness rating of each department to determine a layout. Unlike A.LDEP which randomly selects the first department to be assigned, CORELAP selects the .first department depending upon its total closeness rating value. The selected first department is placed in the center of the layout and the rest of the departments are added subsequently depending on their relationships to the departments already assigned. This algorithm also suffers the same disadvantages as ALDEP, such as inaccurate representation of departmental areas and irregularly shaped departments which requires manual adjustment to enhance the practical feasibility of layout.

2.3.lb Improvement Algorithms

The most popular improvement algorithm is CRAFT, which was developed by Armour and Buffa (1963). An improvement algorithms takes an initial layout as an input and exchanges the department locations until a layout is found that can not be improved.

Pairwise exchange of departments is made in order to find better layouts in terms of material flow cost. This pairwise exchange is possible only when the department pair are 7 of equal areas or share common boundaries. CRAFT can handle up to 40 departments

and is preferred over construction algorithms because CRAFT can minimize the cost of

flow between departments. Many improvement algorithms have been developed since

which are based on the CRAFT algorithm with some modification.

2.3.2 Optimal Algorithms

During the 1960's considerable research was done in developing optimal algorithms.

Optimal algorithms find the best solution. However, they are not practical due to

limitations on computer time.

2.3.2a Quadratic Assignment Model

The quadratic assignment problem (Koopmans an Beckrnan 1957) was first used to model the problem of locating plants based on the material flow between them. The name QAP was given because the objective function is a second degree function of the variables and the constraints are linear functions of the variables. The mathematical model of the quadratic assignment problem (QAP) is The integer variable, X, is equal to 1if department i is assigned to location j, otherwise the variable is equal to 0. The constantAk is the material flow between departments i and k, and Cj, is the cost of material flow between location j and 1. The first constraint ensures that each location will be assigned exactly one department and second constraint ensures that each department will be assigned to exactly one location.

2.3.2b Linear Integer Programming Problem

A facility layout problem can also be formulated as a linear integer programming problem. Lawler (1963) was the first to formulate the facility layout problem as a linear integer programming problem by defining Ygk[= Xq Xkl which reformulates the quadratic assignment problem into a linear integer programming problem. The number of integer variables required are n2+n" the number of constraints required are nd+2n+l (n = number of departments). The number of integer variables and constraints required is much more than required for the quadratic assignment problem. These larger problems 9 are more difficult to solve optimally because of the increased amount of computation and memory required.

Kaufrnan and Broeckx (1978) also developed a linear mixed integer program which requires the smallest number of integer variables. Still this formulations do not consider

varying areas and varying shapes of departments, which keeps them fiom being realistic.

2.3.2~Branch and Bound Algorithm

The first two branch and bound algorithms were developed by Gilmore (1962) and

Lawler (1963) separately for solving the quadratic assignment problem. These algorithms implicitly evaluate all possible solutions to a problem, resulting in an optimal

solution. These algorithms require a large amount of memory and computational time

governed by the number of integer variables required. In this algorithm, each facility is allocated to each location stage by stage. The partial layout is evaluated and compared to a lower bound. If the cost of partial layout is less than the lower bound, the partial layout is kept and used as a lower bound in subsequent iterations, otherwise it is discarded and the branch is fathomed.

Lavalle and Roucairol(1985) suggested the use of a parallel branch and bound algorithms

for solving the quadratic assignment problem. Unlike the previous one, the search is

carried out concurrently to find the optimal solution. But results revealed that the parallel 10 branch and bound algorithm requires excessive computational time for problems of more than 12 departments.

2.3.2d Quadratic Set Covering Problem (QSP)

The Quadratic Set Covering Problem is an extension of the quadratic assignment problem, developed by Bazaraa (1975). In the problem formulation, the total area occupied by all facilities is divided into a number of blocks. The area of each department is included in the model. A branch and bound algorithm is used to optimize the problem.

Departments with irregular shapes and multi-story buildings can be modeled using the

QSP. Even though the quadratic set covering problem has the advantage over the quadratic assignment problem by taking into consideration varying areas, it is still short of being realistic. This model assumes the shape of department is known and fixed.

Hence better layouts can not be found by varying the shapes of departments so that distance between department centroids is minimized.

2.4 Continuous Representation of Area

In the case of continuous representation of area, most of the models are optimal and are solved using mixed-integer programming. No manual massaging of department shapes is required once the layout is formed. 11 2.4.1 Continuous Facility Layout Models

Montreuil (1990) modeled the facility layout problem using a continuous representation of area while including location of the inputloutput stations of each cell and physical layout of the aisle system. The objective function minimizes the cost of material flow per unit of distance traveled. The distance is calculated between inputloutput stations of the department pair rather than the centroids. Constraints are used to control the shape of the departments based upon the minimum and maximum side lengths. To restrict the departments from overlapping, Monteruil introduces four integer variables that define the respective locations of a department pair. The number of integer variables required is

(n*(n-1)/2) *4 where n is the number of departments. Several mixed integer programming models were given. Most models have linear objective functions and constraints, some have quadratic objective function andlor quadratic constraints. But algorithms for solving them were not given.

2.4.2 The Dynamic Layout Problem (DLP)

The algorithms and models discussed so far generate layouts that are static in nature. A dynamic layout is a collection of static layouts, each representing the facility layout at a unique point of time. Facilities design has been moved from reactive mode to a more planned proactive mode (Nicole and Hollier, 1983). 12 Rosenblatt (1986) developed the first dynamic layout algorithm based on , which reduces to the classical . The model attempts to select a layout for each future, from a prespecified set of alternative layouts for each of

these futures, with the objective of minimizing the sum of relayout and operating costs through the entire planning horizon. The main issue with this algorithm is that a designer

has to perform several static layout design studies for each future which is a demanding

task. This algorithm is restricted to a problem with a maximum of six departments and

departments are represented as unit areas.

Urban (1992) found a good lower bound for the dynamic layout problem to be used on

branch and bound algorithm and dynamic programming approach. Jacobs et al. (1992)

uses a dynamic programming approach for solving the dynamic layout problem. A

financial constraint on the amount of funds to be spent on rearrangment cost are incorporated in the model. Conway and Venkataramanan (1994) used a genetic algorithm for solving the facility layout problem. This algorithm intially finds a series of layouts and later selects the best one available. But none of these algorithms take varying areas of department into account.

Lacksonen (1994) developed a mixed integer linear program (MIP) based on Monteruil's model which has the ability to generate dynamic layouts which overcome the drawbacks of all previous models of dynamic layouts. The algorithm is composed of two stages.

The first stage is based on QAP and utilizes a cutting plane routine and an exchange 13 algorithm similar to CRAFT to estimate the best location of departments. It was found

(Lacksonen and Enscore 1993) that the cutting plane algorithm can find the best solution

for the QAP. The second stage uses MIP to assign departments to specific locations using

a continuous representation. The area of each department is fixed and a length to width

ratio is used to control the department shapes. The MIP minimizes the flow cost using

rectilinear distances between centroids. Constraints are used to attain non-overlapping

departments and to ensure that certain departments remain stationary through multiple time periods. The program is written in Fortran and the MIP is solved using a Cplex software branch and bound routine. The algorithm can be used either for static or dynamic layouts or for a series of static layouts over multiple time periods. Hence static layout is a special case of DLP.

2.4.3 DLP Preprocessing

The DLP algorithm requires a large number of integer variables, which limits the size of the problem which can be solved optimally using a branch and bound algorithm. Hence

Kanya's (1994) research determined in advance using preprocessing rules in which direction two departments should be separated, either in the x or y direction. This preprocessing rules are based on three factors: distance between department pairs in QAP layout, department size and material flow between departments. When the direction of separation is known in advance, the integer variables defining separation direction become prespecified. The number of integer variables required in non-overlapping 14 constraints reduces drastically. Problems were divided into four categories depending on the number of integer variables. Small problems contain 0 to 25 integer variables, low medium problems contain 25 to 50 integer variables, high medium problems contain 50 to

125 integer variables and large problems contain 125 to 400 integer variables. A threshold defines the percentage of integer variables prespecified, ranging between

0.0000 and 1.0000. When approximately 80% of the integer variables are prespecified, high medium and large problems produced better costs than when 0% of the integer variables were prespecified, with a drastic reduction in solution time. The total reduction in flow cost for high medium and large problems were 9.87% and 14.02% respectively when approximately 80% of integer variables were prespecified. However, the solution obtained for the reduced problem may not be optimal for the original non-reduced problem.

2.5 Overview and Comparisons

The facility layout problem was first modeled as a quadratic assignment problem. Due to its non-linear nature, the QAP is difficult to solve optimally. Departments must be represented as equal sized blocks. Later on models were developed in which the quadratic assignment problem was reduced to a linear integer problem. At the present time, in industry, common software tools such as ALDEP, CRAFT and CORELAP are used. ALDEP and CORELAP are construction algorithms that use a discrete representation of areas and closeness rating to create a block layout. CRAFT is an 15 improvement algorithm which takes an initial layout as an input and improves it by exchanging departments until a better layout is found. The common disadvantages to these algorithms is their discrete representation of area, generating irregularly shaped departments with inaccurate areas. The current research in facility layout uses continuous representation of area. These MIP models represent a department by defining its comer coordinates. Integer variables are used to keep the departments from overlapping.

The dynamic layout problem was first formulated based on the QAP. Later models utilize continuous representation of area. However, DLP models require a large number of integer variables that prohibits larger problems from being solved optimally due to excessive computational time and memory requirements. Chapter 3

Problem Definition

3.1 Mixed Integer Linear Program Model

The dynamic layout algorithm ( Lacksonen 1994 ) is a two step algorithm for solving the

facility layout problem. The first step is to formulate an quadratic assignment problem

in which each department is assigned to a location and rearrangement cost is calculated

using the cutting plane routine. The second stage is a mixed integer linear program (MIP)

which minimizes flow costs.

The MIP formulation is as follows:

in z = ~~(4;+A; +K; + Ki)

subject to

YU,-YLi+R 'x,~+R-.'x,~ = (AJR).'

XUi-XL,-XI i-X2i= (AJR)"

XliS A;' (1-R-.')

V depts. i m;+xz;-mJ-mJ-24,+ +24' = 0

YU,+YL;- W,-IZ~-~G'+~Y; = o 'd depts. i, j a,-Xi>0

XU,-xu&0

YL,-Xi> 0

YU,-YU,> 0 'd stationary depts. i, k

Xi-xUj+MSuZ 0

YL;-YU,- MS& -M or XLJ-XUi+MS, > 0 nJ-?-MS$ -M or %-XU,> 0 or YL,-YUi> 0 t;/ depts. i, j s, E {O,I) + positive and negative distances between department where: 4; ,&; ,K, , KYlr'

i and j.

Ai area of departement i

R maximum aspect (length-to-width) ratio of

department maximum building coordinates

flow between department i and j

a large number (sum of XUB+YUB)

= 1 if department j is left of i

= 0 if department j is below department i

A department is represented by its upper left comer and lower right comer coordinates in a two dimensional plane (Figure 3.1). This allows department areas to be represented accurately as rectangles.

w9

Figure 3.1 Coordinates of a department

A user-defined maximum width to height ratio, R, is used to control the shape of each department; this is represented in constraints (3.2) to (3.5). Constraints (3.6) and (3.7) assign each department to a location within the facility boundaries. Rectilinear distance is used to calculate the distance between department centroids in constraints (3.8) and

(3.9). A department's area may vary from one time period to the next. Constraints (3.10) through (3.13) are used to ensure that departments which are stationary in the QAP layout 19 remain stationary in the MIP layout even if the areas of the departments change from one time period to another

3.2 Non-overlapping Constraints

To ensure that departments do not overlap, they must be separated in either the x direction or in the y direction. This is represented by the following equations:

~XL~-XL$~~0 (3.20)

I YLi-W, 12 0 'd depts. i,j (3.2 1)

Equation (3.20) states that for every department pair, the distance in the x direction must be greater then or equal to zero. Equation (3.2 1) states that for every department pair, the distance in the y direction between the departments must be greater then or equal to zero.

At least one of the above equations must hold true to keep departments from overlapping.

An integer variable is used to make sure that at least one of the constraints is satisfied.

This procedure is called ' the '. Equations (3.20) and (3.21) can be modified in the following way: 20 The variable M represents a very large number and Sij is an integer variable that can be either be 1 or 0. The algorithm uses the layout generated by the QAP to predetermine whether department j is below or to the right of department i, or if department j is below or to the left of department i. Equations (3.22) and (3.23) are then replaced by the two sets of equations below.

Equations (3.24) and (3.25) are used when department j is left or below department i.

XLj-mj+MSjj> O (3.24)

Equations (3.26) and (3.27) are used when department j is right or below department i.

XL,-XUi+MSjj > O (3.26)

Hence there is one SV variable for each department pair which controls the direction of separation of department in the final layout. When the Sv variable is 0 the department pair is separated in the x direction (Figure 3.2). When the Sv variable is 1 the department pair is separated in the y direction (Figure 3.3). Dept. i nL Dept. j

Figure 3.2 Separation in the Figure 3.3 Separation in the x direction y direction

3.3 Research Goals

A problem with n departments and T time periods requires T* n (n-1)/2 integer variables.

As n or T becomes larger the number of integer variables increases and optimal solutions become difficult to attain. In Kanya's (1994) work, preprocessing rules predetermined integer variable values specifying the direction of separation of department pairs before the execution of the MIP stage. Hence the solution time and memory required were reduced, but the solution obtained using preprocessing rules is optimal only for the reduced problem and may not be optimal for the original non-reduced problem.

A lower solution time and cost can be obtained by making the branch and bound algorithm of the MIP stage more efficient. The Cplex default uses a breadth-first search choosing branches randomly and selecting branching variable values arbitrarily. Using x- indicator and y-indicator values from Kanya's research an intelligent branch and bound algorithm can be created. The intelligent search can go in one of the two direction: a search that branches on nodes that are more likely to lead to the optimal solution or a search that branches on nodes that are less likely to lead to the optimal solution and can be fathomed quickly.

Another goal is to find a good initial solution which can be used as an upper bound, to fathom nodes quickly. Cplex defaults are inefficient in finding a good initial solution based on the large number of nodes required to find the first feasible solution. Chapter 4

Approach and Preliminary Testing

4.1 Introduction

The second stage of the dynamic layout problem (DLP) is solved by Cplex optimization software (Cplex 1994) using a branch and bound algorithm. There are many different combinations of parameters to set. Some of these settings are not expected to work well.

Hence, preliminary testing was done using one parameter at a time to eliminate obviously inferior settings, as described in Sections 4.4 to 4.8. Then the full factorial experiment was conducted on the remaining settings described in Chapter 5. A good initial starting solution was also found which can be used as an upper bound.

4.2 Branch and Bound Algorithm

In the Cplex branch and bound algorithm, a series of subproblems are solved. A of subproblems is built and each subproblem is a node of the tree. The root node is the linear programming relaxation. If the solution to the relaxation has integer variables with fractional values, than an integer variable is chosen for branching, and two new subproblems are created, fixing the branching variable to 0 and 1. The subproblems result in an all integer solution, an infeasible solution or another fractional solution. The process is repeated if the solution is fractional. Nodes are cutoff or 24 'fathomed' when the objective value of the subproblem becomes worse than the value of the best integer solution.

This method for solving mixed integer programming problems requires more mathematical computations then similarly sized pure linear programs. Many relatively small sized problems take enormous amounts of memory and time to solve. The number of integer variables mainly determines the time and memory because the process of optimization will stop only when no integer variable has a fractional value. One can reduce the solution time and memory occupied by using different parameter settings and stopping criteria in the process of optimization. The Fortran DLP program sets parameters by calling Cplex subroutines.

4.2.1 Stopping Criteria for Optimization

The process of optimization will keep running until the optimal solution is reached and all unexplored nodes are fathomed. In some large problems, it is difficult to attain an optimal solution and the process of optimization will run until the computer memory is exhausted. Cplex has many settings which can be used for stopping the optimization after a certain point such as specifying node limits, number of integer solutions and tree memory limit. The number of nodes searched was set to 100,0000 nodes. The solution obtained when this limit is reached may be a sub-optimal solution. 2 5 The number of integer feasible solutions was also limited to find the initial solution; this limit was set to 1. After obtaining the initial solution this limit was set to 1500. This was a totally unrealistic number, so the process of optimization at later stages will never stop by reaching this limit.

4.2.2 Using a Threshold

In Kanya's research a threshold was used to prespecify integer variables. The value of this threshold varies from 0.00 to 1.0. Kanya's program was modified so that the user can define what percentage of integer variables should be prespecified. In final testing described in Chapter 5 threshold values of 0.00 and 0.80 were used. Hence in one case

0% of integer variable were prespecified and in other case 80% of integer variables were prespecified.

4.3 Preliminary Test Problem?

The set of preliminary test problems is comprised of problems generated by Kenya

(1994) and layout problems that have been published by Tam and Li (1991), Montreuil

(1989), Armour and Buffa (1963) and Lacksonen (1 994). The problem are coded as tam#, cutree#, armour# and data###a. The number of departments and time periods are incorporated into each problem name. The tam, cutree and armour problems are followed by a number representing the number of departments in the problems. The problems of 2 6 Lacksonen and Kanya list the number of departments followed by the number of time

periods. For example tam15 means the problem has 15 departments and data123a means

the problem has 12 department and 3 time periods. The problems used for preliminary

testing are shown in Table 4.1 :

Table 4.1 Preliminary Test Problems

While testing for better initial feasible solutions, it was difficult to reach any conclusion

based on the above test problems. Hence more test problems were solved for this test

which is described in Section 4.5. All the test problems are given in Appendix A.

4.4 Built-in Cplex Preprocessing Rules

Cplex 3.0 version has a new preprocessing technology for dramatic problem reduction and for overall performance improvement in terms of cost, solution time and memory requirement. Different preprocessing parameters are as follows:

(a) Aggregator: Whenever this indicator is set to yes, substitution will be made wherever possible to reduce the number of rows (constraints) and columns (variables) before the problem is solved.

(b) Coeffreduce: The purpose of coefficient reduction is to improve the objective value of the initial linear programming relaxations solved during the branch and bound algorithm 2 7 by reducing the number of non-integral vertices. But, the linear programs generated at each node may become more difficult to solve.

(c) Dependency: When this indicator is turned on (set to yes), the dependency checker will search for dependent rows during preprocessing. If off, dependent rows will not be identified.

(d) Presolve: When this parameter is invoked, Cplex will try to make simplifications and reductions in structure of the problem .

All of the above parameters were tried interactively on one test problem of 12 departments and 1 time period to see whether any of these parameters would help in obtaining better results

For all combinations the same results were obtained - total cost 1392.30, number of nodes searched- 2192 and solution time of 54.30 and threshold used- 0.50. Hence it shows that none of these preprocessing parameters help in solving the layout problem. The structure of the layout problem does not permit exploiting the benefits of preprocessing rules.

Since the rules take time to execute, they were not incorporated in the DLP program and were not used in later stages of testing.

4.5 Node Selection Strategy

Cplex contains three different node selection strategies: best-bound, best-estimate and 28 depth-first search. In this section testing was done between best bound and best estimate node selection strategies

(a) Best bound: This is the default setting. At this setting, Cplex will select the

unprocessed node with the best objective value and ignores any unfeasibility. Best bound

may find better solutions sooner but not always faster.

(b) Best estimate: It estimates the objective value which would be obtained if all integer

infeasibilities were removed rather than using node objective values.

Best-bound and best-estimate strategies will keep many nodes from being unfathomed which will increase solution time to reach optimal solution and occupy a lot of memory.

Both these strategies result in jumping around fairly " high" in the tree. This may occupy a lot of memory and may take more time to reach an optimal solution.

(c) Depth-first search: This strategy limits the selection of the next node to one of the two descendants of the current node and results in faster per-node processing times.

Feasible solutions are often found deep in the tree. Depth-first search plunges to find these solutions. Processing time per node is faster than the previous two cases.

MIP strategy nodeselect parameter- 0 Depth-first search

(SETNDSEL) 1 Best-bound search

2 Best-estimate search

A comparison was made between the best-estimate and the best-bound approaches for node selection strategy. Both approaches were used for the initial solution algorithms 29 described in next section: The default algorithm where no branching directions were specified and an algorithm where branching direction were specified and diagonal department pairs were separated in the x-direction.

The approaches were tested on the test problems found in Table 4.1. Wherever an optimal solution was reached, there is no difference in cost but the solution time and the number of node searched differs. Where the optimal solution is not reached, there is difference in cost, solution time and number of nodes searched. Results are shown in

Appendix B. The best-estimate approach required on average 2.46% more nodes over the best-bound approach when the optimal solution was reached. The best-estimate approach produced on average 6.65% better cost over the best-bound approach where the optimal solution was not reached.

Hence, the best-bound approach for node selection was discarded from further testing and only the best-estimate was used along with the depth-first search approach because cost is a more important criterion than the number of nodes searched.

4.6 Initial Solution

Presently the second stage of the Dynamic Layout Problem is executed by the default parameters of the Cplex optimization software. Cplex uses a breadth first search by default choosing branches randomly and selecting variable values randomly, which is 30 expected to take a long time to find an initial solution. No nodes are fathomed until then.

If a better initial solution is found using an intelligent approach than by the default parameters of Cplex, total solution time and memory requirements may be reduced.

Once a good initial solution is found many of the nodes which are less likely to lead to

the optimal solution will be fathomed.

Generally a good initial solution is found deep in the solution tree, hence the node-depth

approach was used in obtaining the initial solution. The branch and bound algorithm was guided through a single depth search designating which direction to branch based upon the QAP solution found in the first stage of the DLP.

4.6.1 Setting Branching Direction

The most effective and performance improving approach is to specify the variable branching direction mechanism. Cplex uses the magnitude of the branching variable's integer infeasibility to decide whether to process the up (set to 1) or down (set to 0) branch. One may force the branching direction either up or down if one has very good

"feel" for the problem. Kanya estimated the separation of departments in final layout, i.e. whether the department pair will be separated either in x or y direction. If the department pair is separated in the x-direction the branching variable will be branched down, otherwise it will be branched up. The expected direction of separation for each department pair (i.e for each integer variable) was programmed for the initial solution. The options available for branching directions in Cplex are:

MIP branching direction parameter 1 branch down (restricted to lower value)

0 selects global branching direction (default)

2 branch up (restricted to higher values)

LOADORDER is one of the most powerful commands of the Cplex optimization software. The branching direction for each integer variable was set using this command.

loadorder (varno, priority, updown) varno -An array containing the numerical indices of the columns corresponding to the integer variables which are assigned priorities or branching direction. priority - An array containing the priorities assigned to integer variables for branching.

Since there were no priorities at this stage, NULL was substituted for this array. updown - An array containing the branching direction, either 0, 1 or 2 assigned to the integer variables. This was used to lead towards a desired initial solution.

Three different approaches were evaluated for the initial solution:

Approach1 : Using Cplex default parameter for branching direction of Cplex.

Approach2: Using QAP directions while separating diagonal departments in the x

direction.

Approach3: Using QAP directions while separating diagonal department in the y

direction. 4.6.2 Comparison of Different Initial Solution Algorithms

The three approaches were used to obtain initial solutions of the 27 test problems as shown in Table 4.2:

Table 4.2 Initial Solution Test Problems

tam5 tam6 tam7 tam8 d8-1.1 d8- 1.2 d9-1.1 d9- 1.2 d9-1.3 data063a d10-1.1 dl 0-1.2 d10-1.3 d10-1.4 dl 1-1.1 dl 1-1.2 d8-2.1 cutree 12 d12-1.2 d12-1.3 d12-1.4 data065a tam 15 tam20 armour20 data123a datal25a

Results obtained using all the three approaches are in Appendix B. There was 1.58% improvement in cost when branching directions were specified using the loadorder command and diagonal departments were separated in the x-direction instead of the y- direction. Only 3 problems gave inferior solutions out of 27 problems in this testing.

There was 6.15% improvement in cost when the default parameters of Cplex were used over specifying branching direction and separating diagonal departments in the y- direction.

Hence, the approach of specifying branching direction and separating diagonal department in the y-direction was discarded and only two approaches of obtaining initial 33 solutions were carried forward for further testing. At this stage it is difficult to say whether default parameters of Cplex produce better costs than specifying branching direction. It is difficult to predict which one will be more effective than the other for the rest of the branch and bound algorithm because there may be a better tree to expand.

For example, for the tam8.data problem, analysis of the initial solution shows that the default parameter approach produced a better result than specifying branching direction for each department. But when the optimal solution was obtained, the number of nodes required was drastically reduced when specifying branching directions for the initial solution (Table 4.3). In this case specifying the branching direction for initial solution produced better end results. Since this parameter setting is less significant than other parameters, branching directions were specified in all further testing.

Table 4.3 Comparison between two starting solutions

Solution obtained by Solution obtained using specifying branching default parameters of direction Cplex Initial solution cost: 542.38 nodes: 13 cost: 480.98 nodex29

1 I Final solution / cost: 390.58 nodes9200 I cost: 390.03 nodes: 1 1884 4.7 Variable Selection Strategy

One branching variable can be given preference over branching variables during execution of branch and bound algorithms using a variable selection strategy. By giving preferences to certain branching variables, one can eliminate computation time exploring uninteresting portions of the tree. Hence, overall solution performance can be improved.

Cplex permits 5 variable selection strategies:

MIP variable selection parameter -1 Select variable with minimum infeasibility

0 Determined automatically (default)

1 Select variable with maximum infeasibility

2 Select based on pseudo-reduced cost

3 Strong Branching

Since the Si integer variables have M coefficients, infeasibility and reduced cost are not good selection strategies. Therefore, only default and strong branching options were tried. This approach was tested on the problems of Table 4.1 Results are shown in

Appendix B. The number of nodes required was 75.63% higher in the strong branching approach than in the default options where the optimal solution was reached. The cost was 0.07% better in the default option than the strong branching options.

Hence, the strong branching option was discarded and only the default option was kept.

This strategy did not need to be explicitly called by the Fortran program. 4.8 Setting Priority Orders

By setting priority orders for integer variables, integer variables with higher priorities will

be branched upon before variables with lower priorities. This is one of the most effective

methods for improving algorithm performance. Sometimes this guidance can

dramatically reduce the number of nodes searched.

In Kanya's work, two indicators are calculated for each department pair, one to predict if

department pair will be separated in the x-direction and other to predict if department pair

will be separated in the y-direction in the final layout. Each indicator will range fiom 0 to 1. The closer the indicator value is to zero than another one, more likely the department pair will be separated in that direction. Hence, for each department pair one of the indicators was picked for assigning branching priorities depending on the following case:

(a) High Priority: Variables with higher priorities will be branched first. Variables for department pairs whose final direction of separation is difficult to predict will be branched first. Then variables for department pairs whose final direction of separation is obvious will be branched. This approach attempts to get the optimal solution quicker.

(b) Low Priority: Variables with lower priorities will be branched first. Variables for department pairs whose final direction of separation is obvious will be branched first. 3 6 Then variables whose final direction of separation is difficult to predict will be branched.

This approach attempts fathom nodes which are least likely to lead to optimal solution.

(c) Default Priority: In this case no branching priorities were assigned for any variables.

Cplex would automatically pick any variable depending on its built-in routine. This approach may be to obtain the optimal solution quicker or to fathom nodes which are less likely to lead to optimal solution.

The LOADORDER command was used to set priorities in Cplex. The three approaches were tested on problems found in Table 4.1 with results in Appendix B. The low priority approach required 0.26% more nodes as compare to the high priority approach where the optimal solution was reached, but produced 0.1 5% less cost compared to the high priority approach where optimal solution was not obtained. The high priority approach required

74.32% more nodes as compared to the default option where optimal solution was reached and produced 5.25% higher cost compared to the default option of branching priority where the optimal solution was not reached.

Hence, overall, the high priority approach produced the poorest cost where the optimal solution was not reached. Since cost is a more important consideration than number of nodes searched, the high priority option was discarded from further testing and only two option were used for further testing. 4.9 Branching Direction Strategy

Branching direction was used to help find the initial solution and was also used in the rest

of the iterations. Based on the initial QAP layout distances and using the LOADORDER command, branching direction could be set in two ways:

(a) Set the branching direction in its most likely correct value. If two departments are separated in the x-direction by more units than in the y direction, they will be separated in the x-direction and vice-versa. This approach attempts get the optimal solution quicker.

(b) Set the branching direction in its most likely incorrect value. If two departments are separated in the x-direction by less units than in the y direction, they will be separated in the x-direction and vice-versa. This approach attempts to fathom nodes which are least likely to lead to optimal solution

If departments are in a diagonal orientation where they are separated in both directions by equal units, they will be separated in the x-direction. These strategies were analyzed in full factorial design in next chapter.

4.10 Conclusion to Preliminary Testing and Approach:

There were too many parameters to set within the Cplex optimization software and too 38 many different combinations of parameters to perform a full factorial experiment. The 18 different settings of 5 different parameters were evaluated one at a time on a few test problems. Some settings were found to be inferior and were eliminated from further testing by evaluating one at a time on a few test problems. Only 2 settings of 3 parameters - branching direction, priority and node selection - were used for full factorial design which is described in the next chapter. One additional factor, threshold was also used in final testing. A good initial starting solution was also found and then used as an upper bound. Chapter 5

Results

5.1 Experimental Design

After preliminary testing, factors which affected cost and nodes were identified. A full- factorial design of the experiment was conducted to determine how these factors and their interactions affected the response variables- cost and nodes.

In final testing, problems were divided into two groups: small problems and large problems. Problems where the optimal solution was obtained (1 to 45 integer variabless) were called small problems (Table 5.1). Problems where the optimal solution was not reached (46 to 41 1 integer variables) but the process of optimization was stopped by node limit of 100,000 were called large problems (Table 5.2). The final set of test problems was run on a Sun Sparc Station 2 with a Weitak board upgrade with a 424 Mb hard drive and 64 Mb of RAM.

Table 5.1 Small problems 40 Table 5.2 Large Problems

dl 1-1.1 d8-2.1 cutree 12 tarn12 data065 tam1 5 tam20 armour20 data123a data1 25a data203a

Factors tested were priority, branching direction, node selection and threshold. All factors were controlled at two levels. The design matrix for the full-factorial design of experiment is shown in Figure 5.1. A Block design was used with each problem being a block. Two separate experiments were conducted, one for small problems and another for large problems. All the problems were solved for 16 different combinations.

Preferred Branching Direction Non-preferred Branching Direction Node Depth Best Estimate Node Depth Best Estimate Threshold Default 0.00 Priority X X X X Low priority X X X X Threshold Default 0.80 Priority x x x x LowPriority X X X X

Figure 5.1 Design of Experiment Matrix 5.2 Small Problems

The optimal solution was reached without reaching the maximum node limit in small problems Hence all the different combinations at the 0.00 threshold setting gave the same cost but the number of nodes varied significantly (approximate solution time 10 seconds to 30 minutes). Hence in the Analysis of Variance (ANOVA) for the small problems, the number of nodes was the response variable. An analysis of variance was performed using STATGRAPHICS (1993) software as shown on next page (Table 5.3)

The factors which are significant are threshold, priority and their interaction at 95% confidenec interval. Branching direction and node selection strategies and their interactions are not significant. Therefore it does not matter how one sets the branching direction and node selection since they do not affect the number of nodes significantly.

The most significant factor is threshold. The average number of nodes required were reduced by 99.89% when a 0.80 threshold setting is used over a 0.00 threshold setting

(Figure 5.2). Since 80% of integer variables are prespecified at the 0.80 threshold setting, it is expected to reduce the number of nodes searched. However there was a small increase in average cost of 2.61% when a 0.80 threshold is used (Figure 5.3). This is due to the large number of integer variables which are prespecified, a few of which will be suboptimally specified. Since cost is more important than the number of nodes, threshold setting 0.00 should be used on small problems. v 0 G-! e N Ln

Table 5.3 ANOVA for small problems 43 For a threshold setting of 0.00, the low priority setting required on average 84.27% more nodes compared to default priority (Figure 5.4). Therefore the default priority setting should be used for small problems.

Figure 5.2 Effect of Threshold setting on Nodes for Small Problems

- -- 28000 T 24000 moo + 16000 + 12000 1 I 8000 L 4000 1 0- 0 0.8 Threshold Threshold

Figure 5.3 Effect of Threshold setting on Cost for Small problems

0 0.8 Threshold Threshold I Figure 5.4 Effect of Priority Setting on Nodes for Small Problems at 0.00 Threshold

Default Low Priority Priority Type of Priority

5.3 Large Problems

In large problems, the optimal solution was not reached and the algorithm was stopped by

the node limit. In this case Cplex reports the best available solution at that point in the

optimization process. Therefore all the 16 different combinations of setting gave the

same number of nodes (100,000) at 0.00 threshold (approximate solution time 3 hours to

28 hours). These problems were solved to optimality in slightly less than 100,000 nodes

at a threshold of 0.80. In the analysis of variance, for large problems, the response variable was cost (Table 5.4).

The most significant factor is threshold at 95% confidence intreval. Branching direction

and its interaction with threshold could also become significant at 95% confidence ANOVA for cost - LARGE PROBLEMS WITH COST ---- ...... Effect Sum of Squares DF Mean Sq. F-Ratio P-value ...... A:priority 8.44767E0006 1 8.4477E0006 .03 .8672 B:nodeselect 1.30729E0008 1 1.3073E0008 .45 .5125 C:b~-anchdirc 4.18433E0008 1 4.1843E0008 1.43 .2346 D:threshold 3.18731E0009 1 3.187330009 10.91 .0014 AB 7.28204E0006 1 7.2820E0006 .02 .8766 AC 1.62808E0004 1 1.6281E0004 .OO .9941 AD 2.09199E0006 1 2.0920E0006 .01 .9337 BC 1.38459E0008 1 1.3846E0008 .47 .5004 BD 1.24828E0008 1 1.2483E0008 .43 .5220 CD 3.57752E0008 1 3.5775E0008 1.22 .2715 ABC 5.6508630004 1 5.6509E0004 .OO .9891 ABD 5.89539E0006 1 5.895430006 .02 .8889 ACD 2.75384E0006 1 2.753830006 .01 .9239 BCD 1.32067E0008 1 1.3207E0008 .45 .5103 ABCD 2.72443E0005 1 2.724430005 .OO .9760 block 1.09193E0012 6 1.8199E0011 622.69 .OOOO Total error 2.63037E0010 90 2.9226E0008 ...... Total (corr.) 1.12275E0012 111

R-squared = 0.976572 R-squared (adj. for d.f.) = 0.971106 46 interval if sample size was increased. Hence, both threshold and branching direction were considered significant in this analysis. Node selection and priority were not significant. Therefore, it does not matter how one sets node selection and priority since they do not affect response variable- cost significantly.

The most significant factor is threshold. The average cost produced per problem was reduced by 19.5% when a 0.80 threshold is used over a 0.00 threshold (Figure 5.5). Since the optimal solution was not obtained when the number of nodes was the same, a threshold setting of 0.80 should be used on large problems to achieve lower costs.

Another factor which affects cost is branching direction. When a 0.80 threshold was used, there was an average reduction in cost of 0.87% when non-preferned branchng direction was used compared to preferred branching direction (Figure 5.6). The fathoming nodes whlch are least likely to lead to optimal solution approach worked better than quickly getting a feasible solution for large problems. Figure 5.5 Effect of Threshold settings on Cost for Large problems

0 0.8 Threshold Threshold

Figure 5.6 Effect of Branching Direction on Cost at 0.80 Threshold for Large problems

Preferred Non-preferred Branching Branching Direction Direction 5.4 Selection of Best Approach

For small problems it does not matter how one sets the branching direction and node

selection and for large problems it does not matter how one sets the node selection and

priority. The best approach for both small as well as large problems is:

Small problems - Default priority, non-preferred branching direction and best estimate at

0.00 threshold

Large problems - Default priority, non-preferred branching direction and best estimate at

0.80 threshold

Both node depth and best estimate node selection strategy do not significantly affect

small and large problems. Hence one can use node depth strategy also. For example, solvers other than Cplex may not have the best estimate option, so they would require the node depth option.

5.5 Comparison

In this section, results obtained by Jariwala's algorithm are compared to Kanya's results.

The difference between the two algorithms are the identification of the initial solution, node selection and priorities for branching variable. The new proposed algorithm's flowchart is shown in Figure 5.7. The number of nodes required was reduced by 14.37% , Set Branching Direction based on QAP Layout for each department pair

Set feasible solution limit to 1

Set Depth First node selection strategy

Optimize to obtain Initial Solution

Set node limit to 100,000 and feasible solution limit to 1500

v Set Best-Estimate node selection Strategy

* Set Default Priority for variable selection and branching direction as above

---- Optimize to obtain optimal solution

Figure 5.7 New MIP-Mixed Integer Programming Algorithm for DLP 50 on average by the Jariwala's algorithm as compared to Kanya's algorithm for the small problem (Table 5.5).

Problem Kanya's result Jariwala's result Percent No. of Nodes No. of Nodes Improvement tam5 105 115 -9.52 tam6 244 217 1 1.07 tam7 1746 1242 28.87 tarn8 12606 12204 3.19 d8-1.1 4997 4212 15.71 d9-1.1 7064 5736 18.80 data063 12579 10052 20.09 dl0- 1.4 44095 32300 26.75

Table 5.5 Comparison of number of nodes for small problems

For large problems where the optimal solution was not reached and the threshold of 0.80 was used, the new Jariwala's algorithm required on average 0.84% lower cost as compared to Kanya's algorithm (Table 5.6). The number of nodes required was increased . on average by 17.33% (Table 5.7). However, this result is skewed by one bad result, the other 8 problems had a 35.75% reduction in average number of nodes. On very large problems- datal25a and data203a, solutions were not obtained on all the 16 different combinations because of memory limitations. Therefore, they were not included in the analysis of variance for the large problem. Kanya's algorithm could not find solution for the data203a problem because running out of memory. Since her algorithm uses the default parameters of Cplex, enormous computation is required for very large problems.

The data205a was the only test problem for which a solution was not obtained.

The block diagram for data123a obtained using Jariwala's algorithm is shown in Figure Problems Int. Kanya's Int. Jariwala's Int. Percent Var. algorithm Var. algorithm Var. Improve- cost cost ment dll-1.1 55 546.86 11 542.65 11 0.76 d8-2.1 56 1628.3 13 1628.3 11 0.00 cutree 12 66 33360.38 13 30994.29 14 7.09 tam12 66 1086.85 15 1087.05 14 -0.0 1 data065 75 2190.12 15 2190.12 15 0.00 tam1 5 105 2299.56 19 2290.1 1 2 1 0.4 1 tam20 123 4543.6 24 4447.24 25 2.12 armour20 174 244397.72 34 247229.4 1 3 5 -1.15 data123a 103 7063.4 1 24 7093.98 22 -0.43 datal25a 330 12039 66 12271.10 67 -0.3 1 data203a 422 - 12903.26 85

Table 5.6 Comparison of cost for large problems

Problems Kanya's Jariwala's Percent algorithm algorithm Improve- No. of Nodes No. of Nodes ment dl 1-1 .l 165 153 7.27 d8-2.1 86 3 1 63.95 cutree 12 729 306 58.02 tam 12 355 174 50.98 data065 349 339 2.86 tarn1 5 934 5559 -495.18 tam20 829 1 3734 54.96 mow20 39613 25373 35.94 data123a 1307 682 47.8 1 datal25a 100000 100000 0.00 data203a - 100000

Table 5.7 Comparison of nodes for large problems Figure 5.8a Block Diagram for data123a - Time Period 1

Figure 5.8b Block Diagram for data123a - Time Period 2 Figure 5.8~Block Diagram for data123 - Time Period 3

5.5 Summary

The test problems were classified into small problems and large problems based on the number of integer variables and optimality. Analysis of variance (ANOVA) was performed for both these groups to detect significant factors affecting cost and nodes. The recommended algorithm uses a best estimate node selection strategy and a default priority setting of Cplex for branching variables where branching direction is in its most likely incorrect value. 54 Small problems were solved optimally without prespecifling integer variables. When

80% of the integer variables were prespecified, there is no possibility of achieving better cost. Prespecifying integer variables reduces the number of nodes searched significantly but there is slight increase in cost for small problems. Since cost is more important than the number of nodes searched, there is no need to need to prespecify integer variables.

Large problems reached the node limit when no integer variables are prespecified. The solutions obtained when 80% of the integer variables are prespecified are better than those obtained when no integer variables are prespecified. Chapter 6

Conclusion and Recommendations

6.1 Conclusions

A dynamic layout problem generates a series of static layouts each representing the facility at a unique point of time. It attempts to minimizes the sum of flow cost of each

layout and relayout cost for changing from one layout to another.

A two-stage algorithm solves layout problems using MIP in the second stage. The number of integer variables required in the second stage of DLP limits the size of the problem that can be solved. This MIP utilizes a branch and bound algorithm to solve the problem. The approach used for making the branch and bound algorithm more efficient was successfully implemented. For small problems, the number of nodes searched was reduced by 14.37% and for large problems the total cost was improved by 0.84% compared to the previous algorithm.

6.2 Future Recommendations

(1) The entire code for the dynamic layout problem is programmed in Fortran 77. It could be rewritten in C, which is a more advanced language than Fortran. Since Cplex is also written in C, the Cplex interface would be simpler. In C, memory can be freed at a 56 later stages of optimization, so that problems which are unsolvable at the present time might avoid memory constraints and reach optimal solution.

(2) The program could be interfaced with AMPL modeling software. AMPL can generate the specific problem from algebraic formulas and a problem data file.

(3) In the dynamic layout model, a few more constraints could be added such as multiple floors and L - shaped departments. This would increase the number of variables, but the same algorithm could be used.

(4) The entire program can be made Openwindows (1991) based permitting more friendly input, menu-driven operations and graphical output.

(5) The program could incorporate intelligent rules so that automatically the most appropriate threshold values would be selected and the best solution available would be found. Therefore one would not have to try running the program several times at different threshold to obtain the best cost. For example, the larger problems with less then 100 integer variables had slightly lower costs at 0.00 threshold than the reported values at 0.80 threshold.

(6) One could develop input and output files which could integrate with Computer

Integrated Manufacturing (CIM), simulation, and CAD and other manufacturing software systems. The CAD interface would generate block diagram output.

(7) Currently, the benchmark problems have a large "MIP gap" between the best found solution and the lower bound (best possible solution). Therefore, one does not know if the current best solution is close to optimal. Run large problems where optimal solution was not reached on a Supercomputer where a large amount of memory is - available. Then one could either find the optimal solution or find a tighter MIP gap. 58 References hour,G.C., Buffa, E.S.," A Heuristic Algorithm and Simulation Approach'to Relative Location of Facilities," Management Science, vol. 9, p.294-309, 1963.

Balakrishnan, Jaydeep, Jacobs, F. Robert, "Solution for the Constrained Dynamic Facility Layout Problem," European Journal of Operational Research, vol 57, p. 280-286, 1992.

Banerjee, P., Montreuil, B., Moodie, C.L., Kashyap, R.L.,"A Modeling of Interactive Facilities Layout Designer Reasoning Using Qualitative Patterns," International Journal of Production Research, vol. 30, p.432-437, 1992.

Bazaraa, M.S.,"Computerized Layout Design: A Branch and Bound Approach, " AIIE Transaction, vol. 7, p. 432-437, 1975.

Conway, Daniel G., Venkataramanan A.," Genetic Search and the Dynamic Facility Layout Problem", Computers , vol. 2 1, p.950-960, 1994.

Cplex Optimization, "Using the Cplex Callable Library", Cplex Optimization, Inc., Incline Village, NV, 1994.

Francis, R.L., McGinnis, Jr. L.F., White, J.A., Facility Layout and Location, An Analytical Approach, Prentice-Hall Inc., Englewood Cliffs, NJ, 2nd ed., 1992.

Gilmore, P.C., "Optimal and Suboptimal Algorithms for the Quadratic Assignment Problem," SIAM Journal, vol. 10, p.305-3 13, 1962. 59 Hales, L.H., Computer-Aided Facilities Planning, Marcel Dekker Inc., New York, NY,

Heragu, S.S., Kusiak, A., "Machine Layout: An Optimization and Knowledge-based Approach," International Journal of Production Research, vol. 28, p.6 15-63 5, 1990.

Heragu, S.S., Kusiak, A., "'The Facility Layout Problem," European Journal of

Operational Research, vol. 29, p.229-25 1, 1987. -

Hillier, F.S., "Quantitative Tools for Plant Layout Analusis," The Journal of Industrial Engineering, vol. 14,p.33-40, January-February, 1963.

Hillier, F.S., Liebeman, G.J., Introduction to Operation Research, 5th Edition, McGraw- Hill Publishing Company, New York, NY, 1990.

James, R.W., Alcorn, P.A., A Guide to Facilites Planning, Prentice-Hall, Englewood Cliffs, NJ, 1991.

Kanya, Denise, "Preprocessing Rules for The Dynamic Layout Problem," M.S. Thesis, Industrial & Systems Engineering, Ohio University, Athens, OH 45701.

' Kaufman, L., Broeckx, F., "An Algorithm for the Quadratic Assignment Problem Using Benders' Decomposition," Econornetrica, vol. 25, p.53-76, 1957.

Lacksonen, T.A., "Static and Dynamic Problems with Varying Areas," Journal of the Operational Research Society, vol. 45, p.59-69, 1994. 60 Lacksonen, T.A., Enscore, E. E., "Quadratic Assignment Problem Algorithms for the Dynamic Layout Problem," International Journal of Production Research, vol. 31, p.503- 517, 1993.

Lawler, E.L.,"The Quadratic Assignment Problem," Management Science, vol. 9, p.586- 599,1963.

Lee, R.C., Moore, J.M., "CORELAP- Computerized Relationship Layout Planning," Journal of Industrial Engineering, vol. 18, p. 195-200, 1967.

Montreuil, B., Ratliff, H.D., "Utilizing Cut Trees as Design Skeletons for Facility Layout," IIE Transactions, vol. 21, p. 136-143, 1989.

Montreuil, B., "A Modeling Framework for Integrating Layout Design and Design," In Preprints of Proceedings of the 1990 Material Handling Research Colloquium, Material Handling Institute, Hebron, KY, p.45-58, 1990.

Nicole, L.M., Hollier, R.H., "Plant Layout in Practice," Material Flow, vol. 1, p. 101 - 107, 1993.

Pardalos, P.H., Crouse, J.V., "A Parallel Algorithm for the QAP" In Proceedings of the 1989 Supercomputer Conference, ACM Press, New York, NY, p.35 1-360, 1989.

Rosenblatt, M.J.," The Dynamics of Plant Layout," Management Science, vo1.32, p.76- 85, 1986.

Seehof, J.M., Evans, W.O., "Automated Layout Design Program," Journal of Industrial Engineering, vol. 18, p.690-695, 1967. 6 1 Statgraphics, "Statistical Graphics System by Statistical Graphics Corporation," Statistical Graphics Corporation, Cambridge, MA, 1993.

Sun Microsystems,"DeskSet Reference Guide," Sun Microsystem Inc., Mountain View, CA, 1991.

Tam, K.Y., "A Algorithm for Allocating Space to Manufacturing Cells," International Journal of Production Research, vol. 30, p.63-87, 1992.

Tam, K.Y., Li, S.G., "A Hierarchical Approach to the Facility Layout Problem." International Journal of Production Research, vol. 29, p. 165- 184, 1990.

Tompkins, J.A., White, J.A., Facilities Planning, Wiley Publ., New York, NY, 1984.

Urban Tim, "Computational Performance and Efficiency of Lower-Bound Procedures for the Dynamic Facility Layout Problem", European Journal of Operational Research, vol. 57, p 271-279, 1992. Appendix A The following input files are problems used in the initial and final testing. The format of the input files is as follows: - Problem name - Boolean values for Are department in intial layout order? Input renovation cost by department? Use preprocessing rules? Use flow between inputloutput stations?

- The width to height ratio for a department - The department numbers - Department areas - Relocation cost per unit area - Triangular flow matrix

Appendix B Problem QAP Default QAp Difference Difference Directions Parameter of Directionsan in Cost in Cost and Cplex d between between A Diagonal for Diagonal Aand C and B dept. in y- branching dept. in x- direction direction - B direction A C tam5 133.41 133.41 133.41 0.00 0.00 tam6 251.13 251.13 251.13 0.00 0.00 tam7 320.78 320.78 320.78 0.00 0.00 tam8 560.82 480.98 542.38 3.28 14.23 d8-1.1 569 601.37 569 0.00 -5.68 d8-1.2 596.85 596.85 596.85 0.00 0.00 d9-1.1 559.37 561.03 514.31 8.05 -0.29 d9-1.2 790.49 563.32 676.28 14.44 28.73 d9-1.3 941.4 941.4 941.4 0.00 0.00 data063a 903.27 848.24 893.32 1.10 6.09 d10-1.1 1221.69 1221.69 122 1.69 0.00 0.00 d10-1.2 1052.64' 1052.64 1052.64 0.00 0.00 dl 0-1.4 994.68 994.68 994.68 0.00 0.00 dl 0-1.3 1047.18 1047.18 997.7 4.72 0.00 dl 1-1.1 753.4 753.4 753.4 0.00 0.00 dl1 1.2 1402.66 1402.66 1402.66 0.00 0.00 d82.l 2354.63 2612.96 1805.79 23.30 -10.97 cutree 12 36375.57 36375.57 36375.57 0.00 0.00 d12-1.2 1832.08 1625.42 2388.65 -30.37 1 1.28 d12-1.3 1337.31 1337.3 1 1337.31 0.00 0.00 d12-1.4 1395.05 1395.05 1395.03 0.001 0.00 data065a 3026.14 2588.85 3 168.25 -4.69 14.45 tam1 5 3376.87 2896.33 3304.86 2.13 14.23 tarn20 7073.92 4936.52 7107.15 -0.46 30.21 armour20 4071 19.53 268980.19 406994.53 0.030 33.93 data123a 11263.17 8878.06 974 1.79 13.50 21.17 datal25a 17683.82 16153.77 16326.7 7.67 8.65 Average 1.58 6.14

Comparison of three different Initial Solution Algorithms Cost of Initial Solution Problems Best Best Percent Percent Bound Estimate Difference Difference Cost Nodes Cost Nodes Cost Nodes tams-D 98.14 105 98.14 117 -1.90 taril5-L 98.14 105 98.14 117 -1.90 tt~n7-D 260.30 1746 260.30 1242 28.86 tm7-L 260.30 1746 260.30 1242 28.86 tm8-D 390.03 12494 390.03 11884 4.88 tm8-L 390.03 4013 390.03 9200 -129.25 d10-1.4-D 888.06 13162 888.06 3825 25.35 d10-1.4-L 888.06 13162 888.06 3 825 25.35 tam1 5-D 2896.33 100077 2272.74 100077 21.53 taml5-L 2388.04 100031 2272.74 100031 4.82 data065-D 2149.09 100000 2144.56 100000 -21 data065-L 2145.59 100000 2 144.56 100000 .04 Average 6.65 -2.46

D - Initial solution - default parameters of Cplex for branching direction I,- Initial solution - QAP direction and diagonal departments in x-direction

Comparison between Best-bound and Best-estimate node selection strategies Problem Default Strong Percent Percent Option Branching Difference Difference Cost Node Cost Nodes Cost Nodes tam5 98.14 117 98.14 117 0.00 tam7 260.30 1242 260.30 1895 -52.57 tam8 390.03 9200 390.03 18579 -101.94 d10-1.4 888.06 9825 888.06 24370 -148.04 tam15 2272.74 100031 2275.26 100031 -0.1 1 data065a 2144.56 100000 2145.35 100000 -0.03 Average -0.07 -75.63

Comparison between default option and strong branching variable selection strategies

Appendix C * DYNAMIC LAYOUT PROBLEM ALGORITHM * * CmATED BY TOM LACKSONEN - 61319 1 * AT THE PENNSYLVANIA STATE UNIVERSITY * REVISION 1 BY DENISE KANYA PREPROCESSING RULES * REVISION 2 BY ANISH JARIWALA CPLEX CALLS * STAOE 1 - CUTTING PLANE ROUTINE TO FIND BEST ARRANGEMENT * * STAGE 2 - MILP TO FIND DEPARTMENT COORDINATES * * * ...... * VARIABLES: * F(MX,MX,MT): FLOW MATRIX FOR EACH TIME PERIOD * * D(MX,MX): DISTANCE MATRIX BETWEEN LOCATIONS * DEPT(MX,MT): DEPARTMENT NUMBERS FOR EACH TIME PERIOD * P(MXT): PERMUTATION ARRAY: STORES FIRST PERMUTATION CALC'D * P(1) = J IF FACILITY I HAS BEEN ASSIGNED TO LOC. J BESTP(h4XT): BEST PERMUTATION: HOLDS BEST CURRENT PERMUATION * LDEP(MXT): INVERSE OF P, LDEP(J) = I * RCOST(MX,MT):RENOVATION COST FOR EACH DEPARTMENT * FCOST, RTCOST: FINAL FLOW AND RENOVATION COSTS * * AREA(MX,MT): AREA FOR EACH DEPARTMENT * BX, BY: COORDINATES OF CORNER OF BUILDING 1 * (XL,YL)-(XU,YU): FINAL COORDINATES OF EACH DEPARTMENT * * ...... INTEGER SCALARS: * N: NUMBER OF DEPARTMENTS * NT: NUMBER OF TIME PERIODS * * CONSTANTS(PARAh4ETER VALUES): a * MX: MAXIMUM PROBLEM SIZE * * MT: MAXIMUM TIME PERIODS t * MXT: MX*MT * ...... C PROGRAMDLP C DOUBLE PRECISION TIMEl(4),TIME2(4),TIME3(4) PARAMETER(h4X = 30,MT=J,MXT=150,ICL=9999) * CAUTION: MXNODE SHOULD BE EVENLY DIVISIBLE BY NPROCS INTEGER F(MXmMT),D(MX,MX),DEPT(MX,MT),P(MXT) INTEGER VARNO(ICL),PRIORITY(ICL),UPDOWN(ICL) REAL RCOST(mMT),AREA(MXMT),WMXT),XU(MXT),YUMX),W(W), +XC(MXT),YC(MXT) CHARACTER*20 FN LOGICAL LIN,LRULE,LINOUT * INITIALIZE VARIABLES TIME=DTIME(TARRAY) * PROMPT USER FOR OUTPUT DATA FILE NAME WRITE(6,lO) 10 FORMAT (23H ENTER OUTPUT FILE NAME) READ (S,*)Fh' OPEN (7,FILE=FN) * INPUT PROBLEM SIZE: N,NT, THE MATRICES F, DEPT, AREA, RCOST CALL INPUTR(N,NT,F,AREA,DEPT,RCOST,RATIO,LIN,LRULE,LINOUT) CALL DEPTSORT(N,NT,F,DEPT,AREA,RCOST,FN) CALCULATE THE DISTANCE MATRIX D CALL DIST(N,NT,AREA,D,BXBY) * USE CUTTING PLANES TO FIND OPTIMAL ARRANGEMENT CALL QAPH3(N,NT,F,D,DEPT,RCOST,P,OBJ,TRCOST) * PRINT OUT THE OPTIMAL ASSIGNMENT WRITE(7.22) WRITE(7,23) (I,P(I),I= l,NT*N) WRITE(7,24) OBJ C C ASK USER FOR A LIMIT WRITE(*,*) 'ENTER A PERCENT OF VARIABLE TO PRESPECIFY' WRITE (*,*) 'BETWEEN 0.0 AND 1.0' READ (5,*) PCT WRITE(7,*)'RULES ARE BEING USED= ',PCT * MAKE AND SOLVE MIXED INTEGER LINEAR PROGRAMMING PROBLEM CALL MAKEMPS(N,NT,F,AREA,RATIO,P,DEPT,BX,BY,LINOUT, +NCOL,NROW,NINT,PCT,VARNO,PRIORITY,UPDOWN,NC,IV) CALL RUNCPX(N,NT.XL,XU,YL,WWXCCYCCPCOST,NNODE,LINOUT, +VARNO,PRIORITY,UPDOWN,NC,IV) * PRINT OUT FINAL DEPARTMENT LOCATIONS WRITE(7,25) WRITE(7.26) DO 2222 I= 1,NT.N WRITE(7,27)I,WI),YYI),~(I),~(I) 2222 CONTINUE IF (LINOUT) THEN WRITE(7.33) DO 3333 I=l,N*NT WRITE(7,34)I,XC(I),YC(I) 3333 CONTINUE ENDIF TCOST=FCOST+TRCOST WRITE(7,28) FCOST WRITE(7.29)TRCOST WRITE(7,30) TCOST WRITE (7,3 1) NNODE WRITE (7.32) NCOL,NINT,NROW TIME=DTIME(TARRAY) WRITE(7,*) TIME= ',TIME CLOSE(7) 22 FORMAT(l,lOX29HDEPARTMENT- OPTIMAL LOCATION) 23 FORMAT(1 lX,I5,2X,2H--,2YI3) 24 FORMAT(/,lOX,30HCOST OF THE OPTIMAL ASSIGNMENT,ZX,FI2.2,/) 25 FORMAT(I,SX,24HTHE OPTIMAL LAYOUT FOUND) 26 FORMAT(47HDEPT. NO. WYL) O(U,YU)) 27 FORMAT(IS,4(2XF10.3)) 28 FORMAT(I.5X19HFLOW COST IS .F12.2) 29 FORMAT(5Xl9HRENOVATION COST IS ,F12.2) 30 FORMAT(SX19HTHE TOTAL COST IS ,F12.2) 3 1 FORMAT (1.17.15H NODES SEARCHED) 32 FORMAT (17,l OH VARIABLES,I7,15H INT. VARIABLES,I7, 12H CONSTRAINTS) 33 FORMAT(/, I OX2 lHDROP,PICK COORDINATES) 34 FORMAT(I5,2(2X,F10.3)) END **QAF'H3***Z***l************************I**Z***********L***************b* * C VARIABLE LIST C INPUT: C N NUMBER OF DEPARTMENTS C NT NUMBER OF TIME PERIODS C A FLOW BETWEEN DEPARTMENTS MATRICES FOR NT TIME PERIODS C B DISTANCEMATRIX C RCOST COST TO REARRANGE DEPARTMENT I IN TIME T C DEPT ACTUAL DEPARTMENT NUMBERS C OUTPUT: C OPE BEST PERMUTATION WITH COST OL C INTERNAL: C OP CURRENT SOLUTION THIS REPETITION WITH COST UBl C AF' CURRENT SOLUTION FROM PAIRWISE EXCHANGE C A2 SUM OF DEPARTMENT FLOWS FOR ALL TIME PERIODS C H1 ORDER TO SEARCH LOCATIONS FOR EXCHANGE C LAMBDA NEW SEARCH DIRECTION C AREAL ALPHA VALUES BASED ON C MATRIX C DCOST COST TO REARRANGE LOCATION I FROM TIMES T TO T+l C ITERATION R OF MITER: REPITITION IREP OF REP C SUBROUTINE QAPH3 (N,NT,A,B,DEPT,RCOST,OPE,OL,TRCOST) IMPLICIT INTEGER(A-2) PARAMETER(MX=30,MXX=900,MT=5,MXT=150) INTEGER A(mmMT),B(mW.OPE(~).C(W1(W,H2(MX), C AF'(W,oP(W,DEPT(WMT),LDEP(MXT),AZ(MXW REAL AREAL@4XX), LAMBDA(h4XX),RCOST(MX,MT),DCOST(MX,MT) REAL BETGOLUBI ,TRCOST c------.----.------MITER = 3*N IF (N.GT.20) MITER=50 NTN=NT*N NN=N*N IF (N.LE. 10) THEN REP= 1 ELSE REP = 8 END IF R = 0 IREP = 1 OL = 1.OE10 c------.---.------. C *** COMPUTATION OF THE CONSTANTS C C(1.J) = N*(MAX A(I,K))*(MAX B(J,L)) C DO 105 l=N,l,-1 FMAX = 0 DMAX = 0 DO 104 K = l,N A2(I,K)=O DO 103 T=l,NT A2(I,K)=A2(I,K)+A(I,yT) 103 CONTINUE DE = B(1.K) IF (AZ(I,K).GT.FMAX) FMAX = AZ(1,K) IF (A2(K,I).GT.FMAX) FMAX = AZ(K,I) IF (DE.GT.DMAX) DMAX = DE 104 CONTINUE Hl(1) = FMAX H2(I) = DMAX 105 CONTINUE IZAEHL=O DO 108 1 = l,N DO 108J=l,N IZAEHL=IZAEHL+l C(IZAEHL) = N*HI(I)*HZ(J) 108 CONTINUE c------.------.------.------C *** DETERMM ATION OF THE RANDOM START PERMUTATION C 100 CALL ZUFALL(N,NT,OP) DO 109 I = 1,NN LAMBDA(I)=O 109 CONTINUE C C *** COMPUTATION OF THE CORRESPONDING OBJECTIVE FUNCTION VALUE C 110 CONTINUE UB 1=0. IF (NT.EQ.1) GOT0 11 1 DO 113 I= l,N I1 =OP(I) DO 113 K = 1,NT-I IF(DEPT(I,K).EQ.DEPT(I,K+I)) THEN DCOST(Il,K)=AMAXl(RCOST(I,K+l>RCOST(I,K),O.) ELSE DCOST(I1 ,K)=RCOST(I,K+l) ENDIF UBl=UBl+DCOST(I 1,K) 113 CONTINUE 111 IBl=O DO 115I= l,N DOllSK=l,N OPI=OP(I) OPK=OP(K) IB 1 = IB l+A2(I,K)*B(OPI,OPK) 115 CONTINUE UJ3 I =UB 1+FUIAT(IB 1) C C *** FIND LDEP - INVERSE OF OP C DOl12K= l,NT NKl=N*(K-1) DO112I= l,N L=OP(I)+NKl LDEP(L)=I 112 CONTINUE C C *** PAIRWISE EXCHANGE C IF (R.EQ.l) GOT0 150 IZAEHL=l DO120K=I,NT . DO 120 I=l,N AP(IZAEHL)=OP(I)+N*(K-1) IZAEHL=IZAEHL+l 120 CONTINUE CALL REIHEN (N,NT,M,B,AP,Hl.LDEP) C PRINT *,'ORDER FROM REIHEN' C WRITE (6,99)(Hl(I),I=l,N) 99 FORMAT(2014,/) CALL EXCHG (N,NT,GB,UBl,AP,HI,LDEP,DEPT,RCOST,DCOST) IF (UB1.GE.OL) GOT0 150 OL = UBI DO 117 I=L,NTN OPE(1) = AP(1) 1 17 CONTINUE 150 R=R+l IF (R.GT.MITER) GOT0 800 c ----- C *" DETERMINATION OF THE NEW CUT C ALPHA = 0 IZAEHL = 0 DO 170 I=l,N DO170J=l,N IZAEHL = IZAEHL + 1 SP = 0 DO 160 K=l,N OPK = OP(K) SP = SP+(M(K,I)+A2(1,K))*B(OPK,J) 160 CONTINUE IF (J.NE.OP(1)) GOT0 165 CC = C(IZAEHL) SP = SP+CC ALPHA = ALPHA + CC 165 AREAVIZAEHL) = FLOAT(SP) 170 CONTIFUE c ------A - C *** HEURlSTIC SOLUTION OF THE RESTRICTED MASTER PROBLEM C DETERMINATION OF BETA AND OF THE VECTOR LAMBDA(1) C CALL LSAPR(N,AREAL,BETA,OP) LBB = IFIX(BETA)-ALPHA BETA = FLOAT(LBB) IF (BETA.LT.0.) BETA = -BETA IF (BETA .EQ. 0.) BETA = 1. DO 180 I=l,NN LAMBDNI) = LAMBDA(I)+AREAL(I)BETA 180 CONTINUE C C *** FOR R=l IS LBB THE EXACT SOLUTION OF THE RESTRICTED MASTER C PROBLEM C IF (R.EQ. 1) GOT0 110 CALL LSAPR(N,LAMBDA,BETA,OP) GOT0 110 C C *** INCREMENT IREP COUNTER AND PRINT OUT SOLUTIONS AT END C 800 CONTINUE IREP = IREP + 1 R=O IF (1REP.LE.REP) GOT0 100 TRCOST=O. IF (NT.EQ. 1) GOT0 900 DO 190 I = 1,N DO 190 K = 2,NT I1=OPE(I+N8(K-2)) I2=OPE(I+Nt(K-1 )) lF(DEPT(I,K).EQ.DEPT(I,K-l).AND.Il+N.EQ.I2)THEN TRCOST=TRCOST+AMAXl(RCOST(I,K)-RCOST(1.K-l),O.) ELSE TRCOST=TRCOST+RCOST(I,K) ENDIF 190 CONTINUE 900 RETURN END ...... * DETERMINATION OF A RANDOM PERMUTATION ...... SUBROUTINE ZUFALL(N,NT,PARTPE) PARAMETER (MX=30) INTEGER PARTPE(MX) real rand LoGrcAL MENGE(W C-- DO 3570 JZE=l,N MENGE(JZE) = .FALSE. 3570 CONTINUE NMK = N DO 3520 IZE=l,N r = rand(5673) AZ = FLOAT(NMK)*R J = IFIX(AZ) + 1 IF(IZE.EQ. 1) GO TO 3590 IZAEHL = 0 DO 3530 IZ=l,N IF(.NOT. MENGQIZ)) IZAEHL = IZAEHLt 1. IF(1ZAEHL.EQ.J) GO TO 3540 3530 CONTINUE 3590 IZ= J 3540 PARTPE(IZE) = IZ MENGE(IZ) = .TRUE. NMK = N-IZE 3520 CONTINUE RETURN END ...... * SOURCE: NYHOFF & LEESTMA 1983, P369 FUNCTION RAND(K) INTEGER K,M,CONSTl REAL RAND.CONST2 PARAMETER (CONST1 = 2147483647, CONST2 = ,4656613E-9) SAVE DATA M 101 BEGIN IF(M.EQ.O)M=K M = M 65539 IF (M .LT. 0) M = (M + 1) + CONSTI RAND = M CONSTZ END ...... *** DETERMINATION OF A GOOD START SEQUENCE FOR THE PAIRWISE EXCHANGE * ALGORITHM, RETURNED AS LOCATION LIST AI

SUBROUTINE REIHEN (N,NT,AZ,B,PERM,AI,LDEP) PARAMETER(MX=3O,MT=5,MXT=150) INTEGER B(MXMX),AI(W,BJ(MX),AIl(W,BJl(W,LDEp(MXT), C PERM(MXT),WMXW INTEGER SUM NMl=N-1 DO 6710 I = l,N J1 =o 11 = LDEP(1) DO 6720 J = l,N IF (1.EQ.J) GOT0 6720 J1 = J1+1 JJ = LDEP(J) BJ(J1) = AZ(II,JJ)+AZ(JJ,II) 6720 CONTINUE J1 =I DO 6723 J=l,Jl MI()) = J 6723 CONTINUE IF (Jl .EQ. N) GOT0 6728 DO 6726 J=Jl,NMI AIl(J) = J+l 6726 CONTINUE C *** AIl IS RANKING OF LOCATIONS WITH MOST FLOW TO LOCATION I 6728 CALL SSORT (BJ,AIl,NMl) J1 =o DO 6730 J = 1,N IF (1.EQ.J) GOT0 6730 Jl=J1+1 BJ(J1) = B(I,J) + B(J,I) 6730 CONTINUE J1 =I DO 6733 J=l,Jl AI(J) = J 6733 CONTIh'UE IF (J1.EQ.N) GOT0 6738 DO 6736 J=Jl,NMl AI(J) = J+l 6736 CONTINUE C *** AI IS RANKING OF LOCATIONS WITH MOST DISTANCE TO LOCATION I 6738 CALL SSORT(BJ,AI,NMl) SUM=O DO6740 11 = 1,NMl J=N DO 6745 J1 = 1,NMl J=J-1 IF(AI(Jl).EQ.AIl(Il)) GOT0 6740 6745 CONTINUE 6740 SUM=SUM+(NMl-Il)*(NMl-J) C *** SUM IS LARGER FOR SMALL FLOWLARGE DISTANCE COMBINATION 6710 BJl(1) = SUM DO 6760 J=l,N AI(Q = J 6760 CONTINUE CALL SSORT (BJ1.AI.N) RETURN END C ...... C *** PAIR EXCHANGE ALGORITHM C C INTERNAL VARIABLES: C DELTA: REDUCTION IN FLOW FOR PERIOD K FOR EXCHANGE C RDELTA: REDUCTION IN REARRANGEMENT FOR PERIOD K FOR EXCHANGE C COSTI: REARRANGE COST FROM DEPTS J1 TO I2 IN TIMES K TO K+l C COSTJ: REARRANGE COST FROM DEPTS I1 TO J2 IN TIMES K TO K+ 1 C IZAEHL: NUMBER OF EXCHANGES MADE C IBILD,JBILD: LOCATIONS FROM AI ORDERING TO BE EXCHANGED C I1,Jl: DEPARTMENTS IN TIME K WITH NUMBERS I3,J3 C I2,JZ: DEPARTMENTS IN TIME K+l WITH NUMBERS I4,J4 C BEST: BEST EXCHANGE COST FOR IBILD, JBILD C KlBEST,KZBEST: TIME PERIODS TO MAKE EXCHANGE BETWEEN C CHANGE: COST OF EXCHANGING BETWEEN TIME PERIODS K1, K2 C SUBROWTINE EXCHG (N,NT,GB,UBl,PERM,AI,LDEP,DEPT,COST,DCOST) PARAMETER(MX=30,MT=5,MXT=l50) IMPLICIT INTEGER (A-Z) INTEGER A(MXMXMT),B(h.TXW,PERM(m),AI(Mx),LDEP(m), C DEPT(MX,MT),DELTA(MT) REAL COSTI(MT),COSTJ(MT),RDELTA(MT),COST(~MT) REAL BEST, CHANGE, DO, UB1 IT = 0 C *** FIND DELTA FOR EACH OF K PERIODS 1210 IT=IT+ 1 IZAEHL = 0 C *** TRY TO EXCHANGE ALL DEPARTMENT PAIRS W 1220 I = 1,N IBILD = AI(1) DO 1230 J = I+l,N JBILD = AI(J) C *** EXCHANGE LOCATIONS IBILD AND JBILD? DO 1250 K = 1,NT DELTA(K)=O NKl=N*(K-1) I1 =LDEP(IBILD+NKl) Jl =LDEP(JBILD+NKl) DO 1240 L = 1,N IF (L .EQ. I1 .OR. L .EQ. J1) GOT0 1240 JO=L+NKl LB=PERM(JO>NKl DELTA(K)=DELTA(K)+(A(Il ,L.K>A(Jl,L,K))*(B(IBILD,LB) C -B(JBILD,LB))+(A(L,Il ,K>A(L,J 1,K))*(B(LB,IBILD) C -B(LB,JBILD)) 1240 CONTINUE C *** FIND RDELTA FOR EACH OF K-1 PAIRS OF PERIODS RDELTA(K)=O. COSTI(K)=O. COSTJ(K)=O. IF(K.EQ.NT) GOT0 1250 KPl=K+l 13=DEPT(Il,K) J3=DEPT(J 1,K) 12=LDEP(IBILD+K8N) 14=DEPT(IZ,KPl) J2=LDEP(JBILD+K8N) J4=DEPT(JZ,KPl) IF (J3.EQ.14) THEN COSTI(K)=AMAXl(COST(J1,KPl)-COST(I2,K),O.) ELSE COSTI(K)=COST(12,KPI) ENDIF IF (13.EQ.J4) THEN COSTJ(K)=AMAXl(COST(Il,KPl)-COST(JZ,K),O.) ELSE COSTJ(K)=COST(J2,KPl) ENDIF RDELTA(K)=DCOST(IBILD,K)+DCOST(JBILD,K>COSTI(K>COSTJ(K) 1250 CONTINUE C *** FIND EXCHANGE COST FOR PERIODS FROM K1 TO K2 BEST=O. DO 1260 Kl=l,NT DO 1260 K2=Kl,NT CHANGE=O. IF (Kl.GT.1) CHANGE=RDELTA(Kl-I) DO 1270 KK=Kl,K2 CHANGE=CHANGE+FLOAT(DELTA(KK)) 1270 CONTINUE CHANGE=CH,WGE+RDELTA(KZ) C *** KEEP THE BEST EXCHANGE FOUND IF (CHANGE.L.E.BEST) GOT0 1260 KlBEST=Kl =BEST== BEST = CHANGE 1260 CONTINUE C *** MAKE EXCHANGE IF SAVINGS IF (BEST.LE.0.) GOT0 1230 UBl=UBl-BEST IZAEHL = IZAEHL + 1 C *** UPDATE DCOST IF (KlBEST.EQ.1) GOT0 1262 DCOST(IBILD,KlBEST-l)=COSTJ(KlBEST-1) DCOST(JBILD,Kl BEST-l)=COSTI(KIBEST-I) 1262 IF (K2BEST.EQ.KlBEST) GOT0 1266 DO 1264 KK=KlBEST,KZBEST-1 DO=DCOST(IBILD,KK) DCosT(IBILD,KK)=DCosT(JBILD,KK) DCOST(JBILD,KK)=DO 1264 CONTINUE 1266 DCOST(IBILD,KZBEST)=COSTI(1<2BEST) DCOST(JBILD,KzBEST)=COSTJ(KZBEST) C *** UPDATE PERM,LDEP DO 1280 KK = KlBEST,KZBEST NK1=Nb(KK-1) 13=IBILD+NKl J3=JBILD+NKl 14=LDEP(I3)+NKl J4=LDEP(J3)+NKl PERM(I4)=J3 PERM(J4)=13 JO=LDEP(I3) LDEP(I3)=LDEP(J3) LDEP(J3)=JO 1280 CONTINUE 1230 CONTINUE 1220 CONTINUE C *** REPEAT UNTIL NO EXCHANGES MADE IF (IZAEHL .GT. 0) GOT0 12 10 RETURN END C- SUBROUTINE SSORT(A,B,L) IMPLICIT INTEGER(A-2) DIMENSION A(l),B( 1) BEGIN F= 1 IF (L.LE.F) RETURN N2 = (LF+ 1)/2 S = 1023 DO 100 T = 1,10 IF (S.GT.N2) GOT0 90 LS=LS Do 20 I=F,LS IS=I+S AH = NIS) BH = B(IS) J=I JS = IS 5 IF (AH.GE.A(J)) GOT0 10 A(JS) = NJ) WJS) = B(J) JS = J J = J-S IF (J.GE.F) GOT0 5 10 A(JS)= AH B(JS) = BH 20 CONTINUE 90 S=S/2 100 CONTINUE RETURN END ~*LSApR********Lb*******~**bbL*L**b*b**b*******I)*********************b * Linear Assignment Problem * ...... * Source ofcode: * * Assignment and Matching problems: Solution Methods with * * FORTRAN PROGRAMS, BY R.E. BURKARD AND U.DERIGS, 1980. * Parameters: input: * N Dimension of the cost matrix c . C(i) cost matrix (i=l, ..., n*n), stored rowwise output: * ZEILE(1) OPTIMAL ASSIGNMENT (I=l,..., N) z z optimal value 0 * ys(i) optimal dual (row) variables (i=l,..., n) * * yt(i) optimal dual (column) variables (i=l,..., n) * logical array of length n: label(i) Author: U. Derigs 0 * ...... SUBROUTINE LSAPR(N,C,Z.COLUMN) PARAMETER(MX=3O,MXX=9OO,ISUP=999999) REAL C(M)o,Y S(MX),YT(MX),DMINUS(MX),DPLUS(MX) INTEGER ROW(MX),COLUMN(MX),VOR(MX) INTEGER U,US,USI,W,WS,WSI LOGICAL LABEL(MX) C -- c *** start procedure c construction of an initial partial assignment C EPS = 1E-13 SUP = FLOAT(1SUP) do 50i= 1,n row(i) = 0 column(i) = 0 vor(i) =O YS(i) = 0. YT(i) = 0. 50 continue ik = 0 do2i= Ip do 3j = l,n ik=ik+l cc = c(ik) if(i.eq.1) goto 4 IF ((CC-UI).GE.EPS) GOT0 3 4 ui = cc jO=j 3 continue ys(i) = ui if(rowQO).ne.O) goto 2 row(i0) = i column(i) = j0 2 continue do 5j= I,n IF (row(q.EQ.0) YT(0 = SUP 5 continue ik = 0 do6i= 1,n ui=ys(i) do7j = I,n 1k=ik+l vj = yto) IF (VJ.LE.EPS) GOT0 7 cc=c(ik)-ui IF (CC+EPS.GE.VI) GOT0 7 yto) = cc v04) = i 7 continue 6 continue do8j=l,n i= voa) if(i.eq.0) goto 8 if(column(i).ne.O) go to 8 column(i) = j rowo) = i 8 continue do9 i = 1,n if(column(i).ne.O)goto 9 ui = Hi) ~k= (i-l)*n do lOj= 1,n ik=ik+l if (row(j).ne.O) goto 10 cc = c(ik) IF ((CC-UI-YT(J) t EPS).GT.O.) GOT0 10 column(i) = j row(j) = i got0 9 10 continue 9 continue C -- c *** construction of the optimal assignment C do 1000 u = 1,n if (column(u).gt.O) goto 1000 C- - c * ** shortest path computation C us = (u-l)*n do 100i= l,n vor(i) = u label(i) = .false. dplus(i) = sup usi = us + i c IF (YT(I).LT.EPS) YT(1) = 0. dminus(i) = c(usi) - Hu)- yt(i) 100 continue DPLUS(U) = 0. ESCl =O 105 d=sup ESCl = ESCl + 1 IF (ESC 1.GT. 10000) THEN PRINT *,'LSAPRl ESCl GT 10000' WRITE(6,90) (row(I),I= 1,N) WRITE(6,9 1) (DMINUS(I),I=l,N) PRINT *,'N =',N PRINT *,'INDEX =',INDEX GO TO 400 END IF dollOi= 1,n if (label(i)) goto 1 10 IF (DMINUS(I)+EPS .GE.D) GOT0 110 d = drmnus(i) index = i 110 continue if (row(index).le.O) goto 400 label(index) = .true. w = row(index) ws = (w-l)*n dplus(w) = d do 130 i = 1,n if (label(i)) goto 130 wsi=ws+i vgl = d + c(wsi) - ys(w) - Hi) IF (DMINUS(I).LE. VGL+EPS) GOT0 130 dminus(i) = vgl vor(i) = w 130 continue got0 10s c *** augmentation C 400 w = vor(index) ESCl = ESC1+ 1 IF (ESCI .GT. 10000) PRINT *,'LSAPRZ ESCl GT 10000' row(index) = w ind = column(w) column(w) = index if(w.eq.u) goto 500 index = ind goto 400 C c *** transformation c' 500 do510i=l,n if(dplus(i).eq.sup) goto 505 ys(i) = ys(i) + d - dplus(i) 505 IF (DMINUS(I)+EPS.GE.D) GOT0 5 10 yt(i) = yt(i) + dminus(i) - d 510 continue 1000 continue C c *** computation of the optimal value C z=o. do 2000 i = 1,n is = (1-1)*n j = column(i) isj = is + j z = z + c(isj) 2000 continue return 90 FORh4AT(lXROW(INDEx)=', 1514) 9 1 FORMAT(IXDMINUS(INDEX)=', 1514) end 88~pUTR8*8888*88L888t888888888L88*888tt8888888888t8ttC8888888888*888888

8 * THIS ROUTINE READS IN THE INPUT FILE: 8 * N,NT: PROBLEM SIZE • * F: FACILITIES MATRIX I * DEPT: DEPARTMENT NUMBERS ' * AREA: AREAS OF EACH DEPARTMENT t * RATIO: MAX LENGTH-TO-WIDTH FOR DEPARTMENTS • * FN: INPUT FILE NAME * LIN: DOES USER INPUT INITIAL LAYOUT? * LREN: DOES USER INPUT RENOVATION COST BY DEPARTMENT? * LRULE: USER RULES TO REDUCE PROCESSING TIME? * LINOUT: USE FLOW BETWEEN I/0 STATIONS(1NSTEAD OF DEPT CENTROIDS) * THIS ROUTINE CALCULATES RCOST AS COST8AREA FOR EACH DEPARTMENT * ...... SUBROUTINE INPUTR(N,NT,F,AREA,DEPT,RCOST,RATIO,LIN,LRULE,LINOUT) IMPLICIT INTEGER(A-Z) PARAMETER (IN=09,MX=30,MT=S,MXT= 150) DIMENSION F(MX,MX,MT),DEPT(hKMT) REAL RATIO, COST, AREA(MX,MT), RCOST(MX,MT), DCOST(MXT) LOGICAL LIN,LREN,LRULE,LINOUT CHARACTER820 FN BEGIN * PROMPTS USER FOR INPUT FILE NAME WRITE (6,20) 20 FORMAT (22H ENTER INPUT FILE NAME) READ (5.*)FN OPEN (9,FILE=FN) * USER INPUT COMPLETED READ (UNIT = IN, FMT = *) N,NT READ (IN,*) LIN,LREN,LRULE,LINOUT READ (IN,*) RATIO ND=O DO 10 K=l,NT READ (IN,') (DEPT(I,K), I= I ,N) DO 10 I = l,N IF (DEPT(I,K).GT.ND) ND=DEPT(I,K) 10 CONTINUE DO 11 K= l,NT READ (IN,*) (AREA(I,K),I=I,N) 11 CONTINUE DO 12 1 = l,N RCOST(I,l)=O. 12 CONTINUE IF (NT.EQ.1) GOT0 17 IF (LREN) THEN READ (IN,*) (DCOST(I), I=I,ND) DO 13K= l,NT DO 13 I = l,N RCOST(1,K) = DCOST(DEPT(I,K))*AREA(I,K) 13 CONTINUE ELSE REWIN,*) COST DO 14 K = 1,NT DO 14 I = l,N RCOST(1,K) = AREA(I,K)*COST 14 CONTINUE ENDIF 17 DO 16K= I,NT DO 16 I=2,N 16 READ (IN,*) (F(I,J,K),J = 1,I-1) DOlSK=l,NT DOlSI=l,N DO lSJ=I.N F(I,J,K)=O I5 CONTINUE CLOSE (9) RETURN END ...... * REARRANGE DEPARTMENTS ENTERING LAYOUT TO MINIMIZE DIFFERENCE IN * FLOWS FROM ENTERING DEPARTMENTS TO EXISTING DEPARTMENTS * * A2: TEMPORARY AREAS R2: TEMPORARY REARRANGEMENT COSTS F2: TEMPORARY FLOW MATRIX D2: TEMPORARY DEPARTMENT NUMBERS * NEWDPT:ELEMENTS OF DEPT WITH ENTERING DEPARTMENTS C: DIFFERENCE IN FLOWS FOR DEPT I VS PREVIOUS DEPT IN LOC J VECTORIZED INPUT TO LSAPR * ORD: REARRANGED LOCATIONS FOR NEW DEPARTMENTS - OUTPUT OF LSAPR ORDER: REARRANGED LOCATIONS FOR ALL DEPARTMENTS

* CALLS LINEAR ASSIGNMENT PROBLEM SUBROUTINE LSAPR * PRINTS REARRANGED F, AREA AND DEPT MATRICES * SUBROUTINE DEPTSORT(N,NT,F,DEPT,ARE4RCOST,FN) IMPLICIT INTEGER(A-Z) PARAMETER(MX=30,MT=s,MR=lO,MRR=100) DIMENSION F(h4X,MX,MT),DEPT(MX,MT),F2(MXMxMX),D2(MX), C ORDER(MR),ORD(MX),NEWDPT(MR) REAL C(MRR),AREA(MXMT),A2(MX),Z,RCOST(MXMT),RZ(Mx) CHARACTER'20 FN DO 900 K=2,NT C FIND NEW - NUMBER OF ENTERING DEPARTMENTS FOR NEWDPT NEW=O DO 100 I=l,N IF (DEPT(I,K).EQ.DEPT(I,K-1))GOT0 100 NEW=NEW+l NEWDPT(NEW)=I 100 CONTINUE IF (NEW.LT.2) GOT0 900 C FIND C VALUES NC=1 DO 220 Il=l,NEW I=NEWDPT(Il) DO220 Jl=l,NEW J=NEWDPT(Jl) DELTA=O DO 230 D(=l,N DO 240 IY=l,NEW IF (IX.EQ.NEWDPT(IY)) GOT0 230 240 CONTINUE DELTA = DELTA+ABS(F(J,IX,K)+F(IX,J,K) . C -F(I,IX,K-l>F(KI,K-I)) 230 CONTINUE C(NC) = FU)AT(DELTA) NC=NC+l 220 CONTINUE C CALL LINEAR ASSIGNMENT ROUTINE CALL LSAPR(NEW,C,Z,ORDER) C REARRANGE DEPT, F ARRAYS BASED ON ORDER DO 300 I=l,N ORD(I)=I 300 CONTINUE DO 310 J=l,NEW Jl =NEWDPT(ORDER(J)) ORD(J1 )=NEWDPT(J) 310 CONTINUE C D2, A2, R2 TEMPORARILY STORES UPDATES TO DEPT, AREA, RCOST DO 420 KK=K,NT DO 400 I=l,N D2(I)=DEPT(ORD(I),KK) A2(I)=AREA(ORD(I),KK) R2(I)=RCOST(ORD(I),KK) 400 CONTINUE DO 410 I=l,N DEPT(I,KK)=DZ(l) AREA(I,KK)=AZ(I) RCOST(I,KK)=RZ(I) 410 CONTINUE 420 CONTINUE C F2 TEMPORARILY STORES UPDATE TO F DO 350 KK=K,NT DO 330 I=2,N I l=ORD(I) DO 330 J=1,1-1 J I =ORD(J) F2(1,J)=F(Il,Jl,KK)+F(Jl,II,KK) 330 CONTINUE DO 340 I=2,N DO 340 J=l.I-1 F(I,J,KK)=FZ(I,J) 340 CONTINUE 350 CONTINUE 900 CONTINUE WRITE(7,16)N,NT WRITE(7.19) DO15K= 1,NT DO 14 1 = l,N WRITE (7,2 1) (F(I,J,K),J=l,N) 14 CONTINUE WRITE (7.20) 15 CONTINUE WRITE(7.17) DO 4 K=l,NT WRITE(7,2 1) (DEPT(J,K),J=l.N) 4 CONTINUE WRITE (7,24) DO 1 K=l,NT WRITE(7,23) (AREA(I,K),I=l,N) 1 CONTINUE IF (NT.EQ. 1) GOT0 3 WRITE (7,25) DO 2 K=l,NT WRITE (7,23) (RCOST(I,K)/AREA(I,K), I = 1,N) 2 CONTINUE 3 WRITE (7.20) RETURN * 16 FORMAT(lOXl6HPROBLEM SIZE IS ,215,/) 17 FORMAT(lOX16HDEPARTMENTS USED,/) 19 FORMAT(l,lOX,2OHCOST-MATRICESF(1,Q.I) 20 FORMAT(0 2 1 FORMAT(5X.2013) 23 FORMAT(SFlO.2) 24 FORMAT(/, 10x2IHAREAS-MATRIX BY DEPT.) 25 FORMAT(/,IOX,36HRENOVATIONCOST PER SQ. FT. BY DEPT.) END ...... SUBROUTINE DEPT CALCULATES THE ESTIMATED DISTANCE BETWEEN DEPARTMENTS IN A RECTANGULAR GRID SIZE NX BY NY, NX GE NY. * D = NO. OF DEPARTMENTS APART SQRT(AVERAGE DEPARTMENT AREA) * ALSO RETURNS BUILDING LIMITS, BX BY 1 SUBROUTINE DIST(N,NT,ARE&D,BX,BY) PARAl!ETER(MX=30, MT=S) INTEGER D(MX,MX) REAL AREA(MXMT) C FIND AVERAGE DISTANCE BETWEEN DEPARTMENTS sum=O. do 10 k=l,nt do 10 i=l,n surn=sum+area(i,k)**.5 10 continue avg=sum/float(n8nt) ny=int(.5+n8*.5) nx=int(.99+n8*.5) C FIND CORNERS OF BUILDING BX=2.O*NX*AVG BY=2.0*NYZAVG C FIND LOWER LEFT PORTION OF D MATRIX -COPY BECAUSE D IS SYMMETRIC C LOCATIONS NUMBERED LEFT TO RIGHT STARTING WITH TOP ROW do 100 i=2,n iy=int((i- 1)/nx)+l ix=i-(iy-l)*nx do 100 j=l,i-1 jy=int((i- l)/nx)+ I jx=j(iy-l)*nx d(ij)=int(avg*float(abs(ix-jx)+abs(iy-jy))+.5) dQ,i)=d(i j) 100 continue do 110 i=l,n d(i,i)=O 1 10 continue return end ...... SUBROUTINE MAKEMPS(N,NT,F,ARE&RATIO,P,DEPT,BXBY, +LINOUT,NCOL,NROW,NINT,PCT,VARNO,PRIO~ C NCOL: VARIABLES, NINT: INT. VARIABLES, NROWS: CONSTRAINTS PARAMETER(MX=30,MT=5,MXT=150,IRL=9999,ICL=9999,IEL=80000,MPS=98) DIMENSION DELS(IEL),RHS(IRL),AREA(MX,MT),BOUND(ICL) INTEGER MCOL(IEL),MROW(IEL),P(MXT),DEPT(MX,MT),F(MX,MX,MT) INTEGER FIRST(ICL),SECOND(ICL),DIR(ICL),INEQ(MXT) INTEGER X(MX,MT), Y(MX,MT), MARKER(MX,MX.MT), ID(MX,MX,MT) INTEGER VARNO(ICL),PRIORITY(ICL),UF'M3WN(ICL) LOGICAL LINOUT C INITIALIZE VARIABLES R2=RATI08*.5 Rl=l./R2 RM2=1.-R1 RMl=R2-I. BIG=BX+BY NCOL=O NELS=O NROW=O C ******** LOAD THESE ARRAYS TO FIT MPS FORMAT C ARRAY ELEMENTS ROW MROW, COLUMN MCOL, VALUE DELS C RIGHT HAND SIDES RHS C VARIABLE BOUNDS BOUND C LOAD AREA CONSTRAINTS AND CORNER COORDINATE VARIABLES DO 100 K=l,NT DO 100 I=l,N A2=AREA(I,K)**.5 MROW(NELS+l)=NROW+l MCOL(NELS+l)=NCOL+4 DELS(NELS+l)=l. MROW(NELS+Z)=NROW+l MCOL(NELS+Z)=NCOL+3 DELS(NELS+Z)=-1. MROW(NELS+3)=NROW+l MCOL(NELS+3)=NCOL+S DELS(NELS+3)=R2 MROW(NELS+4)=NROW+l MCOL(NELS+4)=NCOL+6 DELS(NELS+4)=Rl MROW(NELS+S)=NROW+Z MCOL(XELS+S)=NCOL+Z DELS(NELS+S)=l. MROW(NELS+6)=NROW+Z MCOL(NELS+6)=NCOL+l DELS(NELS+6)=-1. MROW(NELS+7)=NROW+Z MCOuNELSA7)=NCOL+S DELS(NELS+7)=-1. MROW(NEU+8)=NROW+Z MCOL(NELS+8)=NCOL+6 DELS(NELS+8)=-1. RHS(NROW+l)=AZbRZ RHS(NROW+Z)=AZ*Rl BOUND(NCOL+l)=l.OE3 1 BOUND(NCOL+Z)=BX BOUND(NCOL+3)=1.OE3 1 BOUND(NCOL+4)=BY BOUND(NCOL+S)=AZ*RMZ BOUND(NCOL+6)=AZ8RM 1 NELS=NELS+I NCOL=NCOL+6 NROW=NROW+Z 100 CONTINUE ICOL=NCOL JROW=NROW IF (LINOUT) THEN C CONSTRAINTS THAT KEEP DROPPICK WITHIN DEPARTMENT C -XC+xU>O C +XC-wo C -YC+YU>O C +YC-YL>O DO 150 K=l,NT Kl=6*Nb(K-1) DO 150 I=l,N II=Kl+6*(I-1) C- C- MROW(NELS+l)=NROW+l MCOL(NELS+ l)=NCOL+l DELS(NELS+l)=-1 MROW(NELS+Z)=NROW+l MCOL(NELS+Z)=II+Z DELS(NELS+Z)=l C MROW(NELS+3)=NROW+2 MCOL(NELS+3)=NCOL+l DELS(NELS+3)=1 MROW(NELS+4)=NROW+Z MCOL(NELS+4)=II+l DELS(NELS+4)=-1 C MROW(NELS+S)=NROW+3 MCOL(NELS+S)=NCOL+Z DELS(NELS+5)=-1 MROW(NELS+6)=NROW+3 MCOL(NELS+6)=11+4 DELS(NELS+6)=1 C MROW(NELS+7)=NROW+4 MCOL(NELS+7)=NCOL+2 DELS(NELS+7)= 1 MROW(NELS+8)=NROW+4 MCOL(NELS+S)=I1+3 DELS(NELS+8)=-1 C DO 140 H=1,4 RHS(NROW+H)=O 140 CONTINUE , NELS=NELS+S NCOL=NCOL+2 NROW=NROW+4 150 CONTINUE JROWl=NROW C C CONSTRAINTS TO PICK XC AND YC DO 175 K=l,NT K1=2*NL(K-1) DO 175 J=2,N DO 175 I=l,(J-1) C- - MROW(NELS+l)=NROW+l MCOLOJELS+1)=(6*N*NT)+K1+2*(1-1)+2 DELS(NELS+l)=l MROW(NELS+2)=NROW+l MCOL@ELS+2)=(6*N*NT)+K1+2*(J-1)+2 DELS(NELS+Z)=l MROW(NELS+3)=NROW+l MCOL(NELS+3)=NCOL+l DELS(NELS+3)=-1 MROW(NELS+4)=NROW+l MCOL(NELS+4)=NCOL+2 DELSINELS+4)= 1

- RHS(NROW+ 1)=0 RHS(NROW+2)=0 C************************************** C THE OBJECTIVE FUNCTION DO 172 H=1,4 MROW(NELS+8+H)=O MCOL(NELS+8+H)=NCOL+H DELS(NELS+S+H)=F(J,I,K) 172 CONTINUE C*************************************** NROW=NROW+2 NCOL=NCOL+4 NELS=NELS+ 12 175 CONTINUE ELSE C C MADFMW CONSTRAINTS, DISTANCE VARIABLES DO 200 K=l,NT K1=Ne(K-1) DO 200 I=2,N II=6*(Kl+I-1) DO 200 J=l,l-1 JJ+*(Kl+J-I) IF (F(I,J,K).EQ.O) GOT0 200 DO 210 L=1,2 NROW=NROW+ 1 DO 230 LL= 1,2 MROW(NELS+LL)=O MCOL(NELS+LL)=NCOL+LL DELS(NELS+LL)=F(I,J,K) 230 CONTINUE DO 220 LL=3,8 MROW(NELS+LL)=NROW 220 CONTINUE MCOL(NELS+3)=11+2*L DELS(NELS+3)= 1. MCOL(NELS+4)=11+2*Ll DELS(NELS+4)= 1. MCOL(NELS+S)=JJ+2*L DELS(NELS+S)=-I. MCOL(NELS+6)=JJ+2*Ll DELS(NELS+6)=-1. MCOL(NELS+7)=NCOL+ I DELSOJELS+7)=-2. MCOL(NELS+8)=NCOL+2 DELS(NELS+8)=2. RHS(NROW)=O. NCOL=NCOL+2 NELS=NELS+8 210 CONTINUE 200 CONTINUE ENDIF IROW=NROW ICOLI =NCOL C LOAD NONOVERLAP CONSTRAINTS, DIRECTION VARIABLES C USER INPUTS WHETHER OR NOT TO USE RULES FOR REDUCING INT. VARIABLES CALL SEPRULES(N,NT,AREA,P,FIRST,SECOND,DIR,NC,F,X,Y,PCT, + PRIORITY,IV) DO 300 I=l,NC II=6*(FIRST(I)-1) JJ=6*(SECOND(I)-I) IF(DIR(I).LT.3) GOT0 350 C ****...... C DETERMINE IF DEPARTMENTS ARE STATIONARY FROM 1 TIME PERIOD TO NEXT C IF THE DEPARTMENT PAIR IS STATIONARY THEN "SAME" IS ASSIGNED A VALUE OF 1 C "SAME" IS THEN USED TO ASSIGN THE SAME INTEGER VARIABLE TO THE DEPARTMENT C PAIR "MARKER" RECORDS WHICH VARIABLE WAS USED IN C THE PREVIOUS TIME PERIOD TO REPRESENT THE DEPARTMENT PAIR KK=((FIRST(I)-l)/N)+l IZ=FIRST(I)-(KK-I)*N JZ=SECOND(I)-(KK-I )*N ID(IZ,JZ,KK)=DIR(I) SAME=O IF (KK.GT. I) THEN IF ((X(IZ,KK).EQ.X(IZ,KK-l)),AND. + (Y(IZ,KK).EQ.Y(IZ,KK-l)).AND. + (X(JZ,KK).EQ.X(JZ,KK-1)).AND. + (Y(JZ,KK).EQ.Y(JZ,KK-l)).AND. + (ID(IZ,JZ,KK).EQ.ID(IZ,JZ,KK-I)))THEN SAME=l NCOL=NCOLl ENDIF ENDlF C ...... C DEPARTMENTS HAVE VARIABLE ORIENTATION NCOL=NCOL+ I DO 310 L=1,3 MROW(NELS+L)=NROW+l 310 CONTINUE DO 320 L=4,6 MROWplELS+LpNROW+2 320 CONTINUE RHS(NROW+ I)=-BIG RHS(NROW+Z)=O. MCOL(NELS+ 1)=JJ+3 MCOL(NELS+Z)=I1+4 MARKER(Iz,JZ,KK)=MARKER(IZ,JZ,KK-1) IF (SAME.EQ.1) THEN MCOL(NELS+3)=MARKER(IZ,JZ,KK) ELSE MCOL(NELS+3)=NCOL MARKER(IZ,JZ,KK)=NCOL ENDIF IF (DIR(I).EQ.3) THEN MCOL(NELS+4)=JJ+l MCOL(NELS+S)=II+Z ELSE MCOL(NELS+4)=II+I MCOL(NELS+S)=JJ+Z ENDIF IF (SAME.EQ. I) THEN MCOL(NELS+6)=MARKER(IZ,JZ,KK) ELSE MCOL(NELS+6)=NCOL ENDIF DELS(NELS+ 1)=1. DELS(NELS+2)=-I. DELS(NELS+3)=-BIG DELS(NELS+4)=1. DELS(NELS+5)=-1. DELS(NELS+6)=BIG NROW=NROW+Z NELS=NELS+6 GOT0 300 C DEPARTMENTS HAVE FIXED ORIENTATION 350 NROW=NROW+I MROW(NELS+l)=NROW MROW(NELS+Z)=NROW RHSg\rROW)=O. DELS(NELS+I)=I. DELS(NELS+2)=- I. IF(DIR(I).EQ. I) THEN MCOL(NELS+l)=JJ+l MCOL(NELS+Z)=II+Z ELSE MCOL(NELS+I)=JJ+3 MCOL(NELS+Z)=I1+4 ENDIF NELS=NELS+Z 300 CONTINUE C LOAD STATIONARY DEPARTMENT CONSTRAINTS IROWZ=NROW NS=O IF(NT.EQ. I) GOT0 500 DO 400 K=I,NT-I DO 400 I= I ,N IF(P(I+N*(K-I))+N.NE.P(I+N*K).OR.DEPT(I,K).NE.DEPT(I,K+l)) C GOT0400 DO 410 L=1,4 NROW=NROW+l MROW(NELS+I)=NROW MROW(NELS+Z)=NROW RHS(NROW)=O. DELS(NELS+I)=I. DELS(NELS+Z)= 1. NELS=NELS+2 410 CONTINUE NS=NS+ 1 IF (AREA(I,K).EQ.AREA(I.K+l)) THEN INEWS)=O ELSE INEQ(NS)= 1 ENDIF IF (AREA(I,K).GT.AREA(I,K+l))THEN JJ=6*(N*K+I-1) II=JJ-6*N ELSE II=6*(N*K+I-1) JJ=II-6*N ENDIF MCQL(NELS-7)=II+2 MCOL(NELS-6)=JJ+2 MCOWELS-5)=JJ+1 MCOL(NELS-4)=II+1 MCOL(NELS-3)=II+4 MCOWELS-2)=JJ+4 MCOL(NELS-1)=JJ+3 MCOL(NELS)=II+3 400 CONTINUE C ****************** PUT ARRAY DATA INTO MPS FILE AT UNIT 'MPS' C ROWS DATA 500 OPEN(MPS,FILE=TEMP.MPS') WRITE(MPS.90 1) WRITE(MPS,902) WRITE(MPS,903) IF (LINOUT) THEN DO 502 I=l,JROW WRITE (MPS,904)I 502 CONTINUE DO 504 I=JROW+l,JROWl WRITE (MPS,905)I 504 CONTINUE DO 506 I=JROWl+l,IROW WRITE (MPS.904)I 506 CONTINUE ELSE DO 510 I=l,IROW WRITE(MPS,904)1 5 10 CONTINUE ENDIF DO 520 I=IROW+l,IROW2 WRITE(MPS,905)1 520 CONTINUE IF (NS.EQ.0) GOT0 535 DO 525 I=l,NS DO 525 J=1,4 IROWZ=IROW2+1 IF (INEQ(I).EQ.O) THEN WRITE(MPS,904)IROW2 ELSE WRITE(MPS,905)IROW2 ENDIF 525 CONTINUE C C COLUMN DATA 535 WRITE(MPS,906) DO 530 I=l,NCOL DO 530 J=l.NELS IF(MCOL(J).EQ.I) WRITE(MPS,907)MCOL(J),MROW(J),DELS(J) 530 CONTINUE C RHS DATA WRITE(MPS,908) DO 540 I= 1,NROW WRITE(MPS,909)I,RHS(I) 540 CONTINUE C BOUNDS DATA WRITE(MPS.9 10) DO 550 I=l,ICOL IF (BOUND(I).NE. 1.OE3 1) WRITE(MPS91 l)I,BOUND(I) 550 CONTMUE DO 560 I=ICOLI+l,NCOL WRITE(MPS9 12)1 560 CONTINUE NINT = NCOLICOLI WRITE(MPS,913) CLOSE(MPS) CALL MAKEORD(N,NT,NC,MARKER,FIRST,SECOND,UPDOWN,VARNO, + DIRIV) 901 FORMAT(4HNAME. lOX3HDLP) 902 FORMAT(4HROWS) 903 FORMAT(IX, 1HN,6X, 1HO) 904 FORMAT(lX,IHE,2X,I5) 905 FORMAT(lX,lHG,ZX,I5) 906 FORMAT(7HCOLUMNS) 907 FORMAT(4X,I8,2X,I5,SX,F12.5) 908 FORMAT(3HRHS) 909 FORMAT(4X,4HRHS1,6X,I5,5X,F12.5) 9 10 FORMAT(6HBOUNDS) 91 1 FORMAT(9H UP BOUND,5X,I5,5X,F12.5) 912 FORMAT(9H BV BOUND,SX,IJ) 9 13 FORMAT(6HENDATA) RETURN END ...... C SUBROUTINE MAKEORD IS CALLED BY MAKEMPS C IT GIVES THE PRIORITY ORDER AND BRANCHING DIRECTION FOR INTEGER VARIABLES SUBROUTINE MAKEORD(N,NT,NC,MARKER,FIRST,SECOND,UPDOWN,VARNO, + DIRIV) PARAMETER(MX=3O,MT=5,ICL=9999) DIMENSION MARKER(MX,MX,MT) INTEGER FIRST(ICL),SECOND(ICL),VARNO(ICL),UPDOWN(ICL) INTEGER DIR(1CL) lV=O DO 100 I=l,NC IF (DIR(I).GE.3) THEN IV=IV+ 1 KK=((FIRST(I>l)M)+l IZ=FIRST(I)-(KK-1)*N JZ=SECOND(I)-(KK-1)*N vARNqIV)=MARKER(IZ,Jz,KK) ENDIF 100 CONTINUE NX=INT(.99+N**.5) NY =INT(.5+Nt*.5) IV=O II=O W 200 K=l ,NT DO 200 I=l,N IY=INT((I- I )/NX)+1 IX=I-(IY-l)*NX DO 200 J=I+I,N II=II+l JY=INT((J- l)NX)+ 1 JX=J-(JY- l)*NX IF (DIR(II).GE.3) THEN IV=IV+ 1 IF (ABS(IX-JX).GE.ABS(IY-JY))THEN UPDOWN(IV)=2 ELSE UPDoWN(IV)=l ENDIF ENDIF 200 CONTINUE RETURN END ...... * SUBROUTINE SEPRULES IS CALLED BY MAKEMPS * IT FIXES THE DIRECTION OF NC DEPARTMENT PAIRS FIRST AND SECOND * ACCORDING TO THE FOLLOWING CODE IN DIR: * 1 - FIRST IS LEFT OF SECOND 2 - FIRST IS ABOVE SECOND 3 - FIRST IS LEFT OR ABOVE SECOND 4 - FIRST IS RIGHT OR ABOVE SECOND SUBROUTINE SEPRULES (N,NT,AREAP,FIRST,SECOND,DIRNC,F,XY,PCT, + PRIORITY,IV) PARAMETER (ICL=9999,MXT=15O,MX=30,MT=S) INTEGER P(MXT),FIRST(ICL),SECOND(ICL),DIR(ICL),F(MX,Mx,MT) INTEGER DX(MXT,MXT),DY(MXT,MXT),DXD(MX,MX,MT),DYD(Mx,MX,MT) INTEGER SIZE(MX,MT),R,S,RIGHT(MX,MT),LEFT(MX,MT),UP(MX,MT) INTEGER DOWN(MX,MT),TOTAL(MX,MT),X(MX,MT),Y(MX,MT),COUNTER(MX,MX) INTEGER LOCX(MX),LOCY(MX),PRIORITY(ICL) INTEGER MFACT(ICL),B(ICL) INTEGER LFACTX,LFACTY,NIV,L REAL AREA(MX,MT),SFACT(MX,MX,MT),QXFACT(h4X,MX,MT) REAL FACTX(MX,MX,MT),FACTY(mMX,MT),QYFACT(MX,MX,MT) REAL PULLx(MX,MX,MT),PULLY(MX,MX,MT),PFACTX(Mx,Mx,MT) REAL PFACTY(MX,MX,MT),LIMIT C C VARIABLE DEFINITIONS C C SFACT: FACTOR ASSIGNED ACCORDING TO SIZE COMBINATION C QXFACT: FACTOR ASSIGNED ACCORDING TO QAP SEPARATION IN THE X C DIRECTION C QYFACT: FACTOR ASSIGNED ACCORDING TO QAP SEPARATION IN THE Y C DIRECTION C PULLX: MATERIAL FLOW PULL IN THE X DIRECTION C PULLY: MATERIAL FLOW PULL IN THE Y DIRECTION C PFACTX: FACTOR ASSIGNED ACCORDING TO MATERIAL FLOW PULL C IN THE X DIRECTION C PFACTY: FACTOR ASSIGNED ACCORDING TO MATERIAL FLOW PULL C IN THE Y DIRECTION C FACTX: THE PRODUCT OF SFACT,QXFACT,PFACTX C FACTY: THE PRODUCT OF SFACT,QYFACT,PFACTY - C DEFINING SIZE(1,K) AS BEING SMALLER OR LARGER THAN THE AVERAGE AREA C SMALL=O LARGE=l C LOGICAL VARIABLE SMALL IS TRUE IF LOCATION CONTAINS A SMALL DEPT. SUM=O. DO 100 I=l,N DO 100 K= I ,NT SUM=SUM+AREA(I,K) 100 CONTINUE AVG=SUM/FLOAT(N*NT) DOllOK= l,NT DO lIOI= l,N IF (AREA(I,K).GT.AVG) THEN SIZE(I,K)= I ELSE SIZE(I,K)=O ENDIF 110 CONTINUE c------C ASSIGN A FACTOR VALUE DEPENDENT UPON SIZE, FOR EACH DEPT PAIR DO 150 K=l,NT DO 150 I=I,N DO 150 J=I+ l,N SUM=SIZE(I,K)+SIZE(J,K) SFACT(I,J,K)=0.62 l+(O.O86*(SUM)) 150 CONTINUE c------NX=INT(.99+NZ*.S) NY=INT(.S+N**.S) C FIND COORDINATES OF EACH LOCATION C FIND DISTANCE BETWEEN EACH PAIR OF LOCATIONS DO 200 I=l,N IY=INT((I-l)/NX)+l J.X=I-(IY-I)*NX DO 200 J=I+l,N JY=INT((J-l)/NX)+I JX=J-(JY-l)*NX DX(I,J)=(E-nr) DY(I,J)=(IY-JY) DY(J,I)=-DY(1,J) DX(J,I)=-DX(1,J) LOCY(I)=IY LOCX(I)=E rnY(J)=JY LOCX(J)=JX 200 CONTINUE C FIND THE DISTANCE BETWEEN EACH PAlR OF DEPARTMENTS DO 250 K=I,NT L=l+(K-l)*N DO 250 I=L,(N*K) DO 250 J=(L+1),(N1K) H=P(IHK-l)*N G=P(JHK-l)*N R=I-(K-l)*N S=J-(K-l)*N DXD(RS,K)=DX(H,G) DYD(RS,K)=DY(H,G) DXD(s,RK)=-DXD(Rs,K) DYD(S,r/K)=-DYD(RS,K) X(RK)=LOCX(H) Y(RK)=LOCY(H) X(S,K)=LOCX(G) Y(S,K)=LOCY(G) 250 CONTINUE C C ASSIGN A FACTOR VALUE DEPENDENT UPON THE DISTANCE BETWEEN C DEPARTMENT PAIRS DO 300 K=l,NT DO 300 I=l,N DO 300 J=I+ l,N QXFACT(I,J,K)=1.9828-(0.2532*(ABS(DXD(I,J,K)))> + (O.l34*(ABS(DXD(I,J,K)**2))) QYFACT(I,J,K)=1.9828-(0.2532*(ABS(DYD(I,J,K)))> + (O.I34*(ABS(DYD(I,J,K)**2)))

300 CONTINUE

C MAKE THE FLOW MATRIX FULL(N0NTRIANGULAR) DO 350 K=l,NT DO 350 I=l,N DO 350 J=I+l,N F(I,J,K)=F(J,I,K) 350 CONTINUE C CALCULATE THE MATERIAL FLOW OF EACH DEPT. IN 4 DIRECTIONS C UP, DOWN, RIGHT AND LEFT DO 375 K=l,NT DO 375 I=l,N RIGHT(I,K)=O LEFT(I,K)=O UP(I,K)=O DOWN(I,K)=O TOTAL(I,K)=O DO 375 J=l,N IF (1.EQ.J) GOT0 375 IF (DXD(I,J,K).LT.O) RIGHT(I,K)=RIGHT(I,K)+F(J,I,K) IF (DXD(I,J,K).GT.O) LEFT(I,K)=LEFI'(I,K)+F(J,I,K) IF (DYD(I,J,K).LT.O) DOWN(I,K)=DOWN(I,K)+F(J,I,K) IF (DYD(I,J,K).GT.O) UP(I,K)=UP(I,K)+F(J,I,K) TOTAL(I,K)=TOTAL(I,K)+F(J,I,K) 375 CONTINUE C- C INITIALIZE COUNTER VARIABLE DO 376 K=I,NT DO 376 I=l,N DO 376 J=I+l,N COUNTER(I,J)=O PULIX(I,J,K)=O PULLY(I,J,K)=O 376 CONTINUE BOITOM = 0 C C CALCULATE THE PULL OF A DEPARTMENT PAlR TO OVERLAP DUE TO C MATERIALFLOW DO 380 K=l,NT DO 380 I=l,N DO 380 J=I+I,N IF (K.GT.1)THEN IF((Y(I,K).EQ.Y(I,(K-I))).AND. O((I,K).EQ.X(I,(K-1)))) THEN IF((Y(J,K).EQ.Y(J,(K- I))). AND. O((J,K).EQ.X(J,(K-1)))) THEN COUNTER(I,J)=COUNTER(I,J)+l ELSE COUNTER(I,J)=o ENDIF ELSE COUNTER(I,J)=O ENDIF ENDIF BOTTOM=O IF (D)(D(I,J,K).EQ.O)THEN DO 38 1 II=O,COUNTER(I,J) PULLX(I,J,K)=PULLX(I,J,K)+(RIGHT(I,K-II)+ LEFI'(J,K-II>LEFI'(I.K-11)-RIGHT(J,K-11)) BOTTOM=TOTAL(I,K-II)+TOTAL(J,K-II)+BOTTOM CONTINUE PULLX(1, J,K)=AsS(PVW((I,J,K)) PULLX(I,J,K)=PULLX(I,J,K)BOTTOM PULLX(1, J,K)=I-PULLX(1,J,K) ENDIF IF (DXD(I,J,K).LT.O)THEN Do 382 II=O,COUNTER(I,I) PULLX(I,J,K)=PULLX(I,J,K)+RIGHT(I,K-II)+ LEFT(J,K-II>LEFT(I,K-II>RIGHT(J,K-11) BOTTOM=TOT&I,K-II)+TOTA~J,K-II)+BO~OM CONTMUE PVLLX(I,J,K)=PVLLX(I,J,K)/BOTTOM ENDIF IF (DXD(I,J,K).GT.O)THEN Do 383 II=O,COUNTER(I,J) PULLX(I,J,K)=RIGHT(J,K-IIYLEFT(1,K-11) LEFT(J,K-II>RIGHT(I,K-II)+PULLX(I,J,K) BOTTOM=TOTAL(I,K-II)+TOTAL(J,K~I)+BO7TOM CONTINUE PULrX(I,J,K)=PULLX(I,J,K)/BOTTOM ENDIF BOTTOM=O IF (DYD(I,J,K).EQ.O)THEN Do 384 II=O,COUNTER(I,J) PULLY(I,J,K)=(DOW(I,K-II)+UP(J,K-11)- UP(1.K-II>WWN(J,K-II))+PULLY(I,J,K) BOlTOM=TOTAL(I,K-II)+TOTAL(J,K-II)+BOTTOM CONTINUE PULLY(I,J,K)=ABS(PULLY(I,J,K)) PULLY(I,J,K)=PULLY(I,J,K)/BOTI'OM PULLY(I,J,K)=I-PULLY(I,J,K) ENDIF IF (DYD(I,J,K).GT.O)THEN DO 385 II=O,COUNTER(I,J) PvLLY(I,J,K)=DoW(J,K-II)+UP(I,K-II> LJP(J,K-11)-DoW(1,K-II)+PULLY(I,J,K) BOrrOM=TOTAL(I,K-II)+TOTAYJ,K-II)+BOrnM CONTINUE PULLY(I,J.K)=PULLY(I,J,K)/BO?TOM ENDIF IF (DYD(I,J,K).LT.O) THEN Do 386 II=O,COUNTER(I,J) PULLY(I,J.K)=DOWN(I,K-II)+UP(J,K-11) UP(1,K-II>DoWN(J,K-II)+PULLY(I,J,K) BOTTOM=TOTAL(I,K-II)+TOTAL(J,K-II)+BOTTOM CONTINUE PUY(I,J,K)=PULLY(I, J,KyBOTTOM ENDIF DO 388 II=I,COUNTER(I,J) PLJLLY(I,J,K-II)=PULLY(lJ,K) PULLX(I,J,K-II)=PULLx(I,J,K) 388 CONTR\TUE 380 CONTTNUE DO 390 K=1,NT DO 390 I=l,N DO 390 J=I+l,N PFACTX(I,J,K)=O.466895+(0.131619*PULLX(I,J,K)Ol10726* + (PULLX(I,J,K)**2))+(0.22456*(PULIX(I.J.K)**3)) PFACTY(I,J,K)=0.466895+(0.1316 19*PULLY(I,J,K))-(O.110726*. + (PULLY(I,J,K)**2))+(0.22456*(PULLY(I,J,K)**3)) 390 CONTINUE NIV=O DO 395 K=l,NT DO 395 I=l,N DO 395 J=I+l,N LFACTX=INT(lOOO.*(QXFACT(I,J,K)*SFACT(I,J,K)* + PFACTX(I,J,K))) LFACTY=INT(lOOO.*(QYFACT(I,J,K)*SFACT(I,J,K)* + PFACTY(I,J,K))) L=MINO(LFACTX,LFACTY) IF (L .GT.0) THEN NIV=NIV+I MFACT(NIV)=L ENDIF 395 CONTINUE C SORT THE OVERALL INDICATOR DO 30 I=l,NIV DO 40 J=I+L,NIV IF (MFACT(I) .LE.MFACT(1)) THEN TEMP=MFACT(I) MFACT(I)=MFACT(J) MFACT(J)=TEMP ENDIF 40 CONTINUE 30 CONTINUE DO 60 K=l,NIV B(K)=MFACT(K) 60 CONTINUE IP=INT(PCTLNIV)+I C IDENTIFY THRESHOLD AT PCT OF INDICATORS LIMIT=FLOAT(B(IP))/ 1000. C PUT DATA INTO ARRAYS FIRST,SECOND, AND DIR NC4 IV=o 400 DO 410 K=l,NT DO 410 I=I,N DO 410 J=I+l,N NC=NC+l FACTX(I,J,K)=QXFACT(I,J,K)*SFACT(I,J,K)*PFAC~(I,J,K) FACn(I,J,K)=QYFACT(I,J,K)*SFACT(I,J,K)*PFACTY(I,J,K) IF (DYD(I,J,K).GT.O)THEN FIRST(NC)=J+N*(K-1) SECOND(NC)=I+N'(K-1) II=J JJ=I ELSE IF (DYD(I,J,K).LT.O)THEN FIRST(NC)=I+N8(K-1 ) SEC0ND(NC)=J+N8(K-1) II=I JJ=J ELSE IF (DYD(I,J,K).EQ.O)THEN IF ((UF'(I,K>DOWN(I,K)).GT.(W(J,K>DOWN(J,K))) THEN FIRST(NC)=I+N8(K-I) SECOND(NC)=J+N8(K-I) II=I JJ=J ELSE FIRST(NC)=J+N*(K-I) SECOND(NC)=I+N*(K-1) II=J JJ=I ENDIF ENDIF IF (DXD(II,JJ,K).GT.O) THEN ID=4 ELSE ID=3 ENDIF

IF ((FACTX(I,J,K).LT.LIMIT).AND. + (FACTX(I,J,K).LE.FACTY(I,J,K)))THEN ID=1 IF (DXD(I,J,K).GT.O) THEN FIRST(NC)=J+N0(K-1) SECOND(NC)=I+N*(K-1) ENDIF IF (DXD(I,J,K).LT.O) THEN FIRST(NC)=I+N0(K-1) SECOND(NC)=J+Nt(K-I ) ENDIF IF (DXD(I,J,K).EQ.O) THEN IF (LEn(I,K)+RIGHT(J.K).GT.RIGHT(I,K)+LEFT(J,K)) + THEN FIRST(NC)=I+N0(K-1) SECOND(NC)=J+N*(K-I) ELSE FIRST(NC)=J+N*(K-I ) SECOND(NC)=I+N0(K-1) ENDIF ENDIF ENDIF

IF ((FACTY(I,J,K).LT.LIMIT).AND. + (FACTY(I,J,K).LE.FACTX(I,J,K)))THEN ID=2 IF (DYD(I,J,K).GT.O) THEN FIRST(NC)=J+NYK-I ) SECOND(NC)=I+N*(K-1 ) ENDIF IF (DYD(I,J,K).LT.O) THEN FIRST(NC)=I+NZ(K- I ) SECOND(NC)=J+N*(K-1) ENDIF IF (DYD(I,J,K).EQ.O) THEN IF (DOWN(I,K)+UP(J,K).GT.UP(I,K)+DOWN(J,K)) + THEN FIRST(NC)=J+N1(K-I ) SECOND(NC)=I+N*(K-1) ELSE FIRST(NC)=I+N0(K-1) SECOND(NC)=J+Nt(K-I) ENDIF ENDIF ENDIF DIR(NC)=ID C PRIORITIES CALCULATED FOR EACH INTEGER VARIABLES FACTXA=MT(I 000. *FACTX(I,J,K)) FACTYA=INT(IOOO.*FACTY(I,J,K)) IF (ID.GE.3) THEN IV=IV+l IF (FACTXALT.FACTYA) THEN PRIORITY(IV)=FACTXA ELSE PRIORITY(IV)=FACTY A ENDIF ENDIF 410 CONTINUE RETURN ...... END SUBROUTINE RUNCPX(N,NTXLS(U,YL.,YU,XC,YC,FCOST,NNODE,LINO~, +VARNO,PRIORI~,UPDOW,NC,IV) C RUN MIXED-INTEGER MODEL FROM MPS FILE TEMP.MPS' C CALLS A SERIES OF CPLEX SUBROUTINES C LOAD PROGRAM WITH INTERMED.0 AND CPLEXMIP.ABAK C OUTPUTS: FCOST - MINIMUM FLOW COST C XL, YL, XU, W - DEPARTMENT COORDINATES EXTERNAL IMPSMRD !SPRAGMA C (IMPSMRD) EXTERNAL SNDLIM !$PRAGMA C (SNDLIM) EXTERNAL IMIPOPT !SPRAGMA C (IMIPOPT) EXTERNAL GMOBJ !fPRAGMA C (GMOBJ) EXTERNAL GMX !SPRAGMA C (Gm EXTERNAL GETSTAT !$ PRAGMA C (GETSTAT) * EXTERNAL IFREEP !SPRAGMA C (IFREEP) EXTERNAL GNDC !f PRAGMA C (GNDC) EXTERNAL ILOADO !%PRAGMAC (ILOADO) EXTERNAL SNDSEL !SPRAGMA C (SNDSEL) EXTERNAL SMSLIM !SPRAGMA C (SMSLIM) EXTERNAL SORDIN !fPRAGMA C (SORDIN) PARAMETER(MXY=900, MXT=150,ICL=9999) INTEGER VARNO(ICL),PRIORITY(ICL),UPDOWN(ICL) CHARACTER'ZO FILENM INTEGER IMPSMRD INTEGER SNDLIM INTEGER IMIPOPT INTEGER GMOBJ INTEGER GMX INTEGER GETSTAT * INTEGER IFREEP INTEGER STATUS INTEGER GNDC INTEGER SNDSEL INTEGER SMSLIM INTEGER SORDIN LOGICAL LINOUT DOUBLE PRECISION XY(MXY), DFCOST DIMENSION XL(MXT).XU(MXT),YL(MXT),YU(~,XC(MXT),YC(MXT) FILENM = TEMP.MPS'llCHAR(0) C READ MPS FORMAT FILE STATUS = IMPSMRD (FILENM, 0,0,0,0,0,0,0,0,0) IF (STATUS.NE.0) GOT0 9000 C LOADING INTEGER VARIABLES AND THIER BRANCHING DIRECTION FOR INITIAL SOLUTION STATUS=ILOADO(IV,VARNO,NULL,UF'DOWN) IF (STATUS.NE.0) GOT0 9000 C SETTING NODE SELECTION STRATEGY TO NODE DEPTH STATUS=SNDSEL(O) IF (STATUS.NE.0) GOT0 9000 C OBTAINING ONLY ONE INITIAL SOLUTION STATUS=SMSLIM(l) IF (STATUS.NE.0) GOT0 9000 C OPTIMIZING STATUS = IMIPOPT() IF (STATUS.NE.0) GOT0 9000 C SETTING PRIORITY INDICATORS OFF STATUS = SORDIN(0) IF (STATUS.NE.0) GOT0 9000 C SETTING NODE LIMIT TO 100,000 STATUS= SNDLIM(100000) IF (STATUS.NE.0) GOT0 9000 C SETTING NODE SELECTION STRATEGY TO BEST ESTIMATE STATUS=SNDSEL(Z) IF (STATUS.NE.0) GOT0 9000 C SETTING FESIBLE SOLUTION LIMIT TO 15000 STATUS =SMSLIM(1500) IF (STATUS.NE.0) GOT0 9000 C LOADING INTEGER VARIABLES AND THIER BRANCHING DIRECTION STATUS = ILOADO(IV,VARNO,NULL,UPDOWN) IF (STATUS.NE.0) GOT0 9000 C OPTIMLZING STATUS=IMIPOPT() IF (STATUS.NE.0) GOT0 9000 C GElTING OBJECTIVE VALUE STATUS = GMOBJ(DFC0ST) IF (STATUS.NE.0) GOT0 9000 FCOST = SNGUDFCOST) NVAR=NT*N*S STATUS = GMX(XY,l,NVAR) IF (STATUS.NE.0) GOT0 9000 NNODE = GNDC() MDX=O DO 100 I=l.NT*N XL(1) = SNGW(INDX)) XU(1) = SNGL(XY(INDX+l)) YYI) = SNGL(XY(INDX+Z)) W(1) = SNGL(XY(INDX+3)) MDX=INDX+6 100 CONTINUE IF (LINOUT) THEN DO I01 I=l,NT*N XC(1) = SNGL@Y(INDX)) YC(1) = SNGW(INDX+I)) INDX=INDX+2 101 CONTINUE ENDIF 9000 WRITE (691) STATUS * STATUS = IFREEPO DO 200 I=l,NC 200 CONTINUE RETURN 91 FORMAT ('STATUS =',is) END Appendix D The following solution is provided to give the reader an idea of the format used for problem solutions. The format is fiom a file generated by the dynamic layout program. Comments explaining the file are italicized. tam5.out4

PROBLEM SIZE IS 5 1 5 departments, I time period

COST-MATRICES F(1, J) The triangular materialflow matrix

DEPARTMENTS USED

AREAS-MATRIX BY DEPT. 24.00 16.00 36.00 8.00 21.00

DEPARTMENT - OPTIMAL LOCATION The QAP Layout generated 1 -- 2 in the first stage. 2-- 1 3 -- 3 4-- 5 5 -- 4

COST OF THE OPTIMAL ASSIGNMENT 95.00

RULES ARE BEING USED, THRESHOLD= 0.

THE OPTIMAL LAYOUT FOUND DEPT. NO. (XL,YL) (W,W) The upper right and lower 1 0.000 0.674 8.483 6.674 left coordinates of each 2 0.000 1.872 4.483 5.477 department 3 8.483 0.000 13.382 7.348 4 4.483 6.674 7.947 8.984 5 0.000 5.477 4.483 10.181

FLOW COST IS 98.14 RENOVATION COST IS 0.00 THE TOTAL COST IS 98.14

115 NODES SEARCHED 68 VARIABLES 10 INT.VARIABLES 44 CONSTRAINTS TIME= 1.10000 tam6.out4

PROBLEM SIZE IS 6 I

COST-MATRICES F(1,J)

DEPARTMENTS USED

AREAS-MATRIX BY DEPT. 24.00 16.00 36.00 8.00 21.00 17.50

DEPARTMENT - OPTIMAL LOCATION 1-- 5 2-- 1 3 -- 4 4-- 6 5-- 3 6-- 2

COST OF THE OPTIMAL ASSIGNMENT 166.00

RULES ARE BEING USED, THRESHOLD= 0.

THE OPTIMAL LAYOUT FOUND DEPT. NO. (XL,YL) (m,YV) 1 0.000 9.467 9.798 14.366 2 1.276 2.837 4.542 7.736 3 0.000 8.242 4.899 15.590 4 5.616 7.157 9.081 9.467 5 4.542 3.416 10.155 7.157 6 4,787 0.000 9.910 3.416

FLOW COST IS 159.83 RENOVATION COST IS 0.00 THE TOTAL COST IS 159.83

2 17 NODES SEARCHED 91 VARIABLES 15 INT. VARIABLES 62 CONSTRAINTS TIME= 2.18333 tam7.out4

PROBLEMSIZEIS 7 1

COST-MATRICES F(1,J)

DEPARTMENTS USED

AREAS-MATRIX BY DEPT. 24.00 16.00 36.00 8.00 21.00 17.50 3.60

DEPARTMENT - OPTIMAL LOCATION 1 -- 3 2-- 7 3 -- 6 4-- 2 5-- 1 6-- 4 7-- 5

COST OF THE OPTIMAL ASSIGNMENT 272.00

RULES ARE BEING USED, THRESHOLD= 0.

TKE OPTIMAL LAYOUT FOUND DEPT. NO. (XL,YL) (Wyv) 1 0.000 0.238 13.416 4.087 2 1.724 7.861 6.815 11.004 3 6.815 4.087 13.782 9.328 4 4.959 0.487 7.181 4.087 5 0.366 0.000 4.959 4.574 FLOW COST IS 260.30 RENOVATION COST IS 0.00 THE TOTAL COST IS 260.30

1242 NODES SEARCHED 127 VARIABLES 21 INT. VARIABLES 88 CONSTRAINTS TIME= 13.2833 tam8.out4

PROBLEM SIZE IS 8 I

COST-MATRICES F(1,J)

DEPARTMENTS USED

AREAS-MATRIX BY DEPT. 24.00 16.00 36.00 8.00 21.00 17.50 3.60 15.40

DEPARTMENT - OPTIMAL LOCATION 1 -- 6 2-- 4 3 -- 3 4-- 5 5-- 8 6-- 7 7 -- 1 8-- 2

COST OF THE OPTIMAL ASSIGNMENT 400.00

RULES ARE BEING USED, THRESHOLD= 0.

THE OPTIMAL LAYOUT FOUND DEPT. NO. 1 0.000 2 0.000 3 1.116 4 6.469 5 6.469 6 3.162 7 1.867 8 3.367

FLOW COST IS 390.03 RENOVATION COST IS 0.00 THE TOTAL COST IS 390.03

12204 NODES SEARCHED 148 VARIABLES 28 INT.VARIABLES 108 CONSTRAINTS TIME= 181.133 d8 ll.out4

PROBLEMSIZEIS 8 1

COST-MATRICES F(1,J)

DEPARTMENTS USED

AREAS-MATRIX BY DEPT. 43.00 72.00 58.00 67.00 10.00 23.00 21.00 53.00

DEPARTMENT - OPTIMAL LOCATION 1-- 3 2-- 4 3- 5 4-- 7 5-- 1 6-- 6 7- 8 COST OF THE OPTIMAL ASSIGNMENT 527.00

RULES ARE BEING USED. THRESHOLD= 0.

THE OPTIMAL LAYOUT FOUND DEPT. NO. (XL,YL) (WYrr) 1 0.000 19.076 24.010 22.862 2 2.442 25.254 11.735 33.273 3 11.735 27.065 24.926 31.462 4 0.000 33.273 14.177 37.998 5 6.549 23.428 12.026 25.254 6 14.177 31.462 22.484 34.231 7 14.362 34.231 22.299 36.876 8 12.026 22.862 24.636 27.065

FLOW COST IS 456.25 RENOVATION COST IS 0.00 THE TOTAL COST IS 456.25

42 12 NODES SEARCHED 132 VARIABLES 28 INT. VARIABLES 100 CONSTRAINTS TIME= 52.1667

PROBLEMSIZEIS 9 I

COST-MATRICES F(1,J)

DEPARTMENTS USED

AREAS-MATRJX BY DEPT. 11.00 24.00 64.00 19.00 66.00 37.00 10.00 25.00 14.00 DEPARTMENT - OPTIMAL LOCATION 1 -- 3 2-- 1 3 -- 7 4-- 2 5-- 6 6-- 5 7-- 9 8-- 8 9-- 4

COST OF THE OPTIMAL ASSIGNMENT 350.00

RULES ARE BEING USED, THRESHOLD= 0.

THE OPTIMAL LAYOUT FOUND DEPT. NO. (XL,YL) (WYV) 1 0.000 1.063 15.767 3.409 2 2.193 4.682 9.121 8.146 3 0.000 10.792 11.314 16.449 4 10.340 3.409 16.504 6.491 5 11.314 10.792 17.058 22.281 6 9.121 6.491 17.723 10.792 7 17.723 0.000 19.959 4.472 8 2.121 16.449 9.192 19.984 9 3.011 8.146 8.303 10.792

FLOW COST IS 359.71 RENOVATION COST IS 0.00 THETOTALCOSTIS 359.71

5736 NODES SEARCHED 142 VARIABLES 36 INT. VARIABLES 116 CONSTRAINTS TIME= 82.4500

PROBLEM SIZE IS 6 3

COST-MATRICES F(1,J) DEPARTMENTS USED

AREAS-MATRIX BY DEPT. 33.00 17.00 12.00 13.00 11.00 42.00 34.00 10.00 12.00 12.00 10.00 42.00 39.00 10.00 13.00 11.00 10.00 35.00

RENOVATION COST PER SQ. FT.BY DEPT. 1.00 1.00 1.00 1.00 1.00 1.oo 1.00 1.00 1.00 1.00 1.00 1.oo 1.00 1.00 1.00 1.00 1.00 1.00

DEPARTMENT - OPTIMAL LOCATION 1 -- 6 2-- 2 3- 1 4-- 3 5-- 5 6-- 4 7 -- 12 8- 11 9- 7 10 -- 9 11 -- 8 12 -- 10 13 -- 18 14 -- 17 15 -- 13 COST OF THE OPTIMAL ASSIGNMENT 879.00

THE OPTIMAL LAYOUT FOUND DEPT. NO. (XL,YL) (WW) 1 0.000 0.188 15.338 8.313 2 5.811 0.717 8.727 6.548 3 2.915 2.280 5.811 6.548 4 8.727 1.662 11.276 6.761 5 8.727 6.761 11.276 11.163 6 0.000 6.548 8.727 11.440 7 11.215 0.188 15.338 8.435 8 8.727 6.761 11.215 10.876 9 2.915 2.280 5.811 6.548 10 8.765 1.862 11.215 6.761 11 6.529 2.076 8.765 6.548 12 0.000 6.548 8.727 11.440 13 11.215 0.000 15.631 8.832 14 8.727 6.761 11.215 10.876 15 2.915 2.280 6.634 6.552 16 8.870 2.071 11.215 6.761 17 6.634 2.180 8.870 6.652 18 0.823 6.652 8.727 11.162

FLOW COST IS 790.20 RENOVATION COST IS 37.00 THE TOTAL COST IS 827.20

10052 NODES SEARCHED 289 VARIABLES 45 INT.VARIABLES 230 CONSTRAINTS TIME= 289.833

PROBLEM SIZE IS 10 1

COST-MATRICES F(1,J) DEPARTMENTS USED

AREAS-MATRIX BY DEPT. 41.00 17.00 38.00 14.00 74.00 26.00 27.00 39.00 71.00 20.00

DEPARTMENT - OPTIMAL LOCATION 1 -- 7 2-- 4 3-- 8 4-- 3 5-- 9 6 -- 10 7-- 2 8-- 1 9-- 6 10 -- .5

COST OF THE OPTIMAL ASSIGNMENT 912.00

RULES ARE BEING USED, THRESHOLD= 0.

THE OPTIMAL LAYOUT FOUND DEPT. NO. (XL,YL) (xu,YU) 1 0.000 5.561 15.235 11.964 2 9.118 2.646 14.949 5.561 3 15.235 4.404 19.594 13.122 4 9.388 0.000 14.679 2.646 5 0.115 13.519 8.717 22.121 6 14.820 14.214 18.426 21.425 7 0.742 2.266 8.090 5.941 8 0.000 5.941 8.832 10.356 9 8.717 11.964 14.820 23.675 10 1.254 10.356 7.578 13.519

FLOW COST IS 888.06 RENOVATION COST IS 0.00 THE TOTAL COST IS 888.06

32300 NODES SEARCHED 209 VARIABLES 45 INT. VARIAB 162 CONSTRAINTS

PROBLEM SIZE IS 11 1 COST-MATRJCES F(1, J)

DEPARTMENTS USED

AREAS-MATRIX BY DEPT. 13.00 57.00 15.00 14.00 26.00 33.00 12.00 17.00 23.00 25.00 70.00

DEPARTMENT - OPTIMAL LOCATION 1-- 1 2-- 7 3 -- 10 4-- 9 5-- 8 6-- 4 7 -- 11 8-- 6 9- 2 10 -- 5 11 -- 3

COST OF THE OPTIMAL ASSIGNMENT 505 .OO

RULES ARE BEING USED, THRESHOLD= 0.80000

THE OPTIMAL LAYOUT FOUND DEPT. NO. (XL,YL) (m,YV) 1 0.000 5.077 3.921 10,176 2 8.701 9.978 16.730 17.189 3 5.292 16.150 8.701 20.678 4 0.000 15.811 5.292 18.457 5 16.730 9.978 20.336 17.189 6 8.701 0.000 16.825 4.062 7 10.266 17.189 15.165 19.639 8 5.292 11.018 8.701 16.150 9 3.921 4.235 7.312 11.018 FLOW COST IS 542.65 RENOVATION COST IS 0.00 THE TOTAL COST IS 542.65

153 NODES SEARCHED 149 VARIABLES 11 INT. VARIABLES 124 CONSTRAINTS TIME= 6.10000

PROBLEM SIZE IS 8 2

COST-MATRICES F(1, J)

DEPARTMENTS USED

AREAS-MATRIX BY DEPT. 61.00 73.00 60.00 10.00 30.00 23.00 31.00 11.00 48.00 21.00 50.00 10.00 31.00 69.00 33.00 11.00

RENOVATION COST PER SQ. FT. BY DEPT. 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 DEPARTMENT - OPTIMAL LOCATION 1 -- 8 2-- 2 3-- 5 4-- 6 5-- 3 6 -- 1 7-- 4 8-- 7 9 -- 16 10 -- 10 11 -- 13 12 -- 14 13 -- 11 14 -- 9 15 -- 12 16 -- 15

COST OF THE OPTIMAL ASSIGNMENT 1555.00

RULES ARE BEING USED, THRESHOLD= 0.80000

THE OPTIMAL LAYOUT FOUND DEPT. NO. (XL,n) (WYrr) 1 0.000 8.953 23.159 16.763 2 7.204 0.000 15.748 8.544 3 7.603 8.544 15.349 16.290 4 16.577 6.717 21.049 8.953 5 15.748 1.935 22.209 6.717 6 3.813 1.762 7.204 8.544' 7 3.414 8.658 7.603 16.176 8 3.528 16.290 8.219 18.635 9 15.349 8.953 22.277 15.881 10 11.747 2.785 15.417 8.658 11 8.334 8.658 15.089 16.176 12 16.577 6.717 21.049 8.953 13 15.417 1.935 22.209 6.717 14 0.000 2.785 11.747 8.658 15 3.414 8.658 8.334 16.176 16 3.528 16.290 8.219 18.635

FLOW COST IS 1535.30 RENOVATION COST IS 93.00 THE TOTAL COST IS 1628.30

3 1 NODES SEARCHED 223 VARIABLES 11 INT. VARIABLES 186 CONSTRAINTS TIME= 2.30000 PROBLEM SIZE IS 12 1

COST-MATRICES F(1,J)

DEPARTMENTS USED

AREAS-MATRIX BY DEPT. 1800.00 1200.00 2000.00 3600.00 3200.00 1000.00 3500.00 2000.00 2100.00 2600.00 2000.00 1500.00

DEPARTMENT - OPTIMAL LOCATION 1 -- 1 2-- 9 3 -- 2 4-- 6 5 -- 10 6-- 8 7-- 7 8 -- 11 9-- 3 10 -- 4 11 -- 12 12 -- 5

COST OF THE OPTIMAL ASSIGNMENT 33692.00

RULES ARE BEING USED, THRESHOLD= 0.80000

THE OPTIMAL LAYOUT FOUND DEPT. NO. (XL,YL) (W,yu> 1 0.000 17.574 21.213 102.426 FLOW COST IS 30994.29 RENOVATION COST IS 0.00 THE TOTAL COST IS 30994.29

306 NODES SEARCHED 186 VARIABLES 14 INT. VARIABLES 154 CONSTRAINTS TIME= 11.5833

PROBLEM SIZE IS 12 1

COST-MATRICES F(1,J)

DEPARTMENTS USED

AREAS-MATRIX BY DEPT. 24.00 16.00 36.00 8.00 15.40 17.50 3.60 15.40 20.00 19.50 16.00 9.00 DEPARTMENT - OPTIMAL LOCATION 1 -- 9 2-- 4 3-- 1 4 -- 10 5 -- 12 6 -- 11 7-- 6 8-- 5 9-- 3 10 -- 8 11 -- 7 12 -- 2

COST OF THE OPTIMAL ASSIGNMENT 1124.00

RULES ARE BEING USED, THRESHOLD= 0.80000

THE OPTIMAL LAYOUT FOUND DEPT. NO. (XL,YL) (Wyv) 1 0.000 10.183 7.754 14.237 2 11.735 1.383 15.735 5.383 3 0.000 0.000 5.366 6.765 4 5.413 6.765 7.754 10.183 5 11.735 10.279 15.735 14.141 6 7.754 9.996 11.735 14.424 7 5.462 5.195 7.754 6.765 8 0.877 6.765 5.413 10.183 9 7.849 0.792 11.735 5.973 10 11.735 5.383 15.753 10.279 11 7.754 5.973 11.735 9.996 12 5.366 1.570 7.849 5.195

FLOW COST IS 1087.05 RENOVATION COST IS 0.00 THE TOTAL COST IS 1087.05

174 NODES SEARCHED 266 VARIABLES 14 INT. VARIABLES 194 CONSTRAINTS TIME= 10.2 1667 data065aout4a

PROBLEMSIZEIS 6 5

COST-MATRICES F(I,J) DEPARTMENTS USED

AREAS-MATRIX BY DEPT. 12.00 13.00 11.00 42.00 36.00 10.00 12.00 20.00 10.00 42.00 41.00 10.00 13.00 19.00 10.00 35.00 39.00 10.00 11.00 16.00 10.00 12.00 41.00 RENOVATION COST PER SQ. FT.BY DEPT. . 1.00 1.00 1.00 1.00 1.00 1.oo 1.00 1.00 1.00 1.00 1.00 1.oo 1.00 1.00 1.00 1.00 1.00 1.oo 1.00 1.00 1.00 1.00 1.00 1.oo 1.00 1.00 1.00 1.00 1.00 1.oo

DEPARTMENT - OPTIMAL LOCATION 1 -- 6 2-- 1 3 -- 4 4-- 2 5-- 3 6-- 5 7 -- 12 8-- 7 9 -- 10 10 -- 8 11 -- 9 12 -- 11 13 -- 17 14 -- 13 15 -- 18 16 -- 14 17 -- 16 18 -- 15 19 -- 24 20 -- 19 21 -- 23 22 -- 20 23 -- 22 24 -- 21 25 -- 30 26 -- 25 27 -- 29 28 -- 26 29 - 28 30 -- 27

COST OF THE OPTIMAL ASSIGNMENT 2006.00

RULES ARE BEING USED, THRESHOLD= 0.80000 THE OPTIMAL LAYOUT FOUND DEPT.NO. (XL,YL) (WYV) 1 0.000 8.826 13.621 11.740 2 2.247 2.625 4.796 7.724 3 2.451 7.724 4.796 12.414 4 4.796 0.000 9.379 9.165 5 9.379 0.341 13.621 8.826 6 4.851 9.165 9.323 11.401 7 9.379 8.826 13.621 11.740 8 1.634 1.772 4.796 8.097 9 2.451 8.097 4.796 12.414 10 4.796 0.000 9.379 9.165 11 9.379 0.339 14.308 8.826 12 4.851 9.165 9.323 11.401 13 6.430 8.367 8.979 13.466 14 1.634 2.045 4.796 8.097 15 8.979 8.680 11.215 13.152 16 4.796 0.000 8.979 8.367 17 0.000 8.367 6.430 14.481 18 8.979 3.268 11.215 7.740 19 8.666 7.740 11.011 12.431 20 1.634 2.912 4.796 8.097 21 6.430 7.850 8.666 12.322 22 5.504 3.345 8.775 7.663 23 0.000 8.097 6.430 14.481 24 8.979 3.268 11.215 7.740 25 8.775 7.959 11,011 12.431 26 2.655 2.912 6.430 8.097 27 6.430 7.850 8.775 12.540 28 6.430 3.345 8.775 7.663 29 0.185 8.097 6.430 14.342 30 8.979 3.268 11.215 7.740

FLOW COST IS 2038.12 RENOVATION COST IS 152.00 THE TOTAL COST IS 2 190.12

339 NODES SEARCHED 439 VARIABLES 15 INT.VARIABLES 343 CONSTRAINTS TIME= 26.7000

tamlS.out4a

PROBLEM SIZE IS 15 1

COST-MATRICES F(1,J) DEPARTMENTS USED

AREAS-MATRIX BY DEPT. 24.00 16.00 36.00 8.00 21.00 17.50 3.60 15.40 20.00 19.50 16.00 9.00 9.00 25.00 4.00

DEPARTMENT - OPTIMAL LOCATION 1-- 1 2-- 5 3-- 2 4-- 3 5 -- 11 6 -- 12 7 -- 10 8-- 9 9 -- 14 10 -- 4 11 -- 13 12 -- 15 13 -- 6 14 -- 7 15 -- 8

COST OF THE OPTIMAL ASSIGNMENT 2241.00

RULES ARE BEING USED, THRESHOLD= 0.80000

THE OPTIMAL LAYOUT FOUND DEPT. NO. (XL,YL) (WYrr) 1 0.000 0.203 17.426 6.000 2 14.284 6.000 18.817 9.550 3 17.426 0.000 23.426 6.000 4 23.426 2.653 25.817 6.000 5 21.974 10.226 27.268 14.207 6 27.268 7.690 30.804 12.640 7 20.371 10.226 21.974 12.471 8 15.728 9.550 20.371 12.866 FLOW COST IS 2290.11 RENOVATION COST IS 0.00 THE TOTAL COST IS 2290.11

5559 NODES SEARCHED 4 11 VARIABLES 2 1 INT.VARIABLES 306 CONSTRAINTS TIME= 20 1.767 tam20.out4a

PROBLEM SIZE IS 20 1

COST-MATRICES F(1,J)

DEPARTMENTS USED

AREAS-MATRIX BY DEPT. 24.00 16.00 36.00 8.00 21.00 17.50 3.60 15.40 20.00 19.50 16.00 9.00 9.00 25.00 4.00 DEPARTMENT - OPTIMAL LOCATION 1 -- 6 2 -- 14 3 -- 19 4-- 2 5 -- 11 6 -- 17 7 -- 12 8-- 8 9 -- 20 10 -- 18 11 -- 3 12 -- 13 13 -- 16 14 -- 15 15 -- 9 16 -- 5 17 -- 1 18 -- .10 19 -- 4 20 -- 7

COST OF THE OPTIMAL ASSIGNMENT 43 12.00

RULES ARE BEING USED, THRESHOLD= 0.800000

THE OPTIMAL LAYOUT FOUND DEPT.NO. (XL,YL) (m,yv) 1 0.000 5.518 4.533 10.842 2 12.983 7.817 16.426 12.464 3 14.889 12.464 20.729 18.650 4 7.967 2.231 10.401 5.518 5 4.533 5.518 8.477 10.842 6 6.228 13.424 11.089 17.025 7 8.477 8.116 10.401 9.990 8 10.401 3.979 14.426 7.817 9 20.729 7.817 24.578 13.013 10 11.089 12.464 14.889 17.595 11 10.401 0.000 14.426 3.979 12 10.401 7.817 12.983 11.302 13 6.916 10.842 10.401 13.424 14 16.426 6.655 20.729 12.464 15 14.426 5.817 16.426 7.817 16 16.426 2.341 18.158 4.073 17 5.643 3.796 7.967 5.518 18 16.426 4.073 19.912 6.655 19 14.426 3.554 16.426 5.817 20 8.477 5.518 10.401 8.116

FLOW COST IS 4532.88 RENOVATION COST IS 0.00 THE TOTAL COST IS 4532.88

3,734 NODES SEARCHED 709 VARIABLES 25 INT.VARIABLES 537 CONSTRAINTS TIME= 286.333

PROBLEM SIZEIS 20 1

COST-MATRICES F(1,J)

DEPARTMENTS USED

AREAS-MATRIX BY DEPT. 27.00 18.00 27.00 18.00 18.00 18.00 9.00 9.00 9.00 24.00 60.00 42.00 18.00 24.00 27.00 75.00 64.00 41.00 27.00 45.00

DEPARTMENT - OPTIMAL LOCATION 1- 5 2 -- 11 3 -- 14 4 -- 12 COST OF THE OPTIMAL ASSIGNMENT 261400.00

RULES ARE BEING USED, THRESHOLD= 0.80000

THE OPTIMAL LAYOUT FOUND DEPT. NO. (XL,YL) (myrr) 1 0.000 11.503 25.425 18.852 2 0.000 19.207 4.243 23.449 3 16.938 18.362 21.751 24.099 4 8.986 18.328 11.986 24.328 5 1.243 13.126 4.243 19.126 6 4.493 19.207 8.736 23.449 7 4.493 17.085 8.736 19.207 8 4.493 14.964 8.736 17.085 9 21.751 18.852 25.994 20.973 10 11.986 13.695 16.938 18.557

11 10.797 0.000 , 21.751 5.477 12 13.263 24.099 21.751 29.161 13 25.425 12.852 28.425 18.852 14 16.938 13.342 21.751 18.362 15 13.263 6.347 16.938 13.695 16 27.408 24.099 36.068 32.759 17 21.751 20.973 27.408 32.287 18 8.736 24.328 13.263 33.383 19 11.986 18.557 16.938 24.099 20 4.243 5.477 8.986 14.964

FLOW COST IS 297204.53 RENOVATION COST IS 0.00 THE TOTAL COST IS 297204.53

100078 NODES SEARCHED 538 VARIABLES 174 INT. VARIABLES 526 CONSTRAINTS TIME= 9973.27

AREAS-MATRIX BY DEPT. 12.00 13.00 11.00 42.00 36.00 10.00 38.00 20.00 20.00 28.00 61.00 21.00 11.00 11.00 10.00 34.00 32.00 10.00 32.00 16.00 19.00 23.00 55.00 17.00 10.00 10.00 10.00 12.00 27.00 10.00 25.00 23.00 16.00 20.00 10.00 25.00 23.00 16.00 20.00 48.00 15.00

RENOVATION COST PER SQ. FT.BY DEPT. 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00

DEPARTMENT - OPTIMAL LOCATION 1 -- 7 2 -- 11 3 -- 8 4-- 2 5-- 6 6-- 4 7 -- 10 8 -- 12 9-- 9 10 -- 3 11 -- 1 12 -- 5 13 -- 19 14 -- 23 15 -- 20 16 -- 14 17 -- 18 18 -- 16 19 -- 22 20 -- 24 21 -- 21 22 -- 15 23 -- 13 24 -- 17 25 -- 31 26 -- 26 COST OF THE OPTIMAL ASSIGNMENT 6998.00

RULES ARE BEING USED, THRESHOLD= 0.80000

THE OPTIMAL LAYOUT FOUND DEPT. NO. (XL,YL) (m,YU) 1 0.000 10.104 18.083 13.568 2 15.533 13.568 18.083 18.667 3 18.361 10.155 21.895 13.317 4 8.763 0.000 14.619 7.365 5 8.763 7.365 14.619 13.568 6 18.361 6.002 20.822 10.155 7 8.763 13.568 15.533 19.304 8 18.083 13.317 21.757 18.919 9 4.998 13.382 8.763 18.854 10 14.619 2.621 18.361 10.104 11 0.000 2.337 5.523 13.382 12 5.523 6.901 8.763 13.382 13 14.619 10.104 18.010 13.368 14 15.533 13.568 18.010 18.073 15 18.010 10.155 21.172 13.317 16 8.788 1.534 14.619 7.365 17 9.349 7.365 14.619 13.568 18 18.361 6.002 20.822 10.155 19 9.349 13.568 15.533 18.852 20 18.083 13.317 21.099 18.708 21 5.262 13.382 9.349 18.125 22 14.619 3.322 18.010 10.104 23 0.279 2.894 5.523 13.382 24 5.848 7.551 8.763 13.382 25 14.619 10.104 18.010 13.105 26 9.748 6.188 14.220 8.425 27 18.010 10.155 21.172 13.317 28 6.809 8.611 9.349, 13.382 29 9.349 8.425 14.619 13.568 30 18.361 6.002 20.822 10.155 31 9.349 13.568 14.619 18.378 32 18.010 13.317 22.806 18.113 33 5.349 13.382 9.349 17.382 34 14.619 4.104 18.010 10.104 35 0.624 3.584 5.523 13.382 36 14.619 13.105 18.010 17.659 FLOW COST IS 6915.98 RENOVATION COST IS 178.00 THE TOTAL COST IS 7093.98

682 NODES SEARCHED 818 VARIABLES 22 INT. VARIABLES 670 CONSTRAINTS TIME= 191.783 datal25eout4a

PROBLEM SIZE IS 12 5

COST-MATRICES F(1,J) DEPARTMENTS USED

AREAS-MATRIX BY DEPT. 36.00 10.00 38.00 20.00 28.00 61.00 21.00 50.00 10.00 12.00 38.00 10.00 23.00 17.00 23.00 65.00 19.00 16.00 11.00 10.00 36.00 10.00 18.00 23.00 22.00 66.00 44.00 13.00 11.00 11.00 41.00 21.00 21.00 21.00 20.00 56.00 39.00 38.00 10.00 12.00 21.00 18.00 10.00 23.00 RENOVATION COST PER SQ. FT.BY DEPT. 1.00 1.00 1.00 1.00 1.00 . 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00

DEPARTMENT - OPTIMAL LOCATION 1 -- 12 2-- 4 3 -- 11 4-- 8 5-- 3 6- 7 7-- 2 8- 6 9-- 5 10 -- 9 11 -- 1 12 -- 10 13 -- 24 14 - 23 15 -- 18 16 -- 16 17 -- 15 18 -- 20 19 -- 14 20 -- 19 21 -- 21 22 -- 17 23 -- 13 24 -- 22 25 -- 36 26 - 28 27 -- 30 28 -- 31 29 - 27 30 -- 32 31 - 26 32 -- 35 33 -- 33 34 -- 29 35 -- 25 36 -- 34 37 -- 48 38 -- 40 39 -- 42 40 -- 43 41 -- 39 42 -- 44 43 -- 38 44 -- 47 45 -- 45 46 -- 41 47 -- 37 48 -- 46 49 -- 60 50 -- 52 51 -- 59 52 -- 55 53 -- 51 54 -- 56 55 -- 50 56 -- 54 57 -- 57 58 -- 53 59 -- 49 60 -- 58 COST OF llE OPTIMAL ASSIGNMENT 11240.00

RULES ARE BEING USED, THRESHOLD= 0.80000

THE OPTIMAL LAYOUT FOUND DEPT. NO. (XL,YL) (m,Yrr) 1 0.000 14.434 24.895 22.920 2 17.490 10.173 20.041 14.200 3 12.764 20.525 20.653 25.470 4 17.490 14.200 20.653 20.525 5 13.729 8.957 17.490 14.434 6 12.764 14.434 17.490 20.525 7 8.206 3.389 13.729 14.434 8 9.523 14.434 12.764 20.915 9 0.000 14.345 8.206 20.614 10 4.399 20.614 9.523 24.997 11 5.788 10.028 8.134 14.345 12 9.523 20.915 12.764 24.696 13 20.536 14.434 24.895 23.152 14 13.283 20.599 17.755 22.835 15 9.218 14.434 12.764 20.998 16 17.204 10.311 21.327 14.434 17 13.835 8.957 17.204 14.434 18 15.846 14.434 20.536 20.298 19 8.134 3.033 13.835 14.434 20 12.764 14.434 15.846 20.599 FLOW COST IS 11922.10 RENOVATION COST IS 349.00 THE TOTAL COST IS 12271.10

100000 NODES SEARCHED 1327 VARIABLES 67 INT.VARIABLES 1138 CONSTRAINTS TIME= 45196.9

PROBLEMSIZEIS 20 3 POOO~OO~0-l-l0r~O+g0m0m00mmu00 0umo~moo~o~ogoo4owoo 0-00000 m0400000wmgm00w00000 mogoooow",Pwgoomooooo f3 OoowOOO wououooooPooooo~oooo r0400\POOOmOOOo,.0roooo g ~w00000 OOOOOwO~OoO",OOO-00000 004N~00-000000a00000 j NOOOOOO OChOOOOoP~O~~O~OOOOOOOPOO~OOOONO~~~~~~~~~~ POOOOOO wmmgOwomoO~oO",OOOOOO mP~gOOOOOOrOOOOOOOOOO 0000000 OOOggPPO~OooOoOOOOOO 00 OOOON~OuOOoooOOOOOO 0 g 0000000 OOOOOOOO~rOmOOOOoooo OO~~~OOOOONO~~~OOOOOO 0000000 004u4~0C~00000000000OO~wwWOONOOOOOOOOOOO CA 0000000 --0 0~0W~00~0~000000r 0 - OOOOOOPOOOOoOOOOOO 2C( 0 0 0 0 0 0 0 gOaoOOOOoOoOOoOOOOOO ~0400m0P000000000000 5 0000000 rOOmOOOOOOOOOOOO OPrO",~OaOOOOOOOOOOOO 0000000 .OOOoO~OooooOoooooooo 40°0g000000000000000 0000000 OOO-OOOO~~~OOOOO~OOOOo~w- 400000000000000 0 0 0 0000000 040 NOOOOO~OOOOOOOOO 000000000000000 0 0000000 OOOP OOOoOoOOoOoo~o~~o-JO 000000000000000 0 0 0 0 0 0 0 0 0 0 000 OOO~OoOO~Oooo~o~ 000000000000000 0 0000000 04Oo OOOoOOOOOOOOOOOO 000000000000000 0 0 0 0 0 0 0 000000~00000000 0000000 OOoO0000000000000000 000000000000000 DEPARTMENTS USED

AREAS-MATRIX BY DEPT. 11.00 42.00 36.00 10.00 20.00 20.00 28.00 61.00 50.00 22.00 10.00 12.00 20.00 16.00 13.00 19.00 11.00 38.00 35.00 10.00 16.00 19.00 25.00 49.00 47.00 21.00 29.00 13.00 16.00 16.00 14.00 21.00 11.00 35.00 19.00 10.00 14.00 74.00 21.00 46.00 45.00 18.00 30.00 14.00 16.00 13.00 11.00 17.00

RENOVATION COST PER SQ. FT.BY DEPT. 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00

DEPARTMENT - OPTIMAL LOCATION 1 -- 13

COST OF THE OPTIMAL ASSIGNMENT 123 15.10

RULES ARE BEING USED, THRESHOLD- 0.80000

THE OPTIMAL LAYOUT FOUND DEPT. NO. (XL,YL) (myv> 1 0.000 14.689 17.679 17.461 2 4.565 7.851 11.046 14.331 3 13.947 0.000 18.639 7.851 4 18.639 6.090 21.885 9.193 5 18.009 19.084 23.489 26.217 6 21.885 5.715 26.357 10.187 7 21.885 13.016 27.542 16.650 8 6.110 24.572 13.593 28.314 9 4.637 17.572 13.593 24.572 10 4.565 14.331 11.046 17.572 11 7.239 0.000 13.947 7.851 12 11.046 11.372 17.679 14.689 13 11.046 7.851 13.955 11.372 14 23.489 16.650 25.938 21.549 15 13.593 17.461 18.009 26.293 16 17.679 9.193 21.885 14.042 17 21.885 10.187 27.542 13.016 18 13.955 7.851 17.679 11.372 19 18.009 14.042 21.885 19.084 20 4.789 2.351 7.239 7.250 21 3.593 14.689 17.679 17.461 22 5.007 7.851 10.947 14.331 23 13.947 0.203 18.639 7.851 24 17.555 7.851 21.885 10.187 25 0.219 17.572 6.593 24.572 26 21.885 16.457 27.542 19.285 27 21.885 13.016 27.542 16.457 28 6.593 24.572 13.593 28.158 29 6.593 17.572 13.593 24.572 30 13.717 9.319 17.555 14.689 31 7.239 0.000 13.947 7.851 32 7.112 14.331 13.593 17.572 33 13.593 17.461 17.679 24.683 34 21.885 7.629 26.971 10.187 35 17.679 19.285 23.178 22.858 36 17.679 10.187 21.885 14.042 37 21.885 10.187 27.542 13.016 38 10.947 9.040 13.593 14.331 39 17.679 14.042 21.885 19.285 40 4.894 2.351 7.239 7.041 41 13.593 14.689 17.679 17.461 42 7.239 6.708 13.717 12.227 FLOW COST IS 12466.16 RENOVATION COST IS 437.10 THETOTALCOSTIS 12903.26

100000 NODES SEARCHED 1353 VARIABLES 85 MT. VARIABLES 1328 CONSTRAINTS TIME= 69945.8 Summary

A facility layout problem decides the proper positions' of a collection of departments to minimize total flow costs. Facility layout is not only limited to plant layout but also includes architectural space planning, manufacturing cell layout and VLSI design etc.

A dynamic layout problem generates a series of static layouts each representing the facility layout at a unique point in time. An existing dynamic layout algorithm uses branch and bound algorithm. Larger problems can not be solved due to number of integer variables. This thesis develops a more efficient branch and bound algorithm which reduces number of nodes searched, reduces memory required, and improves total cost where optimal solution is not reached.