well… I don’t have Robot skill (nor do I even have it installed), and Dynamo 1.3 is well into my rear view mirror, so I can’t test anything out for real. However what you’re after sounds feasible, but let me confirm the ‘goal’ here.
You want to rest the building on a slab, and support that slab on n piles and evaluate the whole design for compliance.
If so try adding a while loop on the code to make it execute repeatedly until the . Something like this (which isn’t real Python code and hasn’t been tested but was written from my phone which is hard to just get the forum formatting to work) should give you something to at least consider:
##After all the inputs are done
PileTests = [List, of, all, pile, layouts, you, want, to, test, in, the, order, you, want, to, test, them]
test = 0
ratio = 1000
max = Count(PileTests)
baseStructure = [the, super, structure, which, is, static, goes, here]
while test < max and ratio > 1:
pile = PileTests[test]
##add the pile to the design you're testing
##do the structure evaluation here, returning the ratio as **analysisResult** and the resulting structure as 'resulting structure'
ratio = result
if ratio < 1 :
structure="Results did not pass ratio test"
OUT = baseStructure
Two things to note.
First up, there are TWO escape clauses to my while loop to prevent infinite looping. The first will trigger a stop when you’ve evaluated all the pile layouts which you want to evaluate. The second will trigger a stop when the ratio is met. You need the first as you might never reach the 2nd, and the program could just keep testing until you force it to quit or it reaches the inevitable heat death of the universe…
Secondly, remember that this will take some time to execute. If your super structure takes 120 minutes to execute, then you’ll be evaluating up to (Substructure Evaluation Time + 120) * max minutes. In the example above you could be looking at around 1.5 days without a passing example (assuming ever word I used as a pile test fails and the sub structure adds ~7% to the calculation time on average).
I think that ideally you’d have a means of doing a the evaluation using a genetic algorithm to explore the design space as the location of the piles will matter as much as the count does, or you’d be able to apply machine learning to build a data set which learns from previous examples. The concern with 'evaluate in order until you get something which passes means that you might miss out on another passing design which could be better overall, and the actual design space is HUGE for something as simple as laying out piers in a rectangle. I know a lot of stuff is being looked into by various offices - I know Paul Kassabian’s team at SGH’s Boston office (his youtube channel is here) as they have done quite a bit of study on applying machine learning to this particular problem.