| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- // Type used to communicate the problem to be optimized to the serveur
- export type Skill = {
- id: number;
- name: string;
- isTeachable: boolean;
- isPreference: boolean;
- };
- export type AssignementPair = {
- slotId: string;
- volonteerId: number;
- isFixed?: boolean;
- };
- export type TimeslotRaw = {
- id: string;
- startTime: string;
- endTime: string;
- skillsId: Array<number>;
- minAttendee: number;
- maxAttendee: number;
- };
- export type VolonteerRaw = {
- id: number;
- skillsId: Array<number>;
- };
- export type MealSlot = {
- id: string;
- startTime: string;
- endTime: string;
- maxAttendee: number;
- };
- export type SolverInput = {
- constraints: Array<Skill>;
- mealAssignements: Array<AssignementPair>;
- volonteerList: Array<VolonteerRaw>;
- mealSlots: Array<MealSlot>;
- timeslots: Array<TimeslotRaw>;
- assignements: Array<AssignementPair>;
- };
- export type SolverOutput = {
- assignements: Array<AssignementPair>;
- message: string;
- score: string;
- explanation: string;
- };
- export type JustificationObject = {
- type: "Assignement" | "MealAssignement" | "MealSlot";
- slotId: string;
- volonteerId: number;
- };
- export type HardConstraint =
- | "Meal not initialized"
- | "Timeslot not initialized"
- | "Volonteer conflict"
- | "Volonteer Meal conflict"
- | "Competence conflict"
- | "Meal max attendee";
- export type ScoreExplanation = {
- [constraintName in HardConstraint]: Array<Array<string | JustificationObject>>;
- };
|