30.01.2013 Views

6.3 Suspended Ceiling Design Process - Bilkent University

6.3 Suspended Ceiling Design Process - Bilkent University

6.3 Suspended Ceiling Design Process - Bilkent University

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Loop<br />

Next j<br />

Next i<br />

'now, the final temp2 array contains the answer for the reachability<br />

matrix<br />

'so give the values in temp2 to the reachability matrix<br />

For i = 1 To n<br />

For j = 1 To n<br />

reach(i, j) = temp2(i, j)<br />

Next j<br />

Next i<br />

Partition<br />

Find_Levels<br />

End Sub<br />

' partition Macro<br />

' This macro partitions the matrix based on the reachability matrix result<br />

'<br />

Option Explicit<br />

Option Base 1<br />

Public row As Variant<br />

'row(x,y) contains the reachability set of each element in DSM<br />

'x indicates the element in the matrix this variable is associated with<br />

'y indicates the order of the variable in the reachability set of element<br />

Public column As Variant<br />

'column(x,y) contains the antecedent set of each element in DSM<br />

'x indicates the element in the matrix this variable is associated with<br />

'y indicates the order of the variable in the antecedent set of element<br />

Public total_row As Variant 'total number of elements in the reachability<br />

set<br />

Public total_column As Variant 'total number of elements in the<br />

antecedent set<br />

Sub Partition()<br />

Dim i, j, k As Integer<br />

ReDim row(n, n), column(n, n)<br />

ReDim total_row(n), total_column(n)<br />

Application.ScreenUpdating = False<br />

For i = 1 To n<br />

'assign values to the reachability set of element i<br />

k = 0<br />

For j = 1 To n<br />

If reach(i, j) 0 Then<br />

k = k + 1<br />

row(i, k) = j<br />

227

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!