Closed JamesBremner closed 1 year ago
You wrote on stackoverflow:
I am trying to create groups for which the sum of these deficits and surplus is close to 0 (between -0,5 and 0,5). The municipalities must be contiguous, that is to say that A touches B which touches C without C needing to touch A. The algorithm should try to maximize the size of groups and minimize the amount of localities that belong to no group.
I found that confusing. Maybe this would improve things:
Localities are two dimensional polygons. Two localities touch when they share an edge. Each locality has a value.
A group of localities must touch and have a sum of values close to zero (between -0,5 and 0,5).
The algorithm should try to maximize the size of groups and minimize the amount of localities that belong to no group.
Please let me know if you agree with this.
This is the correct definition. Additionnally, I would add that every locality/municipality has a unique ID. There are 34816 of them. They correspond to an administrative subdivision called "communes" in France. In trying to manually make groups (as shown in this video : https://youtu.be/_Of0RGLQ4tI) I found that my method naturally maximizes the size of groups within the adjacency parameters provided (in the example case, 4 degrees). Keeping this issue opened for now if you'd like to discuss the method shown in the video.
every locality/municipality has a unique ID
Where is the ID in the test data set that you posted?
if you'd like to discuss the method shown in the video.
No. I assume that you have problems with your method - that is why you asked your question on stackoverflow. So, I have opened this repository to discuss this alternative method that I have suggested.
This was posted in the wrong issue