algorithmic modeling for Rhino
Could be possible to code a genome list that uses inputs to generate that list? (number of genes, domains, etc) We are solving a problem in a workshop I'm teaching now that turns to a non-parametric solution if you can't change genome list properties with other data inputs. That data that changes genome won't change in the optimization process.
Thanks and best.
Tags:
It is not possible to change the number of genes while a Galapagos solution is running. This will require significant additions to the solver core code.
However, you can of course remove a portion of the genes after the gene-list object. You just need to make sure you have enough of them to start with. You can also remap domains to your hearts desire after the numbers come out of the Gene-list.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
I don't want to change genes while a Galapagos solution is running, I want to set the values and ranges in genes parametricaly using calculated values before Galapagos solution starts. We can input values manually before running galapagos, but could be better if we could just conect calculated values to gen list to set ranges and number of genes.
We start with a list of objects that will be imported to ecotect. We need to cull some of the components of that list before import them. The number of culled objects is not fixed (grid objects density could change in design process with some sliders and number of culled objects is determined evaluating mass addition of areas and other parameter).
Once we get the correct number of total objects possible positions and the number of objects to cull in that grid we use Galapagos + Ecotect to optimize the position in the grid of not culled elements.
We are minimizing radiation values moving objetcs in every possible position in the initial grid. We make that using a list of genes (the number of max. possible positions) changing in the domain of total possible list objects. Some solutions will overlap genes but it doesn't matter because the values of fitness in that cases are worst than without overlapping.
Sorry for the English butchering and thnks for your fast answer!
In the meantime.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Wooooo!!! Thanks :D Reviewing code and trying to set domains too!
Mmmm...I've tried to find some other members for GalapagosGeneList Object but I'm not lucky man today :( SDK documentation doesn't cover that methods (that I could find...).
Galapagos isn't in the SDK documentation. But what you can do is put:
Reflect(obj)
inside the loop. That should show the properties and methods of the Genelist object.
The properties you're looking for are called Minimum and Maximum. Though you're probably better off calling RemapToNewLimits(Decimal min, Decimal max).
Don't feel bad about not getting it, I would have a lot of trouble too if I didn't have Galapagos source available here.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Hey! thanks! Coding a little bit with that :)
hey - interesting solution, but:
i am running into same troubles while coding a custom c# component.
there is the methodInfo class within system.reflection that i might probably use.
what i want to do is simply change my parameter values within the given boundaries - so maybe
1) get number of values
2) get bounds
3) set values
it's somehow remote controlling the Gene Pool as galapagos does. i start with the guid of the linked Gene Pool and get the IGH_documentObject with findObject. from there i have little plan how to achieve things, except the reflection-principle.
which properties / methods do i have to use?
best,
robert
i have as a test c#-scripting component tried out the code:
foreach(IGH_DocumentObject obj in owner.OnPingDocument().Objects)
{
if (obj.NickName == "GeneList A")
{
A = "asf";
PropertyInfo prop = typeof(IGH_DocumentObject).GetProperty("this");
object[] array1 = new object[] { 0 };
prop.SetValue(obj, "0", array1);
}
}
but in the last line prop.SetValue it tells me 'object reference not set to an instance of an object'...
does anybody know how to set those values?
best
... hm... david, have you got a minute to help me out :) ? i can imagine you are superbusy.
planning to release my plugin, but without this functionality it might get very cumbersome to use. the other option would be to ship my own slider-list component which would be kind of inconsistent since it should be used like galapagos.. (technically).
thanks for any help,
best
robert
Hah, was looking for the exact same thing :)
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