-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConflictStructure.h
More file actions
31 lines (25 loc) · 1.52 KB
/
Copy pathConflictStructure.h
File metadata and controls
31 lines (25 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* OMA Project of Jacopo Maggio, Stefano Munna, Jacopo Nasi, Andrea Santu and Marco Torlaschi *
* Repository available on https://github.com/Jacopx/OMA_ExamTimeTable *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef OMA_EXAMTIMETABLE_CONFLICTSTRUCTURE_H
#define OMA_EXAMTIMETABLE_CONFLICTSTRUCTURE_H
#include "utils.h"
#include "TabuList.h"
typedef struct { // define the conflict between 2 exams
int exam1, exam2;
} conflict;
typedef struct {
int length;
conflict **ConflictArray; // array of conflict between 2 exams
int ConflictArrayLength; // len of ConflictArray
int nAltern; // number of alternatives
int **alternatives; // array of alternative solutions (obtained swapping a slot of 1 exams at time)
int *numConflictForAlternative; // number of conflict for the corresponding alternative
} ConflictStructure;
ConflictStructure* newConflictStructure (int length);
void freeConflictStructure (ConflictStructure *cf);
void findConflict (ConflictStructure *cf, dataStructure *sol, TempSol *Tsol);
void generateAlternatives (ConflictStructure *cf, TempSol *Tsol);
int findBestAlternative (ConflictStructure *cf, TabuList *TL, dataStructure *sol, TempSol *Tsol);
#endif //OMA_EXAMTIMETABLE_CONFLICTSTRUCTURE_H