Divisions along x-axis
Divisions along y-axis
Density
The model is very basic, it can be found here. It creates a isotrim from a loft (the total area). The faces are isolated from the isotrim, and are reduced in a random way, with use of the RandomReduce feature. The density in % gives the amount of the total faces that have to be trimmed. beceause of the randomness, the result is different every time.
2 examples of this model:

And the parameters (config 3 and 4)

The most important result is the Total Density. This gives the percentage of open space. The lower this percentage is, the more economic the result is.
BUT.
The daylight is obviously the big critical factor. So globally our plan is to fix the density, and to find for a given density the most optimal daylight. This modelis unsuitable, because of the randomfactor. The optimization with an evolutionary algorithm doesnt work good, because not all properties of the model are inherited. Some change randomly with every new try. The computer is not able to converge to an optimum because of the noise that the random element causes.
A more sophisticated model is not based on subdivisions any more, but on the number and the size of the connecting streets. It still uses RandomReduce, but the model is done in such a way that an algorithm can be implemented for this function. A result of the new model:

This is interesting, because we need to find an algorithm that is progressive in some way.
Lets suppose that we have a model with only one layer and 9 breps (houses). The layout for the plan looks like this (without streets).

Lets say we want a density of 60% on the ground floor. In that case, 60%*9= ~5 blocks have to be rendered. When we do not use the RandomReduce, 4 blocks have thus to be reduced in another way. Lets use the brute-force strategy. It culls 0,1,2 and 3. It looks like this.


After calculating the result for daylight, it goes on with the next option: 0,1,2,4.

the optimum probably is:

In this case the program will have to try (9 nCr 4) = 126 times to be sure it has found the optimum (correct me if i'm wrong, math's a little hazy now...). In a 3x3 grid it is still possible, but in a 8x4 grid (32 breps, 601080390 possibilities) it is just impossible to calculate it like this.

the optimum probably is:

In this case the program will have to try (9 nCr 4) = 126 times to be sure it has found the optimum (correct me if i'm wrong, math's a little hazy now...). In a 3x3 grid it is still possible, but in a 8x4 grid (32 breps, 601080390 possibilities) it is just impossible to calculate it like this.
So in the end we'll have to go back to an genetic algorithm. The first generation is randomly generated, the next generation will have mutation of no more than, say, 10% from the best shots. Right now I have no idea how to do this...whatever I can think of needs a lot of scripting.








































