Network layout procedure for printed - circuit design

Network layout procedure for printed - circuit design

Network /out procedure for printed - circuit d . gn LR Fouk , SM Perera and DF RobinsonO This paper describes a heuristic solution procedure for layin...

408KB Sizes 0 Downloads 121 Views

Network /out procedure for printed - circuit d . gn LR Fouk , SM Perera and DF RobinsonO This paper describes a heuristic solution procedure for laying out the conductors o f a printed circuit on the two sides o f a plate o f nonconducting material. There must be no overlap between conductors on the same side o f the plate as they are uninsulated. For certain layouts it is necessary to drill holes in the plate and pass conductors through the holes to avo/doverlap. The problem is to Identify the layout which requires the minimum number o f holes. The solution procedure uses a computer subroutine in conjunction with an Iconic model o f the plate. The subroutine Is based on a method o f Nicholson I which attempts to lay out a given circuit on one side o f a plate to minimize the number o f overlaps. The iconic model o f the plate used in this research consisted o f a pair o f plastic sheets, representing the two sides o f the plate, overlaid one on top o f the other. The nodes and connections were drawn a n t h e m with felt-tip pens, The procedure is iterative and takes advantage o f the fact that the problem can be viewed in terms.of graph theory. The procedure is suitable for an interactive.computer terminal system. Computational experience is Iimlted but encouraglng. However there is no guarantee that solutions produced by the procedure will be optimal in the sense that an absolute minimum number of holes will be required to be drilled.

are represented by vertices. The conductors are represented by edges. The holes drilled are represented by additional vertices. When an additional vertex is introduced on an edge, it splits the edge into two new edges, which are labelled A and B respectivelycorresponding to the two different sides of the plate. All edges not thus split are also labelled either A or B. Edges representing links on side A(B) of the plate are labelled A(B). The problem is to lay out the edges and locate the minimum number of additional vertices so as to ensure that there is no overlap of edges with the same label. The solution procedure presented in this paper uses a computer subroutine in conjunction with an iconic model of the plate. The model used in this research consisted of a pair of plastic sheets, representing the two sides of the plate, overlaid one on top of the other. Nodes and connections were drawn on them with felt-tip pens. The subroutine is based on a method of Nicholson I , which attempts to minimize the number of overlaps which may occur when a given circuit is laid out on one side of a plate. Nicholson's method is discussed in the next section. Owen 3 has also studied this problem. He has calculated an upper bound on the number of overlaps if no holes are drilled and has developed a model yielding this bound for complete graphs.

This paper presents a heuristic solution procedure for laying out a printed circuit ontwo sides of a plate of nonconducting material. It is assumed that the conductors are uninsulated and they must not overlap, except at an intended junction. All junction points are located on one Side of the plate in a given configuration. Each junction is then connected by a conductor passing directly through the plate to another junction on the other side. Each of these pairs of connected junction points is considered to be one node. It is assumed that certain nodes must be connected to each other without conductors overlapping. To make this possible in complex layouts, holes are drilled in the plate. One conductor is passed through each hole. A conductor may be passed through more than one hole. The problem is to minimize the number of holes that have to be drilled. This problem is described more fully by Busacker and Saaty2 . The problem can be viewed in terms of graph theory. A given layout can be represented by a graph. The pairs of junction points originally connected opposite one another

PERMUTATION

Mathematics Department, Massey University, Palmerston North, New Zealand. *Mathematics Department, University of Canterbury, Christchurch, New Zealand

volume 10 number 3 may 1978

PROCEDURE

Nicholson's method is used to lay out the links of a network on one side of the plate so that the number of crossings is close to a minimum. The representation scheme used by Nicholson consists of laying out the nodes of the network in a straight line and drawing the connections between nodes as semicircles above and below the line. Nicholson's method begins by constructing an initial permutation. The node with the largest number of connections is placed in position 1. The node next selected is the node which has the most connections with those already placed in the permutation. This node is placed in the position that would cause the smallest increase in the number of crossings. Its connections are drawn as semicircles above or below the node line depending on which path causes fewer crossings. When all nodes have been positioned, the initial solution has been obtained. This solution is then modified systematically to try to reduce the number of crossings. The node whose connections cause the most number of crossings is identified. This node is moved from its present position to the position which gives the highest reduction in the number of crossings. Nodes are moved until no further improvements can be made.

