The classic Quadratic Assignment Problem stipulates that we are assigning some number of departments to an equal number of potential locations. We are given the volume of traffic aka the flow between each pair of departments and the distances between each pair of locations. The problem consists in assigning departments to locations to minimize the total volumedistance travelled ie interdepartmental flows times interlocation distances This could often correspond to minimizing material handling costs or time. For example, lets say the daily flow between departments and was trips. Furthermore, assume department is assigned to location and department to location If the distance between locations and was meters, then the volumedistance between these two departments would be times tripmeters. Obviously, the goal is to locate departments with large interdepartmental flows close together while department pairs with little traffic can be located further away from each other.
Youve been provided with an Excel spreadsheet whose complexity shows how tricky the problem is even for a very small instance of the problem: assigning departments to locations. This problem is small enough to be solved by enumeration as there are only possible assignments. However, our goal here is to use the problem to illustrate the idea of local search.
We will express solutions by giving the assigned locations of our respective departments. Thus our initial assignment of means that the first department is assigned to location the second to location and so forth. This initial solution is given both in red in cells C G and in black in cells C G in the project spreadsheet; it has an objective function value of which we see in cell H One way to improve on this solution is to swap the locations of any pair of departments. We define solutions found in this manner to be neighbors of our current solution. For example, the first neighbor of our starting solution would swap locations of departments and giving the solution Now department is given location while department gets location To find the objective function value of this neighboring solution, the sequence would be entered in cells C G on the spreadsheet, at which point cell H would display the neighbors objective function value. Investigate each of the C neighbors of the current solution the one in red that can be created by swapping any pair of departments. To do this, perform one swap at a time, writing down its objective function in the following table, and then return to the original or current solution after each swap. The first neighbors are filled in though not their objective function values For convenience, the current solution is shown in red in cells C G so that its easy to get back to it after investigating each neighbor.
Row Departments whose locations are swapped Neighbor Objective Function
and
and
and
Local search investigates all neighbors of the current solution which you just did and then moves to the one which gives us the best objective function value. This best neighbor becomes our new current solution. Specify the new current solution solution by listing the locations of the departments, in order as seen in the table above. Update the Current Solution the red cells in C G on the spreadsheet to reflect this new assignment. For example, if the first neighbor had the smallest objective function value which it does not, although it does give a better objective function value than the initial current solution then your new current solution would be
New current solution:
Perform one more iteration of local search by investigating all of the neighbors of solution :
Row Departments whose locations are swapped Neighbor Objective Function
and
and
and
As you did before, identify the best neighbor of solution and make this best neighbor the new current solution solution Update the red cells in C G with the new solution.
Current solution :
At this point, weve seen how local search works. As long as we can construct a neighborhood of an initial solution which isnt always trivial; it can be applied fairly easily, and it often will rather quickly make dramatic improvements on initial solutions. In our final project, well investigate its limitations and see how these are often addressed.