Projet mbs

54

description

Bin Packing Métaheuristique : MBS-MBS' Cplex

Transcript of Projet mbs

Page 1: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Bin PackingMBS-MBS'-LP-Cplex

Elaziz Ghazouani

F.S.J.E.G.JENDOUBA

14 novembre 2012

Elaziz Ghazouani Bin Packing

Page 2: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Plan

1 IntroductionDé�nition 1Dé�nition 2

2 Exemple de problème

3 AlgorithmesAlgorithme MBS (Minimum Bin Slack)Algorithme MBS'

4 Application

Elaziz Ghazouani Bin Packing

Page 3: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Dé�nition 1Dé�nition 2

Méthodes de résolution

Les méthodes exactes

permettent d'obtenir la solution optimale à chaque fois, maisle temps de calcul peut être long si le problème est compliquéà résoudre.

Les méthodes approchés

appelées heuristiques, permettent d'obtenir une solutionapprochée, donc pas nécessairement optimale.

Elaziz Ghazouani Bin Packing

Page 4: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Dé�nition 1Dé�nition 2

Méthodes de résolution

Les méthodes exactes

permettent d'obtenir la solution optimale à chaque fois, maisle temps de calcul peut être long si le problème est compliquéà résoudre.

Les méthodes approchés

appelées heuristiques, permettent d'obtenir une solutionapprochée, donc pas nécessairement optimale.

Elaziz Ghazouani Bin Packing

Page 5: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Dé�nition 1Dé�nition 2

Heuristique

Heuristique : est un algorithme qui fournit rapidement unesolution réalisable, pas nécessairement optimale, pour unproblème d'optimisation.

Métaheuristique

Métaheuristique : est un algorithme d'optimisation visant àrésoudre des problèmes d'optimisation di�ciles (souvent issusdes domaines de la recherche opérationnelle, de l'ingénierie oude l'intelligence arti�cielle) pour lesquels on ne connaît pas deméthode classique plus e�cace.

Elaziz Ghazouani Bin Packing

Page 6: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Dé�nition 1Dé�nition 2

Heuristique

Heuristique : est un algorithme qui fournit rapidement unesolution réalisable, pas nécessairement optimale, pour unproblème d'optimisation.

Métaheuristique

Métaheuristique : est un algorithme d'optimisation visant àrésoudre des problèmes d'optimisation di�ciles (souvent issusdes domaines de la recherche opérationnelle, de l'ingénierie oude l'intelligence arti�cielle) pour lesquels on ne connaît pas deméthode classique plus e�cace.

Elaziz Ghazouani Bin Packing

Page 7: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Le problème du bin packing

Présentation de problème

On considère un ensemble de sacs (bin) identiques et unensemble d'objets dont on connait le poids. Sachant que lessacs ne peuvent supporter qu'un poids maximum, combienfaudra-t-il au minimum de sacs pour y ranger l'ensemble desobjets considérés ? ce problème d'optimisation, connu de �binpacking problem�

Elaziz Ghazouani Bin Packing

Page 8: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Formulation du problème

Input

Nombre de bin : m

Capacité de chaque bin : C

Nombre d'objet : n

Capacité de chaque objet :

wi

Elaziz Ghazouani Bin Packing

Page 9: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Formulation du problème

Input

Nombre de bin : m

Capacité de chaque bin : C

Nombre d'objet : n

Capacité de chaque objet :

wi

Elaziz Ghazouani Bin Packing

Page 10: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Formulation du problème

Input

Nombre de bin : m

Capacité de chaque bin : C

Nombre d'objet : n

Capacité de chaque objet :

wi

Elaziz Ghazouani Bin Packing

Page 11: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Formulation du problème

Input

Nombre de bin : m

Capacité de chaque bin : C

Nombre d'objet : n

Capacité de chaque objet :

wi

Elaziz Ghazouani Bin Packing

Page 12: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Formulation du problème

Output

Nombre de bins utilisés :

yj =

