browndar / scheduler Goto Github PK
View Code? Open in Web Editor NEWGiven a list of people and some parameters, split them into smaller groups.
Given a list of people and some parameters, split them into smaller groups.
@browndar and I talked today about alternatives to simply popping groups off of a shuffled list and checking if the ban list accepts it or not.
This is a clique cover problem, but in most cases, people's incompatibility list will be short. The problem is probably np-complete, but the constraints - e.g. someone's incompatibility list - are pretty relaxed.
One method we discussed is a greedy graph-coloring algorithm. To use this, create a graph composed of nodes where edges connect people on a ban list. Directionality of the edge doesn't matter; the edge can be considered symmetric.
Ensure that people do not get assigned to a group with someone of a different coloring in their connected subgraph. Between disconnected subgraphs, color doesn't matter.
Another method is simulated annealing, a pretty common approach to SAT constraint solving. Construct groups in some relatively random way and use a fitness function to check if anyone is incompatible with their group members. This is a little better than the current blind shuffling solution in that we do some localized hill-climbing to try to reduce the amount of work we do in a re-shuffle.
Find all cliques on the compatibility graph, then assign each element a list of cliques they exist in, then choose a group of cliques in order of the minimum. Not sure if this ends up requiring backtracking. Reference: https://medium.com/100-days-of-algorithms/day-64-k-clique-c03fdc565b1e
Just making a ticket so I remember what the issue was
rejigger function breaks if the group population isn't large enough to contain a certain number of groups (e.g. 13 people participating)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.