I realize this tool is fairly new, but after reading about it and running many times using different criteria it seems like the output is different than what I expected. In particular, the resulting number of zones isn't matching my requested value.
"Number_of_zones" is defined as "The number of zones that will be created", so I understood this to mean the tool distributes my input points as evenly as possible, though certainly not perfectly, into the requested total number of zones. The emphasis here is the zone count which I assumed was the primary guiding factor.
I'm choosing "Number of zones" for the creation method; "60" for number of zones to be created; various combinations of "Compactness" checked/unchecked and using a layer in Distance to Consider; population size / number of generations have ranged anywhere from 70 / 30 up to 5,000 / 1,500. Mutation factor is usually 0.1, though I've gone as high as 0.9. No attribute criteria is used.
The output is always either 57 or 58 zones, never 60 as I requested. Attached is a visual of the raw input, and below is a typical result showing the constraints.
The only way to get 60 is to over-request. For example if I put 62 or 63 for number of zones to be created, depending on the criteria, it then will produce 60 zones if I've guessed correctly. It must be the spatial arrangement that is too challenging for the tool to meet the request. Any tips for me or the next person who encounters this scenario? The documentation says "zone selection criteria should be considered preferences." Is total number of zones part of the selection criteria?
Running script BuildBalancedZones...
Random Seed: 87162
Population Size: 5000
Number of Generations: 1500
Mutation Factor: 0.1
----------------------- Summary Constraints ------------------------
Variable Constraint Type Mean Root Mean Square Error
Number of Features Count 42.621 2.697
Compactness Characteristic 0.883 0.130
WARNING 110269: The Number of Zones requested was not reached
Completed script Build Balanced Zones...
I'm having this SAME PROBLEM. I absolutely need 48 zones, but never get more than 45 and I've run it a bunch of different ways. The whole point of running this tool is so that it returns the specified number of zones... isn't that why there is a Number of Zones option?! I cannot figure out why it's not working and it's driving me crazy. I don't have time to guess an input number of zones over 48 and hope it comes back with 48.
This is a know limitation for most spatial optimization problems. Let’s take an example where you requested for 50 zones and got only 49 for 9419 features in the input.
This tool builds zones by aggregating features until the zone building criteria are met. So in this case, the zone building criteria is 50 zones which means that each zone should have about 188 features (total number of features being 9419). The tool randomly picks an initial feature (called seed) and starts aggregating the spatial neighbors until the number of features in the zone reaches 188. Then the tool randomly picks another feature and continues the process. Now imagine that there are features left as “islands” between two completed zones which have not being assigned to any zone (highlighted features in the below image).
Because there is a “spatial constraint” for the zones to be continuous, the tool aggregates these leftover features to the nearest zone. That’s the reason you might see more than 188 features in a zone and because of this spatial constraint and the leftover island features, the tool wasn’t able to find a perfect 50 zones solution.
For spatial optimization problems, there’s a trade off between speed and precision. If you want to explore more combinations of solutions and get better results (closer to perfect solution but a perfect solution isn’t guaranteed in any spatial optimization algorithm), try increasing the population size and number of generations to refine your results, in the Advanced Parameters section of the Build Balanced Zones Tool. To know more about the advanced parameters, see Build Balanced Zones. (Try running it with 1000 population size, for 1000 number of generations! It’ll take about 15 minutes, but you’ll get an idea between precision and speed!)
An alternative is to increase the number of zones to say, 51. In that instance, the number of features required per zone will reduce and the chances of getting 50 zones will increase.
The important thing to remember is that like any other spatial optimization problem, it is not guaranteed to reach a perfect solution. The tool will find an optimized solution. Also remember that even if the number of zones is the only constraint provided in the tool, there is always a spatial constraint to make the zones continuous.
Hope that helped!