Generalized allocation problem in building design Part I: formulation J T Buchanan Problems o f efficient internal design can often be formulated as a constrained optimization programme with (at /east some) discrete variables and a linear~ or quadraticj objective function, depending on the nature of the underlying measure. In this first part (of a twopart paper) we present detailed considerations o f the problem with a linear objective function, offering five mathematical programming formulations. In the context of one small and one mediumsized example we examine the 'scale' o f these formulations and comment on their practicability. A few remarks are offered on the quadratic problem. Implementation details o f some o f the formulations are the subject o f another paper.
A common problem in architectural design is the proper and efficient use of an existing structure for a new function. Existing layouts are to be adapted (eg by the removal or modification of partitions) to meet a set of defined needs. This adaption must take into account the suitability of existing units for their new function, the cost of any modifications and some measure of the value of the final layout..At the early, informal stage of formulation, modifications which are obviously costly may be ruled out, eg any new layout which would mean change to an external or Ioadbearing wall, though technically feasible, is excluded from consideration. In the initial layout there exist acceptors which have physical and possibly subjective attributes (eg floor areas, ceiling height, levels of natural and artificial light, quality of decor). The components of the final layout are described in terms of functional units, and these again have physical and other attributes. By comparing the attributes of acceptors (or, more commonly, sets of acceptors) and functional units a list of possible allocations can be generated. For each feasible assignment of functional unit to acceptor set there is a conversion cost which summarizes the 'local' costs of the operations involved. Between pairs of assignments there is a cost which can incorporate up to two qualitatively distinct measures. The first of these reflects the interaction of the functional units in terms of the costs which cannot be assigned to one functional unit/acceptor set pair. For example, two laboratories in one building may both have particular needs for gas, power, ventilation and
waste disposal. The cost of provisioning will depend on not only the particular sites for each laboratory but also on the relationship between these sites. Contiguity may reduce these costs (called conditional conversion costs) by allowing shared facilities. Another source of cost is in the evaluation of the final layout. High levels of traffic between functional units reflect the desirability of keeping these units as close neighbours in the final layout. The resultant association cost is expressed either in cost per unit distance between the two functional units in the final layout, or (more usefully from our viewpoint) as a cost per appropriate pair of functional unit/acceptor set assignments. These conditional conversion costs and association costs can, of course, be amalgamated into one figure. The generation of feasible allocations and the calculation of the conversion and association costs are considerable problems in themselves. Substantial discussion of this data generation phase may be found in Fitzau ~, while we are content to take the data as given. Except for the last section of this paper we concentrate on the problem with only the unconditional conversion costs.
Two examples are used. The first small example allows an easy and complete demonstration of a number of formulations and their properties. The second example, of a more realistic complexity, is mainly used to provide an indication of the merits and difficulties of the various formulations.
EXAMPLE 1 The initial layout is illustrated in Figure I. We useA ~ t o A s to denote the existing acceptors. Nuances such as doors and
A6
volume 13 number 4 july 1981
A8
Externalor Ioadbearing wall, not changeable Partition, existing, changeable .....
Department of Operational Research, University of Strathclyde, Livingstone Tower, 26 Richmond Street, Glasgow G1 1XH, UK
A7
Partition , not existing, possible
Figure I. Initial layout (example I)
00104485/81/0421110 $02.00 © 1981 IPC Business Press
211
6
A29
o
I I I
A26
6
[ 427 I
9 I I
A36 I A37
A38
A39
.... A4o I A41
A32
A31
A45
As1
I I
....
O
A42 I A43
I
I
6
6
A47
A50
6
I I I I I
A13
A14
t
A15
A,~
I
A,7
A18
A2°
I
I I
A22
A21
I
A23
t
A24
I
I I
A25
A49
I I
I I
I
Figure 2. Initial layout (example 2)
windows are omitted. There are four functional units (denoted F1 to F4) to be accommodated in the redesign. By matching available and desired attributes (mainly floor area, ceiling light and room 'standard') we construct the feasible allocations of functional unit to acceptor set given in Table 1, where the components of each acceptor set are designated in Table 2. Table 3 gives the conversion cost (in £s say) for each feasible allocation of functional unit to acceptor set.
EXAMPLE
2
Figure 2 illustrates the initial layout for the second example. The 51 acceptors can be grouped into 98 distinct acceptor sets and the 17 functional units are to be allocated over these acceptor sets. Table 4 shows the feasible acceptor sets for the functional units, while Table 5 lists the constituent acceptors of the acceptor sets. Table 6 gives the unconditional conversion costs for all possible allocations.
SOME REMARKS Table 1. Feasible allocations of functional unit to acceptor set
Functional unit
Acceptor sets
F1 F2
S1, $2.~ $3, $4 Ss, $6, $7, $8
F3
$5, $6, $7
F4
51, $2, 53, $4
Table 2. Components of the acceptor sets
Acceptor set
Constituent acceptors
S1 S2 $3 S4 Ss 56 $7 Ss
A2, A3 A3, A4 A4, As A6, A7 A t, A2 A2, A3, A4 A 3, ,44, A 5 As
212
ON THE PROBLEM
Our main concern is to investigate a variety of formulations which reflect the problem structure described above. These
Table 3. Conversion cost Functional unit
Acceptor set S, S2 S~
F, F2
407
F3
.
F4
407
S4
432 327 334 . . . . . . .
.
450
.
345
334
Ss
S6
S7
S8
. . . . . . .
232
293
328
196
365
400
.
.
.
.
48
.
Table 4. Feasible acceptor sets for the functional units Functional units
Acceptor sets
Fz F2 Fu Fla, Fl6,
SI  Sn S12   5 4 9 Sso  $64 565 .... 572 S ~  $98
Flo  Fz3 Fls F17
computeraided
design
Fable 5. Constituent acceptors of the accepter sets
~,cccptor Constituent acceptors Acceptor
;l
AIa,A14,Axs,AI6,AI?,
547
A,~,A46
S4e A 14,A ls,A 16,A 17,A18, 549
A4s,A4?
A16
;2
A 19
;s ;4
A=o,A21,A=2'A=a 'A=4 Ala, A19 'A=o'A21'A==
;s
A19,A=o'A=1'Aa= 'A=a
~6
A 21,A 2=,A =a,A =4,A =s, A 49
~7 Ss So
Szo 511 s,=
5l~ $14 Sis 516 517
Constituent acceptors
set
;et
AIs,AIg,Aso,A=l'Aa= ' A =a,A =4 AI6,AIT,AI6,AIg,Aso, A 21 Aat,,A27,Az6,A29,Aao, A 31,A a=,A aa,A a4,A 36 A=6,A~7,Asa,A29,Aal, A a~,A aa ,A 64 A~,Aaa,A=~,Aao,Aaa , A aa,A a4,A a s
A I,A2 A ~,A ~ A a,A 4 A ~,A s A 6,A 6 A 6,A 7
Sso Ssl $52 Ss3 Ss4
Sss Ss6
Ss7 Sss Ss9 S6o 5~1 56= St,3 S6,~ Ses S66
567 $66 $69
A so,A 61 A =,A 2,A 3
A='A3'A4 Aa'A4'A5 A4'As'A6
A s,A 6,A v A 6,A 7,A a AT'As'A9 A 8,A 9,A lO Ag,A1o,A11 A lo,A ~,A ~= AH,AIs,A46 A 2o,A ~1 A21,A22 A 19,A 2o A~,A~ A ~a,A 14,A I s, A 16 A 14,A ls,A 16,A 17
571
A ~s,A16,A~?,A16 A ~6,A 17,A la,A t~ A ~7,A~s,A~,A = A ~,A aa,A~,A =s A =~,A ~ , A as,A 46
Sw
A 26,A 2~,A ~6,A 31,A ~,
570
Sle. S~
A ~,A ~
S=o S~
A ~,A ~o A t0,A ~
57a 574
A la,A 14 A ~,A is
S:: S:3 S~ S=s S :6
A 11,A i: A t:,A 48 A ~o A 21
Svs
A ~s,A 16 A 16,A j? A ~?,A 1e A ~6,A 19
527 528 S:9
A :6,A :? A 27,A~6 A :a,A :9
S ~o
A :~,A 3o
5~1
A 26,A ~
A3a
Aa,A~
A :2
S,'16
57? S?s 5 ?9
Sso S8~ 562 5~ Ss4
A :3,A 24
A 24,A 26 A :s,A 49 A~s,A so,A sl A ~4,A 4s,A 4? A 44,A 4s,A 46
56=
A ~7,A32
Sss
A ~,A s0,As~
Sa~ S~ S~s S a6 5~7 5as 5~9 S~o
A 26,A ~ A 29,A ~4 A ao,A ~ A ~1,A a: A a:,A 3~ A ~a,A ~4 A a4,A ~s A a6,A 37
566
A 4s,A 46,A 4,I
58 ? 566 S s~ $90 S~ 59= 5~3
A 44,A 4e,A 4~ A ~e,A a?,A 40,A 41 A ~7,A ~e,A 41,A 4= A as,A a~,A ,=,A 4a A :6,A 27,A 61 A 26,A :7,A 32 A 27,A 28,A 32
S,~
A a~,A~e
S94
S4~
A 38,A 39
5.3
A .~.A .~
S95
Sge
A 27,A2.,A 36 A 28,A29,A33 A 2e,A:~,A a~
544 54s
A 4s,A s~ A 46,A 47
$97 S~
A :9,A 3o,A 34 A ~,A ~,,A ~s
546
A 47,A So
involve to a greater or lesser extent the use of discrete variables (in fact binaryvalued variables). Unlike, say, linear programming models, those with a combinatorial aspect are notorious for their computational intractibility, and most algorithms involve an enumerative structure (eg a tree). Such problems will not generally be solvable in 'polynomial time' (ie in a time which is a polynomial function of problem size) and are generally described as being in the class NP. Within NP is a large class described as NPcomplete, which contains most of the classic hard problems of combinatorial optimization. These problems are 'equivalent' in a technical sense, and membership of the NPcomplete class is a strong indication that no good (ie, polynomial time) algorithm is likely to be forthcoming for that problem. The practical alternative is an enumeration
volume 1 3 number 4 july 1981
technique, which must of course involve only partial enumeration if it is to be of use. Models which include the association and/or conditional conversion costs inevitably lead to quadratic terms in the objective function. The quadratic assignment problem is not only NPcomplete, but even the eapproximation problem for the quadratic assignment problem is NPcomplete 2 . (An algorithm is said to be eapproximate if it guarantees a feasible solution x with objective function value z(x) for a problem where the optimal objective function value is z ° and z(x) satisfies
I z°z(x)
7I
where e > 0). Since our problem will be shown to be a quadratic assignment problem with additional complicating constraints, the complexity results do not auger well for an exact (or even approximate) algorithm. Discussions of the quadratic assignment problem may be found in Lawler 3 and Burkand 4, while relevant articles on compu rational complexity are Karp s , kenstra 6 , Maffioli ~ and Sahni and Horowitz 8 . Our initial efforts at formulation ignore costs which lead to nonlinearities in the objective function. The problem does not formulate as a linear assignment problem (for which well known and well understood solution mechanisms exist), but has additional complicating features. A variety of formulations demonstrate the manner in which these complications may be accommodated. Where possible we speculate on the effort involved in pursuing a solution. Later we present a formulation incorporating the quadratic terms and briefly suggest some lines of attack. An investigation of the problem using only (unconditional) conversion costs is useful both in a positive and negative sense. Should this problem prove intractable there is little hope of a successful attempt at the quadratic problem. However, if the simpler problem proves amenable, the lessons learned about this model can be of direct use in tackling the more complicated version. PROBLEM
DEFINITION
AND
NOTATION
We are given a set of acceptors A = [Ak} (index set K), out of which a set of acceptor sets S = [Sj] (index setJ) has been generated. An acceptor set may consist of only one acceptor, and an acceptor may appear in several acceptor sets. A set of functional units F = [ F i ] (indexed by/) is given together with feasible assignments of functional units to acceptor sets, and the corresponding conversion costs. We define Ji to be the index set of acceptor sets for which an assignment of functional unit Fi is possible. Let Kj be the index set of acceptors which are members of acceptor set Sj. Define Jk to be the index set of acceptor sets of which acceptor A h is a member, and Ij to be the index set of functional units which can be assigned to acceptor set Sj. The problem is to construct a minimum cost assignment of all the functional units to some acceptor sets. We assume the problem is well posed, ie feasible solutions exist. A feasible solution has three properties: •
Each functional unit is assigned to one and only one acceptor set.
213
Table 6. Unconditional conversion costs Functional
unit
Acceptor set S~
F~
S~
30
Ss
70
S,
30
Ss
55
56
30
S:
70
Ss
59
52o S2z $22 $23 S~ S2s 52~ S~v S~s S~ S~o S~ $3~ S~ S~, S~s 5~6
St~ Szs 5~4 Szs Sz6 Sz~ S~s S~ F~ F~
0 1
15 16
0 1
15 16
0 1
15 16
0 1
15 16
F4 Fs F~
2 5 3
17 20 18
2 5 3
17 20 18
2 5 3
17 20 18
2 5 3
17 20 18
F~
4
19
4
19
4
19
4
19
F~
2
17
2
17
2
17
2
17
F9
4
19
4
19
4
19
4
19
6
21
6
21
6
21
6
21
97 76 35
97 76 35
97 76 35
97 103 101 76 83 81 35 39 37
99 79 35
97 77 33
/=10 ~ F~2 F~
0 1 2 5 3 4 2 4 6
15 16 17 20 18 19 17 t9 21
25 26 27 30 28 29 27 29 31
25 26 27 30 28 29 27 29 31
135 136 137 140 138 139 137 139 141
160 161 162 165 163 164 162 164
135 136 137 140 138 139 137 139 141
108 109 110 113 111 112 110 112 114
166 S~o Ssz Ss~ Ss~ Ss4 Ss~ Ss~ Ss~ Ss~ S~9 S~o S~ S~ S~ 564 97 122 77 102 33 58
231 231 231 231 231 231 231 231 231
201 201 201 201 201 201 201 201 201
138 138 138 138 138 138 138 138 138
236 236 236 236 236 236 236 236 236
236 236 236 236 236 236 236 236 236
139 139 139 139 139 139 139 139 139
156 156 156 156 156 156 156 156 156
139 139 139 139 139 139 139 139 139
144 145 146 149 147 148 146 149 150
62 247 247 249 249 41 247 247 249 249 0 247 247 249 249
56~ $66 $67 568 $69 570 S?I $72 380 440 380 415 429 462 390 411 380 440 380 415 429 462 390 411
F~ F~s
S.
S~4 S~s S ~
S~
S~s S .
~
1
61
1
61
1
36
~
0
60
0
60
0
35
• •
S~o 5~
95 132 145 150
85
S~0 581 582 $83 584 SBs S86 587 S88 $89 $90 S9l $92 $93 $94 595 $96 $97 1 18 48 18 18 35 18 10 65 0 5 5 48 18 0 30 35 36 0 18 48 18 18 35 18 10 65 0 5 5 48 18 0 30 35 10 35 11
XFis /
Each a c c e p t o r is assigned t o at m o s t o n e a c c e p t o r set. T h e a c c e p t o r sets are p r o p e r l y c o m p o s e d (ie if a given set is used t h e n all a c c e p t o r s w h i c h c o n s t i t u t e t h a t set are i n d e e d assigned t o it).
=
] if
Fi
S/
is assigned to
0 otherwise. S i m i l a r l y define
xsiA
k =
F O R M U L A T I O N ONE
forjeJ
and
keKj
1 if A k is assigned to
S/
0 otherwise.
P r o b l e m s of this t y p e may be f o r m u l a t e d by the use o f z e r o  o n e (binary) variables. We define a variable XFiS/such t h a t (for all iel andjeJi)
C o r r e s p o n d i n g t o the first p r o p e r t y above we have
~" XFiS j = 1
(1)
V iel
je//
Table 7. T h e constraints in detached c o e f f i c i e n t f o r m
F!
1
1
1
= 1
1
1
F2
1
1
1
G F~ S~ $2 $3 $4 5s $6 S~ $8 AI A2 A3 A4 As A6 A7 As
214
= 1
1 1
= 1
1
1 2
1 1
2 2
1

1 1
2 2

1 1
2

1 1
2
0
= 0 1 1 1
3
3
0
= 0
1 1
2 2
1
= 0
1 1
= 0 I 1 1
3
1
1
0 = 0
1 1
1 1
<1
1 1
1 1
1
1 1
1
41 ~<1
1 1
41 < 1 < 1 I
<1
c o m p u t e r  a i d e d design
formulation for the sake of clarity. This formulation  or more correctly a relaxation of it  reappears later, and we postpone comments on numerical solution until then. One striking feature in Table 7 is the structure of the coefficient matrix. All columns have only two nonzero numbers in them, ie all variables appear in exactly two constraints. In the mathematical programming literature considerable work will be found dealing with problem . structures of this type. We postpone further comment until the formulation makes its second appearance. The second example will give a formulation with 166 constraints (17 functional units, 98 acceptor sets and .51 acceptors) in 758 variables of which 466 are of type XFiSj and 292 of type xsj A k" Again each variable appears exactly twice in the constraint set.
S37 ~38 ~39 S4o $41 ~42 543 544 545 $46 547 $48 549
255 254 237 296 339 321 326 296 398 368 332 362 282 255 254 237 296 339 321 326 296 398 368 332 362 283 255 254 237 296 339 321 326 296 398 368 332 362 284 255 255 255 255 255 255
237 237 237 237 237 237
254 254 254 254 254 254
296 296 296 296 296 296
339 321 326 296 339 321 326 296 339 321 326 296 339 321 326 296 339 321 326 296 339 321 326 296
398 398 398 398 398 398
368 368 368 368 368 368
332 332 332 332 332 332
362 362 362 362 362 362
287 285 286 284 286 288
FORMULATION TWO
S9B 30 30 f
and to the second property
T. xsj Ak <~1 jeJk
VkeK
(2)
Defining ISI to be the cardinality of a setS, the third condition gives ~"
XSlA h = I Kj I
keKj
(3)
ifSj is used. Otherwise we want keKj
xs/A k = 0
(4)
we can combine (3) and (4) to give
T.
keKj
xSiA = IK/I (~. xF/sj) V i a l h
ielj
The problem of grouping the acceptors into acceptor sets and assigning the acceptor sets to functional units can be represented pictorially. We construct a graph with a vertex (node) corresponding to each acceptor, acceptor set and functional unit. Edges (arcs) between acceptor and acceptor set indicate potential membership of acceptor in acceptor set, while edges between acceptor set and functional unit indicate a (possible) assignment of acceptor set to functional unit. The small example gives rise to the layout as in Figure 3. With this representation we can attempt a formulation as a variety of transhipment problem. (The constraints of formulation one resemble those of transhipment problems). If we make unit quantities available at each of the acceptor nodes and direct all arcs from left to right, we have the beginnings of the formulation. The only costs are in the arcs linking acceptor sets to functional units. The nodes corresponding to acceptor sets are transhipment nodes of the problem, ie, there is no net demand or availability at them. Since all the acceptor sets serving F1 have 2 constituent acceptors we can set a demand of 2 at the F1 node, and
(5)
since ~; XFisj = 1 ifSj is used, and zero otherwise.
ielj
If cFiSj is the unconditional conversion cost of assigning functional unit F i to acceptor set Sj then the problem may be stated as minimize Z
~
cFiSj XFiSj
iel JeJi subject to (1), (2) and (5) with all variables restricted to be zero or one in value. For our first problem this gives a formulation with 20 constraints (one for each functional unit, acceptor set and acceptor corresponding to (1), (5) and (2) respectively) and 32 variables of which 15 are of typexFiSj and 17 are of type xsj A k" Table 7 demonstrates in detached coefficient form the nature of the constraints. Only the variable indices are given (at the column headings), and the origin of the constraints is denoted at the lefthand side. The constraints have been rearranged to gather all variables in the table, leaving a righthand side which is only a numerical value. Four of the constraints (corresponding to A 1, A 6, A 7 and A 8) are redundant but have been retained in the
volume 13 number 4 j u l y 1981
v
Figure 3. Grouping of acceptors and assignment of acceptor sets to functional units (example 1)
215
scale the costs of the appropriate arcs (S1F1, S2F1,
S3F1, S4F 1 ) by ½ to give the proper assignment costs. This does not so far guarantee that the demand of 2 at Fx is not satisfied 'illegally' (ie, infeasibly) eg by a 1 along S1FI and a 1 along S4Fx. We have yet to ensure the proper assembly of the accepter sets to be used. Demand at F4 can be set to 2. Nodes F2 and F 3 are different from FI and F4 in that each may be assigned accepter sets from a set which has accepter sets of differing cardinality. In the case of F2 the number of accepters can be 1 (A8), 2 (,41 and ,42) or 3 (either A2, A3, A4 orA3, A4, As). Demand at F 2 is therefore greater than or equal to 1, rather than equal to a predetermined amount. Similar remarks hold for F 3. If we attempt a formulation with, say demand at F2 constrained only to be ~>1, then this could be met by 1 along the SsF2 arc. Again we have not so far ensured that acceptor sets which are actually used are properly constituted. One technique which simultaneously caters for acceptor sets of differing cardinality and ensures the 'integrity' of the assignment involves the use of nonlinear constraints. This is hardly surprising in view of the Boolean nature of the property we are attempting to model. At F~ we want the demand of two to be met along S3'F 1 or S2F1 or S3F 1 o r S 4  F 1 . With the same definition of variables as in formulation one this is equivalent to
the number of zeroone variables, but at the expense el introducing nonlinear constraints. Nonlinear (product) terms can be 'linearized' ill a variety of ways. Given that the constituent variables are not binary, perhaps the easiest scheme is that of Chapter 3 in White et al 9. I f we have a constraint x,x2xsx4 : 0
(9)
where 0 ~< x i <~ U i (i=1, . . . , 4), then equivalent to this is the set of constraints xl x2 xa x4
~< At UI ~< A2 U2 ~< A3U3 ~< A4 U4
(10)
%3 Ai (i=1, . . . , 4) are z e r o  o n e variables A 1 tA 2 + A 3 + m 4
Here one nonlinear constraint is replaced by 5 linear constraints with 4 additional z e r o  o n e variables. The four nonlinear constraints of the small problem would be replaced by 19 linear constraints with 15 additional zeroone variables. Equivalent substitution in the large problem would result in the 17 nonlinear constraints being replaced by 483 linear constraints and 466 additional z e r o  o n e variables. Although succinct in its original form with nonlinear constraints, this formulation does not recommend itself.
(2xF, s, ) (2xF, s~ ) (2xF, s, ) (2xF, s, ) : 0 This statement is true if at least one of the variable values is two. Minimization of the objective function ensures that the remaining variables are zero. (We do not have to use all available resources from the accepter nodes). For node F: we can similarly write
AN ASI DE
(2XF 2S s ) (3XF 2 S, ) (3XF 2$7 ) (IXF2 S, ) = 0 Denote CF/Sj = CFiSi/IS~ Ire ensure the proper scaling of assignment costs. The formulation is thus minimize subject to
Y. .~, CFiSj XFi5 / icl /c5/ XSiA I~ <~ 1 V keK
(6)
~" XS/A te = % XFiSj VjeJ heKj ielj
(7)
~'
je J#
n
(IQIxrisi):
o 'vie/
(8)
~el i
Variables of type XSiA k are to be z e r o  o n e variables, but the variables XFisj need no restriction of this type. Constraints (6) (which are the same as (2)) ensure that each accepter is used at most once. Constraints (7) (similar to (5)) ensure that there is no net demand or supply at the accepter set nodes. Constraints (8) ensure the integrity of the accepter sets used, and also ensure that each functional unit is assigned. For the small example there are 16 linear constraints (8 for accepters and 8 for accepter sets) and four nonlinear constraints (one for each functional unit). Of the 32 variables, 1 7 are constrained to be zeroone. For the large example there are 149 linear constraints (corresponding to accepter and accepter set nodes) and 17 nonlinear constraints (for the functional unit nodes). Of the 758 variables, 292 are zero one. In comparison with formulation one we have reduced
216
The complicating features of this problem are the need to cater for demands (in terms of acceptors) which are not of a fixed quantity (eg at F2 and Fg in the small problem) and to ensure that these demands are satisfied 'legitimately'. A later formulation easily encompasses both of these features, but (in terms of its ability to provide numerical solution) is still 'compromised' by the first. One approach (which is currently under investigation) is to divide the problem into sections, one corresponding to the (costinducing) assignment of acceptor sets to functional units, and the other examining the feasibility of such assignments in terms of the constituent acceptors. Thus the S to F section of the graph (with the addition of a dummy functional unit to balance supply and demand) gives a transportation problem. Availabilities of 1 are set at all the S nodes and demands of 1 at all the F nodes, with the surplus supply being sent to the dummy functional unit at no cost. Such problems may be solved by a linear programming algorithm, or more efficiently tackled by a special purpose code. Discussion of this and related problem types can be found in Bazarra and Jarvis 1°, Lawler n and Christophides 12, while information on special purpose codes is available in Bradley et a113 and Clover and Klingman 14. By examining theS nodes used by the nondummy F nodes the feasibility or otherwise of this solution is easily established. The interdependence among the accepter sets can be represented in a graph, with nodes corresponding to the acceptor sets and arcs linking dependent sets, ie, acceptor sets with accepters in common, and therefore unable to be allocated simultaneously. Figure 4 illustrates the graph for the small example. This graph could perhaps be used to establish and maintain feasible
computeraided design
sets of acceptor sets which are optimally allocated to functional units in the transportation portion of the 'method'. Figure 4 is also a feature of the dynamic programming formulation for this problem. A direct link between two acceptor sets indicates that they have at least one constituent acceptor in common and any feasible solution cannot use such pairs of acceptor sets. For the second example the corresponding graph has 51 nodes and several hundred arcs. We have not included a figure for this.
FORMULATION
G G
THREE
We briefly examined a formulation which attempts to bu lid the functional units directly from the acceptors without explicitly constructing the intermediate acceptor sets. For this we define a new variable XFi A h for iel and ke U Ki such that
Figure 4. Interdependence graph (example 1) f(F,S) = min [cFiSj + f(F_FI ~ T(S,Sj))]
JeJi
XFiA k =
(n
jeJi heKj
xFiAk) =1 V ie/
(11)
To ensure that each acceptor is used at most once we must have (defining I k to be the index set of functional units to which acceptor h can be assigned)
iel k
FieF
1 if acceptor Ak is used for functional u n i t F i 0 otherwise
To ensure that the assignment to functional units is correct we need
XFiAh<~ l VheK
(12)
The objective is to minimize
~, ~, CFiSj (R Xdi A h) iel jEJ i heKj subject to (11 ) and (12), with all variables zero or one. For the small problem this gives a formulation with 21 variables, eight linear constraints and four nonlinear constraints (in which there are 15 distinct nonlinear product terms). In Glover Is and Glover and Woolsey 16,17 are given schemes for reducing polynom ial zeroone terms to an equivalent set of linear constraints in the original and additional (continuous) variables. We present no details since the results were rather negative. In one scheme the four equations of (11 ) are replaced by 34 linear constraints, and in another version there are 42 replacement constraints.
(13)
SjeS, jeJi IfSj (3 S =~ Vj CJi then we take the minimum to be +oo. We use F  F/to denote set F with F/ removed, and denote by T(S,Sj) the residual set of acceptor sets, after removal of Sj from S. Since acceptor sets have acceptors in common the use of a given acceptor set reduces the membership of S in a manner which is clear from the dependency graph. Equation (13) has no explicit stage variable, though a formulation incorporating one is trivially different from (13). As will be seen in our working of the small example the efficiency of the calculation procedure is dependent on a proper exploitation of the dependency graph. If we structure the calculation in the small example to give a set of nested 'F' (ie F = F1, then F = FI UF2, then F = F1 UF2 UF3 and finally F = F1 UF2 UF3 UF4 ) we can easily enumerate the S sets which have to be examined. (See Table 8.) If instead the F sets are F3, 1:3 UF2 , F3 UF2 UFz , F3 UF2 UFI UF 4 then the numbers of distinct states at each stage are respectively 3, 4, 6 and 2. Even this small example demonstrates the effect of differences in the order in which the functional units are taken. For this example a solution is easily obtained by hand calculation. In the second example we would have a sequence of 1 7 nested 'F' sets, and again it would be possible to exploit the corresponding dependency graph to exercise control over the numbers of states at any given
F O R M U L A T I O N FOU R The dependency graph of Figure 4 is a feature of the dynamic programming or sequential formulation. In common with most other DP formulations we define a function which is just the problem to be solved and construct a recursion (involving the Principle of Optimality) from which we can calculate solutions. There are at least two possible definitions of an appropriate state variable for this problem. Sets of functional units appear in both, but there is the alternative of using either acceptor sets or acceptors (in sets) for the other component. We choose to present a formulation in terms of functional units and acceptor sets. Denote by F a set of functional units and by S a set of acceptor sets. Let f(F,S) be the minimum total cost of assigning all functional units in F to acceptor sets of S. Then
volume 13 number 4 july 1981
Table 8. S sets to be examined
F
Fl
F1UF2
FIUF2UF3
FIUF2 UF3UF4
$1 S=
53 $4 Number of distinct 4 states
SiS8

S2Ss,S2Ss S3Ss,S3Ss 545s,$456, $457,545s
S2SsSs S2SsSsS4 S3SsSs S3SsSsS4 S4SsST,S4SsSs S4SsSsS~ S4S6Ss,S4STSs S4SsSsS3

9
6
2
217
stage. Given an efficient system of deleting acceptor sets (ie, forming the T(S, Si) set), or, rather forming the state space at each stage (which may be thought of as an operation involving the 'inverse' of the function T) this example offers no extra mathematical difficulties over the smaller one. The organization of the use of the dependency graph is nontrivial and we have not explored this. The arcnode incidence matrix for t h e A  S portion of the network (which will be 98 by 51) can easily be held in a more compact form. (This allows a representation of the dependency graph without explicitly constructing it). The merits of the different approaches can only be properly judged by numerical experimentation. One line worthy of exploration, given the dependency graph and the possibility of generating independent or quasiindependent subproblems is the 'hybrid' approach of Morin and Marsten t8 where the 'fathoming' notions of branchandbound are used in a dynamic programming context. Any hope of successful application depends on good fathoming techniques, and this in turn is a function of the subproblems generated in the DP.
FORMULATION FIVE Returning to Figure 3 (used in our second formulation) we generate another network formulation which avoids nonlinearities, and even has some variables relaxed to a bounded continuous condition, rather than being zeroone. Compared to our earlier network attempt, we reverse the orientation of the arcs so that now they run from F to S nodes and from S to A nodes. We establish availabilities of I at each of the F nodes, demand that 'flow' is conserved at the intermediate S nodes and limit the demand at the A nodes to be at most 1. Reference to l.awler 11 and Glover and Klingman 14 demonstrates the usefulness of socalled generalized network formulations, where 'flow' may be enhanced or reduced between arcs. With each F to S arc we associated a multiplier of value equal to the cardinality of theS set. Thus the FISI arc has multiple 2, the F2$6 arc multiple is 3, etc. On the arcs from S to A we limit 'flow' to be nonnegative and upper bounded by one. If the availabilities at the F node must be used, and only in integral (ie, zero or one) quantities, this formulation guarantees that assigning a functional unit to an acceptor set (ie, making initial flow one along that arc, but multiplied by the arc multiplier on reaching the acceptor set node) will automatically enforce the proper use of the constituent acceptors. For example, if flow from F2 to $6 is value I (out of F2) then the multiplier on this arc (equal to IS61 = 3) means that a flow of 3 reaches $6. At this node flow is conserved, ie a flow of 3 must leave $6. There are three arcs leaving $6 (to A 2, A 3 and A 4), each of maximum capacity 1, and thus a flow of one is sent along S6A 2, SoA 3 and $6A4. Given that demand at every A node is at most one, these acceptors cannot be simultaneously assigned to any other acceptor set. Costs, as before, are incurred on the FS links. Note that, although the variables for the FS links are zero or one in value, the variables measuring flow along the 3,4 arcs can be allowed to be continuous, but bounded above by one. The effect of the multiplier is to ensure that the SA variables do only take zero or one values. To ensure that the availabilities at the F nodes are conserved we have
218
~,, XFisj = 1 Vie/ JeJi
(14)
Flow conservation at the acceptor set nodes corresponds to
S xsjA k = IK/I (~1/ xFiS/) V j61 heKj
(15)
and constraining demand at acceptor nodes to be not more than one gives
JeJh
xsj Ak <~1 V heK
(16)
Our objective is to minimize ~. ~
iel jeJ i
XFiS/ CFiS]
subject to (14), (1 5) and (16). The xFiS] variables are zero or one, the others satisfy
O<xslAk <~ 1 VjeJ, heKj
(17)
Apart from (17) this formulation is identicalto formulation one, and the firstexample generates a constraint set as given in Table 9. (Bounds of the form (I 7) are not treated as extra constraints, but as characteristics of the variables and the solution mechanics can accommodate this). The first example now has 15 zeroone variables and 17 continuous variables, while the large example has 466 zeroone variables and 292 continuous variables. (In fact the bounds (17) can be ignored given that they are implied by (16).) Transportation and transh ipment problems are attractive by virtue of their wide applicability, as well as having an important mathematical property. Because of the structure of the basis matrices which emerge when solving these problems as LPs (linear programmes) they are totally unimodular  see, for example, Bararra and Jarvis I° the variables will take integer values (given integer data) without this being specifically required. Integer problems (including zeroone problems) are considerably more difficult to solve than ordinary LPs, and indeed there are good reasons to believe that the problems belong to different classes of computational complexity. A formulation which does not contain the specific requirement that certain variables be integer valued is therefore extremely valuable if it produces integer values for variables where this is indeed desired. Ordinary transportation problems are characterized by constraint matrices which contain elements of value +I or 0, with at most two elements per column, ie variables appear in at most two constraints. Formulation 5 is an example of a generalized transhipment problem. We still have at most (here exactly) two elements per column, though some take integer values other than those allowed in the pure problem. These other values can destroy total unimodularity.Glover and Klingman 19 present a scheme which converts generalized network problems to pure network problems (if that is possible) and give a necessary and sufficient condition for the procedure to work. Essentially the method multiplies rows and columns of the constraint matrix in an attempt to make all elements +I or 0, ie reducing it to a pure network problem. In the algorithm there are a number of points where tiebreaking (or selection from a set) is necessary and no rules are given for resolving this. In the case where the end product is a pure network problem this is immaterial since any choice will give the same end result. Where the problem does not reduce to a pure network
computeraided design
Table 9. Constraint set for first e x a m p l e , f o r m u l a t i o n s
F1
1 1 1 1
F,
= 1 1 1 1 1
F~
= 1
1 1 1
F,
S1
= 1 1 1 1 1
1
S~
1 1
1 1
S3
S,=
= 1
1 1
= 0 1
1
1
1
Ss
= 0 1
I
= 0
222
~'~~
1
I
S8 A2
1 1
1
1
$7
= 0
1 1
S6
= 0 1 1
1
222
1
A8
1 1
1
1
A4 A~
1 1
1
1
~.[(
= 0 ~½ ~½
1 1
All zeroone
= 0 1
1
Variable ~
= 0
33~
~Vz ~½
1
All upper bounded by½
)1
a.
problem, different rules will produce different end results, in the sense that the troublesome elements (~0, +I, 1 ) will be distributed in different ways throughout the matrix. Thus in Table 9 (derived by row and column multiplication from Table 7, after deleting the 4 redundantA rows) we have succeeded in grouping the bothersome elements into two compact groups in the $6 and 57 rows. We can convert this problem to a pure problem either by taking the troublesome constraints into the objective function via Lagrange multipliers, or by establishing a search procedure over the troublesome variables (or set of variables). Given a brief investigation of the larger problem (example 2) the first option seems more capable of systematic exploitation. We can always guarantee that we will have no more troublesome constraints than the number of functional units, since we can reduce the arc multipliers in the S rows to +1 by column manipulation, and thus only affect the F rows. It is the presence of sets of differing cardinali.ty serving as potential assignments for the same functional unit which cause the difficulty. In the large example where the S sets can have from 1 to 10 members, the 'grouping' of fractions as in Table 9 cannot be (easily) controlled, and it would seem easier to make the lesser disturbance to the constraints by manipulating the difficulties into the F constraints. We have no experience with the Lagrangian analysis, but note that at least the pure subproblems are very easily solved by a decent network code. REMARKS
ON
SOLUTION
Of the five formulations, the first (pure zeroone) version is inferior to the fifth since it has more of the troublesome noncontinuous variables. The second and third formulations contain nonlinearities whose accommodation in the form of equivalent linear formulations will have a pretty drastic effect on problem size. In the second part of this paper we will provide a commentary on the computational experiments involving •
the 'twophase' mechanism outlined after Formulation Two
volume 13 number 4 july 1981
• •
the dynamic programming formulation the generalized network formulation.
THE
QUADRATIC
PROBLEM
The conditional conversion costs and association costs mentioned earlier can be combined to produce a cost for each appropriate pair of assignments of functional unit to acceptor set, ie we have a constant c F i S j / F i , S j , for appropriate i, i I j~ j : In addition to the linear terms of the objective function we also have an expression i , i ' e l J~Ji
c F i S j / F i , 5 j , X F i S ~ XFi,S j ,
feJi
The number of quadratic terms is naturally determined by the problem structure. The small example has 26. Data for the large example is incomplete. Formulation 5 would now have an amended objective function, but identical constraints. These constraints are not those of a (pure) quadratic assignment problem (which would give rise to a totally unimodular constraint matrix). We have in fact a problem with nonlinear objective function, linear constraints and a mixture of zeroone and continuous (bounded) variables. Reference to the works cited earlier will convince the reader of the intrinsic difficulty of such problems. Following on the recent results in computational complexity, heuristics have again become respectable among algorithm designers, and it is to a proper use of heuristic notions that any computational study must turn. Given that the problem can give rise to subproblems for which efficient algorithms exist, there is a decent prospect of reasonable computational results.
REFERENCES
1 Fitzau, S 'A system of conversion of buildings' ABACUS Interim Report, Department of Architecture and Build
219
ing Science, University of Strathclyde, Glasgow, U K
(July 1978) 2 Sahni, S and Gonzalez, T 'P complete approximation problems' JACM Vol 23 (1976) pp 555565 3 Lawler, E 'The quadratic assignment problem: A brief review' in Roy, B (ed) Combinationalprogramming. Methods and applications Reidal, Dordecht, The Netherlands (I 975) 4 Burkard, R E 'Travelling salesman and assignment problems; a survey' presented at D077 Vancouver, July 1977. In Hammer, P L, Johnson, E L and Kortes, B (eds) 'Discrete optimisation'Ann. Discrete Math Vol 4 and 5 (1979) 5 Karp R M 'On the computational complexity of combinatorial problems' Networks Vol 5 (1975) pp 4568 6 Lenstra, I K and Rinooy Kan, A H G 'Computational complexity of discrete optimisation problems' in Hammer, P L, Johnson, E L and Korte, B (eds) 'Discrete optimisation' Ann. Discrete Math. Vol 4 and 5 (1979) 7 Maffioli, F 'The complexity of combinatorial optimisation algorithms and the challenge of heuristics' in Christofides, N, Mingozzi, A, Toth, P and Sandi, C Combinatorial optimisation John Wiley and Sons, Chichester, UK (1979) pp 107130 8 Sahni, S and Horowitz, E 'Combinatorial problems: reducability and approximation' Oper. Res. Vol 26 No 5 (SeptemberOctober 1978) pp 718759 9 white, D J, Donaldson, W A and Lawrie, N L Operational research techniques Vol 2 Business Books, London (1974)
220
10 Bazarra, M S and Jarvis, J J Linear programming and network flows John Wiley and Sons, New York (1977) 11 Lawler E Combinatorial optimisation: networks and matroids Holt, Rinehart and Winston, New York (1976) 12 Christofides, N Graph theory: an algorithmic approach Academic Press, London (1975) 13 Bradley, G H, Brown, G G and Graves, G W 'Design and implementation of large scale primal transhipment algorithms' Manage. Sci. Vol 24 No 1 (September 1977) pp 1  3 4 14 Glarer, F and Klingman, D 'A practitioner's guide to the state of large scale network and network related problems' ACM Annual Conference Proc. (1976) pp 945950 15 Glarer, F 'Improved linear integer programming formulations of nonlinear integer problems' Manage. ScL Vol 22 No 4 (December 1975) pp 455460 16 Glover, F and Woolsey, E 'Converting the zeroone polynomial programming problem to a zeroone linear program' Oper. Res. Vol 22 No 1 (JanuaryFebruary 1974) pp 180182 17 Glarer, F and Woolsey E 'Further reduction of zeroone polynomial programming problems to zeroone linear programming problems' Oper. Res. Vol 21 No 1 (1973) pp 156161 18 Matin, T L and Marsten, R E 'Branchandbound strategies for dynamic programming'. Oper. Res. Vol 24 No 4 (1976) pp 611627 19 Glarer, F and Klingman, D 'On the equivalence of some generalised network problems to pure network problems' Math. Prog. Vol 4 No 3 (1974) pp 269278
computeraided design