commit e4486d897c1412278e568b9a0954e7307c3f5317 Author: Rhizome Date: Mon Apr 8 18:45:40 2024 +0100 Define some data structures diff --git a/rotagen.h b/rotagen.h new file mode 100644 index 0000000..180b120 --- /dev/null +++ b/rotagen.h @@ -0,0 +1,32 @@ +#ifndef ROTAGEN_H +#define ROTAGEN_H + +#include + +#define MAX_JOBS 8 + +enum constraint_type { + JOB_EXEMPTION_CONSTRAINT, + SLOT_EXEMPTION_CONSTRAINT, +}; + +struct constraint { + int person; + enum constraint_type type; + union { + int job; /* Job constraints */ + int slot; /* Slot constraints */ + } object; +}; + +struct allocation { + int person; + int job; + int slot; +}; + +struct slot_result { + struct allocation allocations[MAX_JOBS]; +}; + +#endif