Grasshopper

algorithmic modeling for Rhino

Wallacei changes the input before getting fitness value.

Thank you for creating another tool for optimization.

I am having problem with Wallacei which changes the sliders before he gets new fitness value.
The project I am working on includes using Karamba3D for evaluating forces in yacht's rig and it takes a while (few seconds - depending on a genome set).
To make it easier I created a simple file with a delay component (which simulates the time of calculations in real case).


If you run the Wallacei X component you will notice that the sliders are being moved before any fitness value appears. So Wallacei gets only <nulls> and after a while starts displaying a lot of alerts.
I enclose screenshots of some alerts and .gh file.
impatient_plug-ins.gh


Would really appreciate any example of how to avoid that problem.

Many thanks,
Mikołaj

Views: 91

Replies to This Discussion

Hi Mikolaj,

The definition you posted as an example to recreate your problem is not recreating your problem properly. Please post your definition which includes Karamba. The reason is “the delay component”. The delay component which you used to simulate the time of calculation in a real case is conflicting with background threading method in Wallacei and that’s why you see the errors. However, in the real case that won’t happen. So, if you would like us to take a look at your problem, please upload your definition which includes Karamba. It will be easier for us to find out where the problem is.

 

Best,

Milad

Hi Milad,

Thank you for such a swift reply.
It took me a while to organize the file and translate it to English.

The thing is I use here the delay component from Anemone as well.
It takes up to ~6secs till all the calculations are done and the fitness values 'settle'.

To run my definition you would need:
1) Anemone,
2) Karamba 3D,
3) NPOI_Excel: https://www.food4rhino.com/app/npoiexcel

You would need to start with Rhino files where linked geometries are and change paths for 'Excel import' in block No.5 - depends on where you will save the files.

All files attached below.

Best,
Mikołaj

Attachments:

All attachments did not fit into one reply.

Attachments:

Hi Mikolaj,

Before I dive into your problem just a quick note, if you use the delay component from Anemone, most likely you will have the same error and problem, as it conflicts with the background threading method in Wallacei. However, I will take a look at your file as soon as I can. I am skeptical whether you really need the delay component or not. You may not need it at all.

Best,

Milad

Hi Milad,

I got the message that it is probably the delay component that 'make a mess'.
But I haven't figured another way to feed Wallacei with the final version of fitness value.
I am aware of the fact that there might be a smarter solution for that, but haven't found it yet.

Below modified .gh file - with one small fix.

Best,
Mikołaj

Hi Milad,

Have you had a chance to dive into my problem?

I have replaced the 'delay components' with Octopus loops, but it didn't change much. I am still getting a lot of alerts with the same content, but it looks like this time Wallacei has started doing something, as below alerts you can see some graph this time and the numer of nulls is 0.

The problem is still the data flow.
The question is how to synchronize different data, so it arrives at the same time (e.g. masses to mass summing), so the Wallacei gets the final result, in a way that Wallacei will accept?...

Best,
Mikołaj

Hi Mikołaj

 

Anemone loops interfere with the background threading method in WallaceiX, that is why you receive these errors. We will look into this for the future releases, however, in the meanwhile, I recommend you use script components for any loop operations. Just like to image below.

Hi Milad,

I am using Octopus loops now, have confused the names.
But I guess that there is the same problem, as the Wallacei does not work.

By chance, do you have a ready code for script component that keeps the data from passing till it get some determined value at the second input? I do not know coding and tries with assembling something from lines of code found in the Net ended with a failure.

Best, 
Mikołaj

I attached a simple C# script that tests the "y" input, if the "y" input is something valid then it outputs the x input, but if the "y" input is not valid it outputs nothing, so this way depending on what stage of your simulation this empty result is going to be produced one or more fitness objective may become "null", in Wallacei we have a powerful feature called "null indicator". Essentially if WallaceiX receives a null as a fitness objective, it discards that solution, and try to recompute another solution with a legit fitness objective, in other words, it goes back, keeps regenerating solutions until this condition that you have is met and the output is not empty anymore, that is when the simulation moves forward. (be careful sometimes simulation may be stuck in a loop if it can't produce a correct solution)

this is the link to a video about null indicator. 

https://www.youtube.com/watch?v=rZcmr3CljtA&list=PLFTtKqY0JOrs6...

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2019   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service