Generative Design Precision issue

I am using GenerativeDesign to maximise floor areas.

I tested Gen.Des on a simple rectangle and sorted rectangle with maximum area. Everything worked fine, it follows the precision I set in Dynamo (0.0). The Rectangle was created inside Dynamo.

However, when I make a ModelCurve in Revit, and link it to Dynamo, I get this error “Use only output of type float or integer”
I was wondering that it is happening because my area is in 0.0000000000000 precision. Can you please guide me what am I doing wrong?

I believe a float only has 7 decimal places…

Your longer decimal there is a double.

1 Like

The issue is that Surface.Area is returning a list. Lists are not allowed as outputs.

1 Like

I am maximising floor areas. There will always be more than 1 floor. Is there any work around to make GenerativeDesign find solution ?

You’ll have to output a score.

So you’ll have parameters that you mark… and you can output total.

The best total wins.

I tried using Area-Integers as output. The Explorer only didnt create permuations. could you please explain with an example, thanks

I found with output for the Autodesk GD in Revit that if I have a node it doesn’t like I will feed it into a codeblock and output the first item (even if it doesn’t look like a list).

image

Try this maybe?

Failing that maybe post a simplified version of what you’re doing and the error.

Yes, but you have to be able to define how that works for you.

Generative Design does not allow list outputs. It can’t compare how a list of values compares to another list of values as there’s nothing determining a direct comparison. You have to define how that list of values determines the performance of your solution.

Let’s say you’re trying to minimize the surface area. Minimizing any singular surface is good for your solution, so you could just determine the total surface area of all floors. If you have a varying number of floors per solution (not per project), you could make that comparison against the total potential area i.e. a percentage of area minimized.

It all depends on what you’re trying to solve, but the output has to be a single comparable value.

@ Alien, taking just first or single item wont serve the purpose. I need to get the sum as change in floor area is a function of height ( interdependent ).

@Nick, here is a screen shoot. I already took the summation of all floor area as output. it is a single integer. it should have worked. In dynamo I can see the sum of area as integer. why is it not visible in GD is a mystery. I clicked and it opened a link. It has several reasons why, but its none of them ( empty output, NaN, list, infinity )

…just to add progress, I noticed that there are some variation where the answers are null, as the polygon collapses with certain values.
It might be this is creating the problem. If that is the case, and I dont see any other reason, It would have been easier if GD would remove the null options itself. I tried using different RemoveNull nodes, unfortunately they are not supported by GD.

Is it possible to skip the null options while not interrupting the GD process ?

Again, the only thing that matters is the outputs. As long as they’re valid, you should be fine.

Instead of cleaning the nulls, convert them to zeros before summing. That way they don’t affect the total and you don’t end up with an empty list if you had all zeros. That should get you what you want.