Is there a function/package in python that as evenly as possible distributes a number of points over groups/teams, but with restrictions for every team (type of points, etc.)?
So for example you have red, blue and yellow points. And then 5 teams, but one team can have max 4 blue, and another team needs to have 2 points difference between yellow and blue, etcetera.