{1, si le bin j est utilise

0, sinon

Appartenance des objets aux bins :

xij =

{1, si l ′objet i est dans le bin j

0, sinon

Elaziz Ghazouani Bin Packing

Page 13: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Formulation du problème

Output

Nombre de bins utilisés :

yj =

{1, si le bin j est utilise

0, sinon

Appartenance des objets aux bins :

xij =

{1, si l ′objet i est dans le bin j

0, sinon

Elaziz Ghazouani Bin Packing

Page 14: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Fonction objective

minZ (y) =m∑j=1

yj

Sous contraintes

n∑i=1

wixij 6 Cyj

x ∈ {0, 1} ; y ∈ {0, 1} ; j ∈ [1, ...,m]Elaziz Ghazouani Bin Packing

Page 15: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Principe

1 Trier les objets par ordre croissant selon leurs poids.

2 charger l'objet qui a le poids le plus lourd.

3 comparer l'espace restant de bin (espace_rest) avec lespoids des objets restants.

4 Si on trouve un poids d'objet qui satisfaire espace_reston le charge, sinon on passe au bin suivat.

5 répéter l'étape 2 jusqu'à charger tous les objets.

Elaziz Ghazouani Bin Packing

Page 16: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Principe

1 Trier les objets par ordre croissant selon leurs poids.

2 charger l'objet qui a le poids le plus lourd.

3 comparer l'espace restant de bin (espace_rest) avec lespoids des objets restants.

4 Si on trouve un poids d'objet qui satisfaire espace_reston le charge, sinon on passe au bin suivat.

5 répéter l'étape 2 jusqu'à charger tous les objets.

Elaziz Ghazouani Bin Packing

Page 17: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Principe

1 Trier les objets par ordre croissant selon leurs poids.

2 charger l'objet qui a le poids le plus lourd.

3 comparer l'espace restant de bin (espace_rest) avec lespoids des objets restants.

4 Si on trouve un poids d'objet qui satisfaire espace_reston le charge, sinon on passe au bin suivat.

5 répéter l'étape 2 jusqu'à charger tous les objets.

Elaziz Ghazouani Bin Packing

Page 18: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Principe

1 Trier les objets par ordre croissant selon leurs poids.

2 charger l'objet qui a le poids le plus lourd.

3 comparer l'espace restant de bin (espace_rest) avec lespoids des objets restants.

4 Si on trouve un poids d'objet qui satisfaire espace_reston le charge, sinon on passe au bin suivat.

5 répéter l'étape 2 jusqu'à charger tous les objets.

Elaziz Ghazouani Bin Packing

Page 19: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Principe

1 Trier les objets par ordre croissant selon leurs poids.

2 charger l'objet qui a le poids le plus lourd.

3 comparer l'espace restant de bin (espace_rest) avec lespoids des objets restants.

4 Si on trouve un poids d'objet qui satisfaire espace_reston le charge, sinon on passe au bin suivat.

5 répéter l'étape 2 jusqu'à charger tous les objets.

Elaziz Ghazouani Bin Packing

Page 20: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Principe

1 Trier les objets par ordre croissant selon leurs poids.

2 charger l'objet qui a le poids le plus lourd.

3 comparer l'espace restant de bin (espace_rest) avec lespoids des objets restants.

4 Si on trouve un poids d'objet qui satisfaire espace_reston le charge, sinon on passe au bin suivat.

5 répéter l'étape 2 jusqu'à charger tous les objets.

Elaziz Ghazouani Bin Packing

Page 21: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 22: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 23: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 24: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 25: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 26: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 27: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 28: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 29: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 30: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 31: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 32: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 33: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Principe

principe

C'est le même principe que l'algorithme MBS sauf qu'àl'étape 2 on choisit aléatoirement le premier objet qu'onva le mettre dans le bin vide.

Elaziz Ghazouani Bin Packing

Page 34: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 35: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 36: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 37: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 38: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 39: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 40: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 41: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 42: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 43: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 44: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Algorithme MBS (Minimum Bin Slack)Algorithme MBS'

Exemple

Elaziz Ghazouani Bin Packing

Page 45: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Interfaces

Elaziz Ghazouani Bin Packing

Page 46: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Interfaces

Elaziz Ghazouani Bin Packing

Page 47: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Interfaces

Elaziz Ghazouani Bin Packing

Page 48: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Interfaces

Elaziz Ghazouani Bin Packing

Page 49: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Interfaces

Elaziz Ghazouani Bin Packing

Page 50: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Interfaces

Elaziz Ghazouani Bin Packing

Page 51: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Interfaces

Elaziz Ghazouani Bin Packing

Page 52: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Conclusion

Le problème de bin packing appartient à la famille desproblèmes d'optimisation combinatoires (POC) (sac à dos ouKP, Voyageur de Commerce ou PVC,).

On peut résoudre par l'AG.

Elaziz Ghazouani Bin Packing

Page 53: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Conclusion

Le problème de bin packing appartient à la famille desproblèmes d'optimisation combinatoires (POC) (sac à dos ouKP, Voyageur de Commerce ou PVC,).

On peut résoudre par l'AG.

Elaziz Ghazouani Bin Packing

Page 54: Projet mbs

IntroductionExemple de problème

AlgorithmesApplication

Elaziz Ghazouani Bin Packing