0010-4485/78/1003-0177 $01.00 © 1978 I PC Business Press

177

Nicholson's method may not necessarily produce an optimal layout of links, because this procedure does not interchange groups of two or more nodes to minimize the number of crossings. The following solved problem illustrates Nicholson's method. The example network consists of eight nodes and the connections between pairs of nodes are given below 1-2 1-3 1-6 1-7

2-1 2-4 2-8

3-1 3-5 3-6 3-7 3-8

4-2 4-5 4-8

5-3 5-4 5-7 5-8

6-1 6-3 6-7

7-1 7-3 7-5 7-6

I

2

o3

~63

a

b 2

I

3

C 2

3

4

I ~

5

e

3

4

5

6

_

f 2

3

4

5

6

7

I

g

2

3

4

5

6

h

~ I

2

3

4

5

Figure I. The Nicholson procedure

178

2 ~

4

d

I

I

3

6

7

8

3

i .V./ I \\",,\

Figure 2. The example used to explain step 17 by resiting a single node and the layout given in Figure 1i is the final one produced by this procedure.

SOLUTION PROCEDURE To distinguish between the two sides of a plate of nonconducting material, one side is called the upper side and the other the lower side. The set of links of the network are divided into three subsets • A set of links that are laid out on the upper side • B set of links that are laid out on the lower side • C set of links that are removed from the lower side to prevent crossings (later some of the links arC will be assigned to a fourth set

2

I,'xA

8-2 8-3 8-4 8-5

Figure 1 shows how Nicholson's method builds up the layout. The positions are numbered in parentheses. Node 3 is involved with the most connections and so is inserted in position 1 in Figure la. Node 1 is arbitrarily selected as the node with the most connections with those already placed. It is then inserted in position 1, node 3 going to position 2. The link between them is drawn as in Figure lb. Nodes 6 and 7 are both connected to all the nodes so far placed. Node 7 is arbitrarily selected next, followed by node 6. These selections are shown in Figures lc and ld. Nodes 5 and 8 are placed in Figures le and If. Now nodes 2 and 4 are both connected to two of the nodes already placed. Node 4 is arbitrarily chosen next followed by node 2. These selections are shown in Figures lg and lh. It can be seen in Figure lh that there is a crossing between connections 5 - 7 and 3-6. This can be eliminated by moving node 7 to position 5. Thus nodes 6, 1, and 3 are now in positions 6, 7 and 8 respectively, and nodes 2, 4, 8, and 5 are still in positions 1, 2, 3, and 4 respectively as shown in Figure 1i. No further reductions are possible I

II/

7

8

L))

