Generative design emtpy output with zero

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.

test_offset site_4 to send.dyn (87.2 KB)

Hi, I am uploading the dynamo graph here. You have to assign at lest four 3d -Model curve for the graphto run.
I tried replacing null with 0 as well. I would really appreciate if you could test and point out the mistake. I am just trying to find the option with max. area.

I even tried replacing nulls with zero. It is working in list but not in GD



I can’t seem to find any Data.Remember nodes in your graph. It’s also unclear what the model curves should look like. It would be easier if you posted a full screenshot of your graph (using Export Workspace as Image in the upper right corner of Dynamo) with all the node preview bubbles turned on and any errors you get from the graph or GD.

EDIT: You also still have Math.Sum as an output. You have to clean up the nulls before any outputs.

here is the updated image

my revit 3d curve looks like this. Ignore the walls

Make sure you’re zoomed in enough that the nodes are legible when you export. We can’t read the node titles currently.

graph should be visible now, I upload 1.4 mb image. I can view it in hi-res after downloading image.

Take a look at your image. Resolution is not the issue. At a certain zoom level Dynamo hides the node names to declutter the view. It’s hard to know what’s going on if we don’t know what nodes you’re using. You need to be zoomed in enough that the names are visible when you export.

Now the node titles are visible.

Have you confirmed which nodes are set to Output? Your graph is also very hard to follow so I’m only guessing at this point. You have your Data.Remember node at the very end of the graph. That’s where your data is going to come from. Everything before it will not get updated in GD. That means you may not be incorporating some of your changes to the GD runs.

I have uploaded dynamo and Revit file.