%%%%%%%%%%%% Ressources %%%%%%%%%%%%%%%%%%%% % Le nombre de ressources n_res = 4; % La capacité des ressources. res_cap = [ 67, 103, 67, 33 ]; %%%%%%%%%%%% Tâches %%%%%%%%%%%%%%%%%%%% % Le nombre de tâches. n_tasks = 60; % Les durées des tâches. duration = [ 9, 3, 5, 6, 1, 2, 8, 10, 6, 1, 8, 6, 6, 9, 10, 2, 10, 1, 8, 9, 5, 9, 3, 9, 3, 6, 5, 7, 5, 7, 5, 9, 10, 6, 4, 3, 2, 4, 3, 5, 7, 4, 10, 3, 3, 3, 8, 9, 9, 4, 1, 3, 1, 10, 6, 4, 3, 1, 1, 9 ]; % Les besoins en ressources pour chaque tâche res_req = array2d(1..n_res, 1..n_tasks, [0, 6, 7, 0, 2, 5, 0, 8, 6, 8, 0, 5, 7, 0, 1, 0, 8, 0, 0, 2, 0, 0, 5, 9, 0, 4, 9, 8, 6, 3, 5, 2, 3, 3, 8, 0, 10, 0, 0, 7, 3, 10, 9, 3, 10, 6, 8, 6, 0, 2, 0, 7, 4, 0, 3, 4, 10, 0, 9, 2, 7, 5, 10, 8, 2, 0, 0, 9, 0, 0, 10, 9, 6, 0, 7, 0, 10, 7, 8, 6, 8, 3, 9, 0, 7, 3, 6, 10, 10, 6, 3, 0, 2, 0, 5, 9, 10, 0, 9, 0, 8, 0, 9, 7, 7, 9, 0, 10, 0, 8, 8, 9, 4, 2, 4, 7, 8, 8, 8, 3, 5, 1, 0, 0, 0, 2, 10, 5, 10, 5, 3, 7, 8, 6, 8, 4, 4, 5, 3, 3, 9, 0, 4, 0, 7, 0, 8, 0, 7, 0, 6, 0, 0, 3, 8, 0, 0, 7, 10, 7, 2, 6, 5, 5, 5, 0, 7, 0, 7, 5, 10, 10, 4, 1, 3, 9, 9, 6, 9, 0, 0, 4, 9, 0, 2, 1, 9, 4, 10, 4, 4, 0, 0, 8, 0, 2, 3, 3, 3, 2, 10, 0, 1, 7, 6, 2, 2, 1, 5, 2, 2, 3, 2, 4, 4, 0, 1, 3, 10, 1, 0, 4, 1, 1, 7, 6, 0, 4, 0, 1, 8, 1, 0, 0, 3, 2, 9, 4, 8, 4]); % Les successeurs de la tâche (pour la tâche i, suc[i] est la liste des tâches qui ne peuvent commencer qu'après la fin de la tâche i) suc = [{ 4, 5, 9 }, { 8 }, { 5, 13, 14 }, { 7, 10, 22 }, { 28 }, { 12, 59 }, { 11, 44, 60 }, { 36 }, { 17, 18, 42 }, { 3, 28 }, { 39, 54 }, { 30 }, { 16, 29 }, { 22, 23, 34 }, { 50 }, { 25, 31 }, { 41 }, { 26, 35, 37 }, { 20, 21, 25 }, { 24 }, { 46, 47, 53 }, { 53 }, { 27, 40 }, { 45 }, { 32 }, { 41 }, { 38 }, { 32 }, { 44 }, { 43, 47, 57 }, { 52 }, { 45 }, { 34 }, { 48 }, { 51 }, { 48 }, { 58 }, { 46 }, { 41, 46 }, { 43, 48 }, { 49, 55 }, { 44 }, { 51 }, { 51 }, { 58 }, { 57 }, { 56 }, { 56 }, { 52 }, { 54 }, { 52 }, { 59 }, { 60 }, { 55, 57 , 58}, { 58 }, { 60 }, { 59 }, { }, { }, { } ];