Generating Rooms Adjacency Matrices (H_Tree & V_Tree) for the given Design?

Generating Rooms Adjacency Matrices (H_Tree & V_Tree) for the given Design?

Anonymous
Not applicable
1,113 Views
3 Replies
Message 1 of 4

Generating Rooms Adjacency Matrices (H_Tree & V_Tree) for the given Design?

Anonymous
Not applicable

Hi All,

 

I want to generate the rooms adjacency matrix to capture the topology of all the rooms in the design. For this purpose, two matrices are to be created i.e., H_Tree and V_Tree.

 

Each row in the H_Tree matrix relates to the state of the rooms and is filled with values 1 (for rooms at the right side) and 0 otherwise.

 

The H_tree for the attached design is:

     

 

 

H=[0 0 0 0 0 …  //Room 2 has no room at the right side
   1 0 0 0 0 …  //Room 1 is at the right side of the room 2
   0 0 0 0 1 …  //Room 5 is at the right side of the room 3
   0 0 0 0 1 …  
   1 0 0 0 0 …]

 

 

Similarly, the V_Tree relates to a similar matrix where the values 1 refers to rooms at the top of the given room and 0 otherwise.

 

To simplify the situation, I am considering rooms with just four walls towards the east, west, north, south.

 

Can someone guide me how to achieve this functionality?

 

Any reference to the related Revit API functions will be of great help and will be highly appreciated.

 

Many Thanks and Kind Regards

Bilal

0 Likes
1,114 Views
3 Replies
Replies (3)
Message 2 of 4

lee.imbimbo
Enthusiast
Enthusiast

I'm also interested in doing this.  Right now I don't currently see any way to bring let's say the room names from my Room Program Schedule such that I can have corresponding references in bother a row and a column, such that maybe I could use a 0,1,2 variable structure.

Where 0 = no adjacent, 1 = light adjacency, and 2 = strong adjacency

 

Hopefully I can push this back up to the top.

Message 3 of 4

Mattia_PirazzoliTSX6J
Observer
Observer

I am looking for the same thing adding a complexity on top of it.
Get a 3D matrix to get also the adjacency with "Rooms" above and below that level.

0 Likes
Message 4 of 4

jeremy_tammik
Alumni
Alumni

Interesting topic, interesting approach. The Building Coder shared some discussions on adjacency, but rather old:

    

  

Searching the Internet for this brought up little; this looks kind of intriguing, but for biological cells:

  

 

And, as always, check out GitHub:

  

  

And, of course, nowadays, ask the AI:

  

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes