Grasshopper

algorithmic modeling for Rhino

Component showing whether the values in a list are changing

Hello,

I am running a Kangaroo2 simulation, which changes values in a list as long as it is running. When it finds an equilibrium, the values in the list stop changing.

Is there a Component thats shows whether the values in a list are changing or not?

I want to automatically bake the result of the simulation as soon as it stopps, so I'm looking for a boolean showing whether the values are still changing or not.

Thanks in advance

Ben

Views: 375

Replies to This Discussion

hi ben,

kangaroo has the output of kenetic energy(KE) which shows that if it finds the equilibrium(KE=0).

in this case you probably should use ZombieKangaroo which gives you the result of simulation instead of the process. and you can set the input "Threshold" which stops the calculation once the kenetic energy is lower than the input value,ie the values stop changing.

Hi Horus,

thank you for the reply.
Unforunately im running a Kangaroo2 simulation (fixed the original post).
Kangaroo2 at the moment only offers a "list of all the Points in the simulation" and a geometry output.
So I think I have to rely on the change or non change of the list of points.

Hello Ben, Horus,

I imagine a plugin with this function should exist but I don't know of any...

Anyway, this is a really clumsy approach but it could point you to a direction:

1. Randomly reduce your list of points (only if you have too many points, so that you don't have a big delay)

2. Use a data recorder with a record limit (right click on the recorder to set this) at least twice the number of points and as large as possible to still run smoothly. (I am testing 50 points and have set the record limit to 1000 and it works ok)

3. Use [CullPt] set to "Cull All" (right click again).

4. And test when this list of points will be empty (list length equal to 0).

The accuracy of this depends on the number of points tested(larger=better), the record limit of Data recorder(larger=better) and the T input of CullPt(smaller=better).

If you want to be absolutely sure the simulation has finished completely, you could add another data recorder at the output of [Equality] and use [Mass Addition] to count the number of True's, so you could bake only after you have, let's say, 1000 true's.

Hi Nikos,

your approach is working fine and is highly appreciated.

thank you very much.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service