Grasshopper

algorithmic modeling for Rhino

Problem Choosing Centroids to Connect (lines and closed curves)

I think this might be too complicated for Grasshopper, but you never know!

Basically I'm making a site plan of how electrical generators would wire to houses based on distance from the generator.

A generator (small circle) has a max distance (large circle, aka servicable area) that it can wire to each house (rectangle).

So my pseudocode is as follows:

1 - Find nearest house (within range, large circle) to generator

2 - draw line connecting centroids, from each house to each other

It seems so simple, but because I'm using so many large circles, I do not know how to sort the data so it's not garbbled.

Attachments:

1- I have drawn what I want it to do in the first photo, it's easy enough to do by hand, but automating it would save some time, and I would learn a thing or two!

2- The second photo is the site, placement of generators.

Let me know if there are questions!
Thanks in advance!

Views: 635

Attachments:

Replies to This Discussion

Find nearest centroid in same generator range.

So I have to divide the data into which houses are in each circle, How would I do that?

I realize that 2 means inside for "point in closed curve", but how do I associate that with the circle it's contained in?

Iterative method I think.

Do you want a method to find the less length of "tube" to dig/use or the less copper wire to use?

Here a stupid/incomplete solution, iterative with Anemone plug-in (you'll need it):

But without specific rules it just connect every point using the shortest amount of line (minimum total "meters" to connect everything).

You need to specify a rule to balance like:

connect to nearest powered house with lowest "K"

where K is:

K = (distance to a near powered house)*(constant price per meter for tube)+(total distance to initial generator)*(costant price per meter for copper wire)

Or something similar...

Also what is the point that generators have a range described with a circle? If near houses are placed in a spiral-like sequence, you will get a single line connection running in spiral, but the wire length for the last house can be easy bigger than the radius coverage of the circle of the generator. (Can you understand my rubbish english? XD )

Also in my solution (try in attachment) this happen:

As you can see top-middle generator is powering up houses inside left circle.

(Yes, in my incomplete def. here, circle radius is completely ignored for now :D )

Rules needed, or if you just need to partition the total work for each circle, that's simple, but you should and would expect spiral-like wiring situations, that would be odd...

(also, when a house in range of 2 generators, you need a rule to choose one...)

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service