Commit f3ff51b1 authored by Dumoulin Nicolas's avatar Dumoulin Nicolas
Browse files

useless fonction

parent 5e667e3b
......@@ -15,13 +15,6 @@ class Reallocator:
self.PAT_cult_to_decrease = surfDelta[surfDelta<0].sort_values(ascending=True).keys().tolist()
self.PAT_cult_to_increase = surfDelta[surfDelta>0].sort_values(ascending=False).keys().tolist()
def is_fullreallocated(self, patches):
nbPatches = int(len(patches)*self.ratioNbPatches)
surfDelta = self.targetPAT - patches.groupby('cultgeopat')['SURF_PARC'].sum()
cult_to_decrease = surfDelta.loc[self.PAT_cult_to_decrease][surfDelta<0].sort_values(ascending=True).keys().tolist()
cult_to_increase = surfDelta.loc[self.PAT_cult_to_increase][surfDelta>0].sort_values(ascending=True).keys().tolist()
return len(cult_to_increase)==0 or len(cult_to_decrease)==0
def reallocate(self, patches):
nbPatches = int(len(patches)*self.ratioNbPatches)
surfDelta = self.targetPAT - patches.groupby('cultgeopat')['SURF_PARC'].sum()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment