#define M 6 // Number of machines #define JOBS M // Number of jobs #define TASKS JOBS // Number of tasks #define ITERATIONS 12 // Number of randomized runs int duration[JOBS][TASKS]; // Time to run task t of job j int task_time[M][JOBS]; // Time to run job j’s task on m int machine[JOBS][TASKS]; // Machine for task t of job j continuous FinTime[M][JOBS]; // Finish of j"s task on m continuous MakeSpan; // Finish of last task data() // 6 by 6 { duration = { 1,3,6,7,3,6, 8,5,10,10,10,4, 5,4,8,9,1,7, 5,5,5,3,8,9, 9,3,5,4,3,1, 3,3,9,10,4,1 }; machine = { 2,0,1,3,5,4, 1,2,4,5,0,3, 2,3,5,0,1,4, 1,0,2,3,4,5, 2,1,4,5,0,3, 1,3,5,0,4,2 }; and(int j=0;j= FinTime[machine[jb][TASKS-1]][jb]; } schedule(continuous Ft[],int time[]) { int p[JOBS]; and(int j=0;j 0; then Ft[p[i-1]] + time[p[i]] <= Ft[p[i]]; } } pick_next_job(int i, int p[], continuous Ft[], int time[]) { double prize; prize = 1e6; and(int j=i;j 0; // p[0],...,p[i-1] already scheduled then Ft[p[i-1]] + time[p[j]] <= Ft[p[j]]; and(int k=i;k= Ft[p[j]] + time[p[k]]; min: MakeSpan; wp(MakeSpan) < prize; // Better evaluation ? switch(i,j,p,prize); // Then take first place } then ; // If no improvement, do nothing } } switch(int i,j, p[], double & prize) { int winner; winner = p[j]; p[j] = p[i]; p[i] = winner; prize = wp(MakeSpan); } find_next_random_sequence(int q[], int n) { int temp, rand; and(int i=0;i