The purpose of this procedure is to attempt to minimize the number of holes that must be drilled in a plate of nonconducting material, so that the links of the network can be laid out on the two sides of the plate in such a way that no overlap occurs. There is no guarantee, however, that solutions produced by the procedure will be optimal in the sense that an absolute minimum number of holes wilt be required to be drilled. Initially, all the links of the network are assigned to set A. Nicholson's method is used to obtain a permutation that attempts to minimize the number of crossings between links erA. (If no crossings occur, the present configuration is optimal.) Then the link causing the highest number of crossings is removed from A and assigned to B. The number of crossings in the remaining links is adjusted and the link causing the highest number of crossings is again removed from A and assigned to B. This is continued until there are no crossings on the upper side. Then Nicholson's method is used to find a permutation that attempts to minimize the number of crossings when laying out the links of B. (If no crossings occur, the present configuration is optimal. / Then the link causing the highest number of crossings is removed from B and assigned to C. The number of crossings in the remaining links in B is adjusted and the link causing the highest number of crossings is again removed from B and assigned to C. (if no crossings occur, the present configuration is optimal.) This is continued until there are no crossings on the lower side. The set of links of the network has now been partitioned into at most three setsA, B, C. An attempt is then made to reduce C. The link in C, say

computer-aided design

cl, which was the last link in C to be assigned from A to B is identified. This link is removed from C and assigned to A. Nicholson's method is again used to try to minimize the number of crossings when the links of A are laid out. If no crossings occur, then cl is left in A. If crossings occur, however, then cl is removed from A and assigned to B. Again Nicholson's method is used to try to minimize the number of crossings when the links of B are laid out. If no crossings occur, c~ is left in B. If crossings occur, however, cl is removed from B and assigned to a new set D. The next link of C, which was the last link to be originally assigned from A to B, is removed from C and assigned to A, and the above process is repeated until C is null. The permutations found for the final assignment of links to sets A and B are then used to lay out the circuit on the plate. The links of set D will each require at least one hole and are laid out using a specialsubroutine.

.s

f I

!I

// /I

,

s..~

I0..

~.

s I

/I 0

1//

\

; II

0

Figure 3. The example used to explain algorithm L Circuit layout Every junction point of the given network has been assigned a given position on one side of the plate, with a corresponding junction point directly opposite on the other side. The final permutation of nodes and links for sets A and B correspond to the upper and lower sides of the plate. The links of sets A and B are now laid out. To do this, a line which does not intersect itself is passed through the nodes on the upper side, in the order that is given in thefinal permutation ofA. The links above and below the node line of the upper side are placed in the same way as they are placed in the final permutation of A. This is repeated on the lower side by passing a nonintersecting line through the nodes in the order given in the final permutation of B. The links above and below the node line of the lower side are placed in the same way as they are placed in the final permutation of B. Finally the links o l D must be routed so that the number of holes that must be drilled is a minimum. A special algorithm for inserting new connections which have to be passed from one side of the plate to the other is used for this purpose. The links in D are laid out as given in step 17 of the complete procedure (see next section). Step 17 is explained by referring to the example shown in Figure 2, in which the dashed links are those on the upper side of the plate and the solid on the lower, cortesponding to sets A and B respectively. The letters in the various regions into which these lines divide the page form no part of the process as such but are used as an aid to the description. Suppose that D consists of the links 1-5, 1-6, 1-7, 1-8, 2-5, 2-7, 3-6, 3-7. Step 17 begins by choosing a node =, then algorithm L is used to insert all the links from oc. To choose cx, the number of crossings that would be caused if each link is put in is found. Consider 1-5. On the upper side it could be inserted crossing two other upper-side links, for example 2-13 and 7-10. The minimum number of crossings on the lower side is also two, namely 3 - 4 and 3-9. To every link are assigned the lesser of the two numbers obtained. Accuracy here is not essential, since this fixes only the order of considering points, and has at worst a minor and uncertain effect on the excellence of the solution. Each vertex is given the sum of the crossings of each edge of D associated with it. Each link has a route involving only one crossing on one side at least, except for 1-5 and 1--6, which need two on

volume 10 number 3 may 1978

each side. The totals for the points are thus Point

1

2

3

5

6

7

8

Total

6

2

2

3

3

3

1

Hence cx=l is set and in the first pass through algorithm L routes are found for links from 1 to each of 5, 6, 7, 8. These four are labelled/~. Algorithm L is now begun. The level is set to 0, colour 1 to upper and colour 2 to lower, so that until instructions are met to the contrary colour instructions are interpreted as the side that has been set. Using subroutine I small zeros are put in each region (a,b,c,d,e) adjacent to 1, and are joined to 1 by arcs directed towards 1. Growing outwards from 1, upper-colour zeros are put in each region that can be reached by crossing a Iower-colour link. The regions that can be reached are completely determined, but the routes are not, for instance the zero in g could equally be linked to the circle in f as to h. At the end of this stage, all regions within the upper-colour circuit through 2,12,8,13,2 have zeros. It is found that 8 could have been reached without any crossing, and the link is inserted along that route. As any region incident with 5,6 or 7 has not been labelled, step 5 is next and the operation is repeated with the colours reversed. Because of triangle 234 the lower colour cannot be 'grown' usefully. The level is now raised to 1 and the colours are again interchanged. As no region has only Iower-colour zeros, no progress can be made on step 11, but step 14 allows one of Iower-colour to be put in every region which contains only a zero of upper-colour, and step 16 brings lowercolour ones into regions incident with 5 and 6. To reach 7 requires another colour change. The diagram at this stage is shown in Figure 3. The routes to be taken by the links follow the arrow in Figure 3, with a hole (filled circle) to be drilled wherever there is a change of side. The routes are • 8-1 : Upperside all the way through n,m,/,k,j,c • 7-1 : Upperside through r to s, then through the hole to the lower side, across andu into v, wF,ere back to upper side, across w,x,h,j,c to 1 • 6-1 : Lower side across q,p, through hole in n and then on upper side parallel to 8 - I • 5-1 : Lower side acrossy, z,a and through hole in w, and then on upper side parallel to 7-1

The other members of D can be inserted in a similar way.

179

COMPLETE PROCEDURE •

1 Set A = the set of all links of the given network

B=0 • 2

• 3 • 4 • 5 • 6

• 7

C=0 D=0 (a) Use the permutation procedure to find a layout of links of A on the upper side (b) If no crossings occur go to step 15 Identify the link in A say o, which causes the most crossings SetA to beA \ l a l SetB to b e a U ~ a t Repeat steps 3 and 4 until no crossings occur on the upper side (o) Use the permutation procedure to find a layout of links on the lower side (b) If no crossings occur go to step 15 Identify the link in B, say b, which causes the most crossings

• 8 SetBtobea\t.d, S e t C t o b e C U | Ib • 9 Repeat steps 7 and 8 until no crossings occur on the lower side • 10 Identify the link in C, say c~, which was the last link of C to be transferred from A to B in step 4 e l l I f C = 0go to step 14 i Otherwise set C to be C \ ~ct~

set A to be A utc,} e12 Use the permutation procedure to find a layout of links of A on the upper side If no crossings occur go to step 10 If crossings occur remove c= from A Let B become B U { c, • 13 Use the permutation procedure to find a layout of links of B on the lower side If no crossings occur go to step 10 If crossings occur remove cs from B Let D become D U Jc,} Go to step 10 • 14 Use the permutations for the final assigr.nent of links to A and B to lay out the links of setsA and B on sides A and B respectively e15 (o) Passa nonintersecting line through the nodes (when they are set out in the given configuration) on the upper side of the plate in the order that is given in the final permutation of A (b) Place the links above and below the node line in the same way as they are placed in the final permutation of A

