algorithmic modeling for Rhino
BTW: If this (Dijkstra routing on Points + Adjacency Matrices) is what you want I can do it for you (for any N of points) but the code is classified as internal (sorry about that). You must provide either points + the matrix or a graph (and the matrix is made by calculating cost per cell as the pt to connected pt distance).
Well
Given a collection of nodes (and some connections => in total: a graph) the adjacency Matrix is a way to tell us the cost for "going" from node x to node y. Usually when there's no connection the entry is 0 (not INF). Matrix can be symmetrical or not (meaning that x>y connection is not the same as the y>x).
Routing means: for a given node find ALL the "shortest" (i.e. with the min cost) paths from any other node to that node.
As I understand you are after AEC matters: meaning that nodes are some centroids of spaces and connections are their relation - thus a Matrix (or a double [,] or a "square" Tree) can describe the whole combo - like the one that you've provided.
But ...
1.The topology of the nodes SUPPOSEDLY complies with some cluster analysis: i.e. "groups" of the "most related" points either in flat mode (K-Means for instance) or hard HAC. Floors et all mean (in GH speech): some DataTree instead of a List (for K-Means).
2.Filling a Matrix without persistent data management (= only doable with code) is rather out of question in real-life.
Again my apologies for the internal nature of the code ... but I do hope that you understand what this means in real-life ("same" class of importance like packing pieces of facades, solving complex trusses, highly nested block structures ... etc etc).
BTW: Since building the adj Matrix is not that easy and IF the cost - in your case - is the pt to pt distance (is it?) > just provide a graph (points + lines connecting some of them) or vertically/horizontally arranged Lists (i.e. Tree) of graphs and in a split second the Matrix and the solution could be ready (by "split second" I mean for some "reasonable" amount of points: less than, say, 10K or so).
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by