180

e16 If step 15 was reached from step 2b terminate, otherwise continue (a) Passa nonintersecting line through the nodes (when they are set out in the given configuration) on the lower side of the plate in the order that is given in the final permutation of B (b) Place the links above and below the node line in the same way as they are placed in the final permutation of B (c) If 15 was reached from 6b terminate. Otherwise continue • 17 The links of D are laid out as follows (o) Identify the node in D whose links cause the most number of crossings. Let this node be denoted by and the nodes to which it is connected by/~ (b) Perform algorithm L (c) Remove links laid out by algorithm L from D (d) If D = 0 terminate, otherwise go to step 17o.

CONCLUSIONS The procedure is suitable to be implemented on a CAD system. The CAD system would be used to implement Nicholson's subroutine while the designer would physically lay out the network using a model. Depending on the situation facing the designer, there may be many physical constraints that have to be taken into account. Thus the designer may find it necessary to modify layouts suggested by the program as the final solution is built up. Although it was not possible for the authors to use a CAD system, the procedure was tested using an ordinary paper output system. Problems with up to 20 nodes were solved in reasonable times, but this number would appear to represent the limit of usefulness if a CAD system is unavailable.

ACKNOWLEDGEMENT The authors are indebted roMr B McMaster of The Reserve Bank, Wellington, New Zealand, for developing a computer code for Nicholson's method.

REFERENCES 1 Nicholson, T A ~ 'Permutation procedure for minimizing the number of crossifigs in anetwork' Proc. Inst Elect. Engrs Vol 115 No 1 (1968) pp 21-26 2 Busacker, R G and Slaty, T L Flnitegmphs and networhs McGraw-Hill (1965) 3 Owens A 'On the biptanar crossing number' IEEE Trons. Circuit Theory Vol 18(March 1971) pp 277-280

computer-aided design