69
Feuille 0 Programmation Linéaire et Recherche Opérationnelle Travaux Dirigés Alexandre Tessier [email protected] Université d’Orléans UFR Sciences Département d’informatique L3 STIC – année 20062007 L3 STIC info/miage Programmation Linéaire (PLRO)

Programmation Linéaire et Recherche Opérationnelle - Travaux Dirigés · Feuille0 Programmation Linéaire et Recherche Opérationnelle Travaux Dirigés Alexandre Tessier [email protected]

  • Upload
    hangoc

  • View
    231

  • Download
    0

Embed Size (px)

Citation preview

Feuille 0

Programmation Linéaireet

Recherche OpérationnelleTravaux Dirigés

Alexandre [email protected]

Université d’OrléansUFR Sciences

Département d’informatique

L3 STIC – année 2006•2007

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 0

Table des matières

1 Modélisation de Problèmes Linéaires

2 Forme Standard/Canonique, Résolution Graphique

3 Programmation Linéaire en Nombres Entiers

4 Algorithme du Simplexe

5 Cas particuliers de l’algorithme du Simplexe

6 Méthode du Simplexe

7 Dualité, Théorème de Dualité

8 Dualité, Écarts Complémentaires et Interprétation Économique

9 Résolution de Problème, Interprétation des Résultats

10 Résolution de Problème, Interprétation des Résultats

11 Algorithme du Simplexe Révisé

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 1 Modélisation de Problèmes Linéaires

(*) Exercice 1.3

min: 3 x1 + 24 x2 + 9 x3 + 20 x4 + 19 x5;calories = 110 x1 + 205 x2 + 160 x3 + 420 x4 + 260 x5;proteines = 4 x1 + 32 x2 + 8 x3 + 4 x4 + 14 x5;calcium = 2 x1 + 12 x2 + 285 x3 + 22 x4 + 80 x5;porridge = 28 x1;poulet = 100 x2;lait = 237 x3;tarte = 170 x4;porc = 260 x5;2000 <= calories;55 <= proteines;800 <= calcium;28 x1 <= 110;100 x2 <= 600;237 x3 <= 2000;170 x4 <= 350;260 x5 <= 500;

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 1 Modélisation de Problèmes Linéaires

(*) Exercice 1.3

Value of objective function: 92.5144x1 3.92857x2 0x3 4.3947x4 2.05882x5 0porridge 110calcium 1305.64tarte 350calories 2000poulet 0lait 1041.54porc 0proteines 59.1071

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 1 Modélisation de Problèmes Linéaires

Exercice 1.4Question 2 (*)

10000pA égale à la moitié de la quantité initiale 10000pA

on a pA = 12 pA

on pose 10000xi = Ti

max −30x1 − 100x2 − 180x3

s.c.

8<:5000 ≥ 6000x1 + 1000x2 + 700x3 + 10000x4

1 = x1 + x2 + x3 + x4

x1, x2, x3, x4 ≥ 0

max −3x1 − 10x2 − 18x3

s.c.

8<:50 ≥ 60x1 + 10x2 + 7x3 + 100x4

1 = x1 + x2 + x3 + x4

x1, x2, x3, x4 ≥ 0

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 1 Modélisation de Problèmes Linéaires

Exercice 1.4Question 2 (*)

10000pA égale à la moitié de la quantité initiale 10000pA

on a pA = 12 pA

on pose 10000xi = Ti

max −30x1 − 100x2 − 180x3

s.c.

8<:5000 ≥ 6000x1 + 1000x2 + 700x3 + 10000x4

1 = x1 + x2 + x3 + x4

x1, x2, x3, x4 ≥ 0

max −3x1 − 10x2 − 18x3

s.c.

8<:50 ≥ 60x1 + 10x2 + 7x3 + 100x4

1 = x1 + x2 + x3 + x4

x1, x2, x3, x4 ≥ 0

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 1 Modélisation de Problèmes Linéaires

Exercice 1.4Question 2 (*)

10000pA égale à la moitié de la quantité initiale 10000pA

on a pA = 12 pA

on pose 10000xi = Ti

max −30x1 − 100x2 − 180x3

s.c.

8<:5000 ≥ 6000x1 + 1000x2 + 700x3 + 10000x4

1 = x1 + x2 + x3 + x4

x1, x2, x3, x4 ≥ 0

max −3x1 − 10x2 − 18x3

s.c.

8<:50 ≥ 60x1 + 10x2 + 7x3 + 100x4

1 = x1 + x2 + x3 + x4

x1, x2, x3, x4 ≥ 0

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 1 Modélisation de Problèmes Linéaires

(*) Exercice 1.6

6 variablesK , S les quantités de kérosène et de super produitesk1, k2 les quantités de PL1 et PL2 intervenant dans le kérosènes1, s2 les quantités de PL1 et PL2 intervenant dans le super

contraintes sur les taux d’octane

(5)104k1 + 94k2

k1 + k2≥ 102

(6)104s1 + 94s2

s1 + s2≥ 96

max: 150 K + 100 S;K = k1 + k2;K <= 20;S = s1 + s2;k1 + s1 <= 30;k2 + s2 <= 70;8 k2 <= 2 k1; /* (5) */2 s2 <= 8 s1; /* (6) */

profit = 325003 k1 = 40/3, k2 = 10/3, s1 = 50/3, s2 = 200/3

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 1 Modélisation de Problèmes Linéaires

(*) Exercice 1.6

6 variablesK , S les quantités de kérosène et de super produitesk1, k2 les quantités de PL1 et PL2 intervenant dans le kérosènes1, s2 les quantités de PL1 et PL2 intervenant dans le super

contraintes sur les taux d’octane

(5)104k1 + 94k2

k1 + k2≥ 102

(6)104s1 + 94s2

s1 + s2≥ 96

max: 150 K + 100 S;K = k1 + k2;K <= 20;S = s1 + s2;k1 + s1 <= 30;k2 + s2 <= 70;8 k2 <= 2 k1; /* (5) */2 s2 <= 8 s1; /* (6) */

profit = 325003 k1 = 40/3, k2 = 10/3, s1 = 50/3, s2 = 200/3

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 1 Modélisation de Problèmes Linéaires

(*) Exercice 1.6

6 variablesK , S les quantités de kérosène et de super produitesk1, k2 les quantités de PL1 et PL2 intervenant dans le kérosènes1, s2 les quantités de PL1 et PL2 intervenant dans le super

contraintes sur les taux d’octane

(5)104k1 + 94k2

k1 + k2≥ 102

(6)104s1 + 94s2

s1 + s2≥ 96

max: 150 K + 100 S;K = k1 + k2;K <= 20;S = s1 + s2;k1 + s1 <= 30;k2 + s2 <= 70;8 k2 <= 2 k1; /* (5) */2 s2 <= 8 s1; /* (6) */

profit = 325003 k1 = 40/3, k2 = 10/3, s1 = 50/3, s2 = 200/3

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.2

z(max) = +30x1 +30x2 +40x3

e1 = 2000 −2x1 −x2 −x3e2 = 7000 −x1 −2x2 −4x3

x3 ≤ 2000

x3 ≤ 70004

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, e1 = 2000, e2 = 7000

on substitue x3 = 70004 − 1

4 x1 − 12 x2 − 1

4 e2

z(max) = 70000 +20x1 +10x2 −10e2

e1 = 250 − 74 x1 − 1

2 x2 + 14 e2

x3 = 1750 − 14 x1 − 1

2 x2 − 14 e2

x1 ≤ 10007

x1 ≤ 7000

nouvelle solution

z(max) = 70000, x1 = 0, x2 = 0, x3 = 1750, e1 = 250, e2 = 0

on substitue x1 = 10007 − 2

7 x2 + 17 e2 − 4

7 e1

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.2

z(max) = +30x1 +30x2 +40x3

e1 = 2000 −2x1 −x2 −x3e2 = 7000 −x1 −2x2 −4x3

x3 ≤ 2000

x3 ≤ 70004

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, e1 = 2000, e2 = 7000

on substitue x3 = 70004 − 1

4 x1 − 12 x2 − 1

4 e2

z(max) = 70000 +20x1 +10x2 −10e2

e1 = 250 − 74 x1 − 1

2 x2 + 14 e2

x3 = 1750 − 14 x1 − 1

2 x2 − 14 e2

x1 ≤ 10007

x1 ≤ 7000

nouvelle solution

z(max) = 70000, x1 = 0, x2 = 0, x3 = 1750, e1 = 250, e2 = 0

on substitue x1 = 10007 − 2

7 x2 + 17 e2 − 4

7 e1

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.2

z(max) = +30x1 +30x2 +40x3

e1 = 2000 −2x1 −x2 −x3e2 = 7000 −x1 −2x2 −4x3

x3 ≤ 2000

x3 ≤ 70004

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, e1 = 2000, e2 = 7000

on substitue x3 = 70004 − 1

4 x1 − 12 x2 − 1

4 e2

z(max) = 70000 +20x1 +10x2 −10e2

e1 = 250 − 74 x1 − 1

2 x2 + 14 e2

x3 = 1750 − 14 x1 − 1

2 x2 − 14 e2

x1 ≤ 10007

x1 ≤ 7000

nouvelle solution

z(max) = 70000, x1 = 0, x2 = 0, x3 = 1750, e1 = 250, e2 = 0

on substitue x1 = 10007 − 2

7 x2 + 17 e2 − 4

7 e1

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.2

z(max) = +30x1 +30x2 +40x3

e1 = 2000 −2x1 −x2 −x3e2 = 7000 −x1 −2x2 −4x3

x3 ≤ 2000

x3 ≤ 70004

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, e1 = 2000, e2 = 7000

on substitue x3 = 70004 − 1

4 x1 − 12 x2 − 1

4 e2

z(max) = 70000 +20x1 +10x2 −10e2

e1 = 250 − 74 x1 − 1

2 x2 + 14 e2

x3 = 1750 − 14 x1 − 1

2 x2 − 14 e2

x1 ≤ 10007

x1 ≤ 7000

nouvelle solution

z(max) = 70000, x1 = 0, x2 = 0, x3 = 1750, e1 = 250, e2 = 0

on substitue x1 = 10007 − 2

7 x2 + 17 e2 − 4

7 e1

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.2

z(max) = +30x1 +30x2 +40x3

e1 = 2000 −2x1 −x2 −x3e2 = 7000 −x1 −2x2 −4x3

x3 ≤ 2000

x3 ≤ 70004

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, e1 = 2000, e2 = 7000

on substitue x3 = 70004 − 1

4 x1 − 12 x2 − 1

4 e2

z(max) = 70000 +20x1 +10x2 −10e2

e1 = 250 − 74 x1 − 1

2 x2 + 14 e2

x3 = 1750 − 14 x1 − 1

2 x2 − 14 e2

x1 ≤ 10007

x1 ≤ 7000

nouvelle solution

z(max) = 70000, x1 = 0, x2 = 0, x3 = 1750, e1 = 250, e2 = 0

on substitue x1 = 10007 − 2

7 x2 + 17 e2 − 4

7 e1

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.2

z(max) = +30x1 +30x2 +40x3

e1 = 2000 −2x1 −x2 −x3e2 = 7000 −x1 −2x2 −4x3

x3 ≤ 2000

x3 ≤ 70004

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, e1 = 2000, e2 = 7000

on substitue x3 = 70004 − 1

4 x1 − 12 x2 − 1

4 e2

z(max) = 70000 +20x1 +10x2 −10e2

e1 = 250 − 74 x1 − 1

2 x2 + 14 e2

x3 = 1750 − 14 x1 − 1

2 x2 − 14 e2

x1 ≤ 10007

x1 ≤ 7000

nouvelle solution

z(max) = 70000, x1 = 0, x2 = 0, x3 = 1750, e1 = 250, e2 = 0

on substitue x1 = 10007 − 2

7 x2 + 17 e2 − 4

7 e1

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.2

z(max) = +30x1 +30x2 +40x3

e1 = 2000 −2x1 −x2 −x3e2 = 7000 −x1 −2x2 −4x3

x3 ≤ 2000

x3 ≤ 70004

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, e1 = 2000, e2 = 7000

on substitue x3 = 70004 − 1

4 x1 − 12 x2 − 1

4 e2

z(max) = 70000 +20x1 +10x2 −10e2

e1 = 250 − 74 x1 − 1

2 x2 + 14 e2

x3 = 1750 − 14 x1 − 1

2 x2 − 14 e2

x1 ≤ 10007

x1 ≤ 7000

nouvelle solution

z(max) = 70000, x1 = 0, x2 = 0, x3 = 1750, e1 = 250, e2 = 0

on substitue x1 = 10007 − 2

7 x2 + 17 e2 − 4

7 e1

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.2

z(max) = 5100007 + 30

7 x2 − 507 e2 − 80

7 e1

x1 = 10007 − 2

7 x2 + 17 e2 − 4

7 e1

x3 = 120007 − 3

7 x2 − 27 e2 + 1

7 e1

x2 ≤ 500x2 ≤ 4000

z(max) = 5100007 , x1 = 1000

7 , x2 = 0, x3 = 120007 , e1 = 0, e2 = 0

on substitue x2 = 500 + 12 e2 − 2e1 − 7

2 x1

z(max) = 75000 −5e2 −20e1 −15x1

x2 = 500 + 12 e2 −2e1 − 7

2 x1

x3 = 1500 − 12 e2 +e1 + 3

2 x1

solution optimale

z(max) = 75000, x1 = 0, x2 = 500, x3 = 1500, e1 = 0, e2 = 0

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.2

z(max) = 5100007 + 30

7 x2 − 507 e2 − 80

7 e1

x1 = 10007 − 2

7 x2 + 17 e2 − 4

7 e1

x3 = 120007 − 3

7 x2 − 27 e2 + 1

7 e1

x2 ≤ 500x2 ≤ 4000

z(max) = 5100007 , x1 = 1000

7 , x2 = 0, x3 = 120007 , e1 = 0, e2 = 0

on substitue x2 = 500 + 12 e2 − 2e1 − 7

2 x1

z(max) = 75000 −5e2 −20e1 −15x1

x2 = 500 + 12 e2 −2e1 − 7

2 x1

x3 = 1500 − 12 e2 +e1 + 3

2 x1

solution optimale

z(max) = 75000, x1 = 0, x2 = 500, x3 = 1500, e1 = 0, e2 = 0

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.2

z(max) = 5100007 + 30

7 x2 − 507 e2 − 80

7 e1

x1 = 10007 − 2

7 x2 + 17 e2 − 4

7 e1

x3 = 120007 − 3

7 x2 − 27 e2 + 1

7 e1

x2 ≤ 500x2 ≤ 4000

z(max) = 5100007 , x1 = 1000

7 , x2 = 0, x3 = 120007 , e1 = 0, e2 = 0

on substitue x2 = 500 + 12 e2 − 2e1 − 7

2 x1

z(max) = 75000 −5e2 −20e1 −15x1

x2 = 500 + 12 e2 −2e1 − 7

2 x1

x3 = 1500 − 12 e2 +e1 + 3

2 x1

solution optimale

z(max) = 75000, x1 = 0, x2 = 500, x3 = 1500, e1 = 0, e2 = 0

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.2

z(max) = 5100007 + 30

7 x2 − 507 e2 − 80

7 e1

x1 = 10007 − 2

7 x2 + 17 e2 − 4

7 e1

x3 = 120007 − 3

7 x2 − 27 e2 + 1

7 e1

x2 ≤ 500x2 ≤ 4000

z(max) = 5100007 , x1 = 1000

7 , x2 = 0, x3 = 120007 , e1 = 0, e2 = 0

on substitue x2 = 500 + 12 e2 − 2e1 − 7

2 x1

z(max) = 75000 −5e2 −20e1 −15x1

x2 = 500 + 12 e2 −2e1 − 7

2 x1

x3 = 1500 − 12 e2 +e1 + 3

2 x1

solution optimale

z(max) = 75000, x1 = 0, x2 = 500, x3 = 1500, e1 = 0, e2 = 0

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.2

z(max) = 5100007 + 30

7 x2 − 507 e2 − 80

7 e1

x1 = 10007 − 2

7 x2 + 17 e2 − 4

7 e1

x3 = 120007 − 3

7 x2 − 27 e2 + 1

7 e1

x2 ≤ 500x2 ≤ 4000

z(max) = 5100007 , x1 = 1000

7 , x2 = 0, x3 = 120007 , e1 = 0, e2 = 0

on substitue x2 = 500 + 12 e2 − 2e1 − 7

2 x1

z(max) = 75000 −5e2 −20e1 −15x1

x2 = 500 + 12 e2 −2e1 − 7

2 x1

x3 = 1500 − 12 e2 +e1 + 3

2 x1

solution optimale

z(max) = 75000, x1 = 0, x2 = 500, x3 = 1500, e1 = 0, e2 = 0

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.4

z(max) = + 135 t1 +4t2 + 18

5 t3x1 = 4000 − 3

8 t1 − 18 t2 − 1

10 t3x2 = 800 − 1

2 t1 − 120 t2 − 1

5 t3x3 = 1500 − 1

2 t1 − 15 t2 − 3

20 t3x4 = 8000 −t1 −t2 −t3

t2 ≤ 32000t2 ≤ 16000t2 ≤ 7500t2 ≤ 8000

on substitue t2 = 7500− 52 t1 − 3

4 t3 − 5x3

z(max) = 30000 − 375 t1 + 3

5 t3 −20x3

x1 = 61252 − 1

16 t1 − 1160 t3 + 5

8 x3

x2 = 425 − 38 t1 − 13

80 t3 + 14 x3

t2 = 7500 − 52 t1 − 3

4 t3 −5x3

x4 = 500 + 32 t1 − 1

4 t3 +5x3

t3 ≤ 490000t3 ≤ 34000

13 ' 2615t3 ≤ 10000t3 ≤ 2000

on substitue t3 = 2000 + 6t1 + 20x3 − 4x4

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.4

z(max) = + 135 t1 +4t2 + 18

5 t3x1 = 4000 − 3

8 t1 − 18 t2 − 1

10 t3x2 = 800 − 1

2 t1 − 120 t2 − 1

5 t3x3 = 1500 − 1

2 t1 − 15 t2 − 3

20 t3x4 = 8000 −t1 −t2 −t3

t2 ≤ 32000t2 ≤ 16000t2 ≤ 7500t2 ≤ 8000

on substitue t2 = 7500− 52 t1 − 3

4 t3 − 5x3

z(max) = 30000 − 375 t1 + 3

5 t3 −20x3

x1 = 61252 − 1

16 t1 − 1160 t3 + 5

8 x3

x2 = 425 − 38 t1 − 13

80 t3 + 14 x3

t2 = 7500 − 52 t1 − 3

4 t3 −5x3

x4 = 500 + 32 t1 − 1

4 t3 +5x3

t3 ≤ 490000t3 ≤ 34000

13 ' 2615t3 ≤ 10000t3 ≤ 2000

on substitue t3 = 2000 + 6t1 + 20x3 − 4x4

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.4

z(max) = + 135 t1 +4t2 + 18

5 t3x1 = 4000 − 3

8 t1 − 18 t2 − 1

10 t3x2 = 800 − 1

2 t1 − 120 t2 − 1

5 t3x3 = 1500 − 1

2 t1 − 15 t2 − 3

20 t3x4 = 8000 −t1 −t2 −t3

t2 ≤ 32000t2 ≤ 16000t2 ≤ 7500t2 ≤ 8000

on substitue t2 = 7500− 52 t1 − 3

4 t3 − 5x3

z(max) = 30000 − 375 t1 + 3

5 t3 −20x3

x1 = 61252 − 1

16 t1 − 1160 t3 + 5

8 x3

x2 = 425 − 38 t1 − 13

80 t3 + 14 x3

t2 = 7500 − 52 t1 − 3

4 t3 −5x3

x4 = 500 + 32 t1 − 1

4 t3 +5x3

t3 ≤ 490000t3 ≤ 34000

13 ' 2615t3 ≤ 10000t3 ≤ 2000

on substitue t3 = 2000 + 6t1 + 20x3 − 4x4

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.4

z(max) = + 135 t1 +4t2 + 18

5 t3x1 = 4000 − 3

8 t1 − 18 t2 − 1

10 t3x2 = 800 − 1

2 t1 − 120 t2 − 1

5 t3x3 = 1500 − 1

2 t1 − 15 t2 − 3

20 t3x4 = 8000 −t1 −t2 −t3

t2 ≤ 32000t2 ≤ 16000t2 ≤ 7500t2 ≤ 8000

on substitue t2 = 7500− 52 t1 − 3

4 t3 − 5x3

z(max) = 30000 − 375 t1 + 3

5 t3 −20x3

x1 = 61252 − 1

16 t1 − 1160 t3 + 5

8 x3

x2 = 425 − 38 t1 − 13

80 t3 + 14 x3

t2 = 7500 − 52 t1 − 3

4 t3 −5x3

x4 = 500 + 32 t1 − 1

4 t3 +5x3

t3 ≤ 490000t3 ≤ 34000

13 ' 2615t3 ≤ 10000t3 ≤ 2000

on substitue t3 = 2000 + 6t1 + 20x3 − 4x4

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.4

z(max) = + 135 t1 +4t2 + 18

5 t3x1 = 4000 − 3

8 t1 − 18 t2 − 1

10 t3x2 = 800 − 1

2 t1 − 120 t2 − 1

5 t3x3 = 1500 − 1

2 t1 − 15 t2 − 3

20 t3x4 = 8000 −t1 −t2 −t3

t2 ≤ 32000t2 ≤ 16000t2 ≤ 7500t2 ≤ 8000

on substitue t2 = 7500− 52 t1 − 3

4 t3 − 5x3

z(max) = 30000 − 375 t1 + 3

5 t3 −20x3

x1 = 61252 − 1

16 t1 − 1160 t3 + 5

8 x3

x2 = 425 − 38 t1 − 13

80 t3 + 14 x3

t2 = 7500 − 52 t1 − 3

4 t3 −5x3

x4 = 500 + 32 t1 − 1

4 t3 +5x3

t3 ≤ 490000t3 ≤ 34000

13 ' 2615t3 ≤ 10000t3 ≤ 2000

on substitue t3 = 2000 + 6t1 + 20x3 − 4x4

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.4

z(max) = + 135 t1 +4t2 + 18

5 t3x1 = 4000 − 3

8 t1 − 18 t2 − 1

10 t3x2 = 800 − 1

2 t1 − 120 t2 − 1

5 t3x3 = 1500 − 1

2 t1 − 15 t2 − 3

20 t3x4 = 8000 −t1 −t2 −t3

t2 ≤ 32000t2 ≤ 16000t2 ≤ 7500t2 ≤ 8000

on substitue t2 = 7500− 52 t1 − 3

4 t3 − 5x3

z(max) = 30000 − 375 t1 + 3

5 t3 −20x3

x1 = 61252 − 1

16 t1 − 1160 t3 + 5

8 x3

x2 = 425 − 38 t1 − 13

80 t3 + 14 x3

t2 = 7500 − 52 t1 − 3

4 t3 −5x3

x4 = 500 + 32 t1 − 1

4 t3 +5x3

t3 ≤ 490000t3 ≤ 34000

13 ' 2615t3 ≤ 10000t3 ≤ 2000

on substitue t3 = 2000 + 6t1 + 20x3 − 4x4

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.4

z(max) = 31200 − 195 t1 −8x3 − 12

5 x4

x1 = 3050 + . . .x2 = 100 + . . .t2 = 6000 + . . .t3 = 2000 + . . .

z(max) = 31200t1 = 0, t2 = 6000, t3 = 2000

x1 = 3050, x2 = 100, x3 = 0, x4 = 0

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 4 Algorithme du Simplexe

(*) Exercice 4.4

z(max) = 31200 − 195 t1 −8x3 − 12

5 x4

x1 = 3050 + . . .x2 = 100 + . . .t2 = 6000 + . . .t3 = 2000 + . . .

z(max) = 31200t1 = 0, t2 = 6000, t3 = 2000

x1 = 3050, x2 = 100, x3 = 0, x4 = 0

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +10x1 −57x2 −9x3 −24x4

x5 = −0.5x1 +5.5x2 +2.5x3 −9x4

x6 = −0.5x1 +1.5x2 +0.5x3 −x4

x7 = 1 −x1

x1 ≤ 0x1 ≤ 0x1 ≤ 1

on substitue x1 = 11x2 + 5x3 − 18x4 − 2x5

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +53x2 +41x3 −204x4 −20x5

x1 = +11x2 +5x3 −18x4 −2x5

x6 = −4x2 −2x3 +8x4 +x5

x7 = 1 −11x2 −5x3 +18x4 +2x5

x2 ≤ 0x2 ≤ 1

11

on substitue x2 = −0.5x3 + 2x4 + 0.25x5 − 0.25x6 retour

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +10x1 −57x2 −9x3 −24x4

x5 = −0.5x1 +5.5x2 +2.5x3 −9x4

x6 = −0.5x1 +1.5x2 +0.5x3 −x4

x7 = 1 −x1

x1 ≤ 0x1 ≤ 0x1 ≤ 1

on substitue x1 = 11x2 + 5x3 − 18x4 − 2x5

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +53x2 +41x3 −204x4 −20x5

x1 = +11x2 +5x3 −18x4 −2x5

x6 = −4x2 −2x3 +8x4 +x5

x7 = 1 −11x2 −5x3 +18x4 +2x5

x2 ≤ 0x2 ≤ 1

11

on substitue x2 = −0.5x3 + 2x4 + 0.25x5 − 0.25x6 retour

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +10x1 −57x2 −9x3 −24x4

x5 = −0.5x1 +5.5x2 +2.5x3 −9x4

x6 = −0.5x1 +1.5x2 +0.5x3 −x4

x7 = 1 −x1

x1 ≤ 0x1 ≤ 0x1 ≤ 1

on substitue x1 = 11x2 + 5x3 − 18x4 − 2x5

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +53x2 +41x3 −204x4 −20x5

x1 = +11x2 +5x3 −18x4 −2x5

x6 = −4x2 −2x3 +8x4 +x5

x7 = 1 −11x2 −5x3 +18x4 +2x5

x2 ≤ 0x2 ≤ 1

11

on substitue x2 = −0.5x3 + 2x4 + 0.25x5 − 0.25x6 retour

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +10x1 −57x2 −9x3 −24x4

x5 = −0.5x1 +5.5x2 +2.5x3 −9x4

x6 = −0.5x1 +1.5x2 +0.5x3 −x4

x7 = 1 −x1

x1 ≤ 0x1 ≤ 0x1 ≤ 1

on substitue x1 = 11x2 + 5x3 − 18x4 − 2x5

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +53x2 +41x3 −204x4 −20x5

x1 = +11x2 +5x3 −18x4 −2x5

x6 = −4x2 −2x3 +8x4 +x5

x7 = 1 −11x2 −5x3 +18x4 +2x5

x2 ≤ 0x2 ≤ 1

11

on substitue x2 = −0.5x3 + 2x4 + 0.25x5 − 0.25x6 retour

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +10x1 −57x2 −9x3 −24x4

x5 = −0.5x1 +5.5x2 +2.5x3 −9x4

x6 = −0.5x1 +1.5x2 +0.5x3 −x4

x7 = 1 −x1

x1 ≤ 0x1 ≤ 0x1 ≤ 1

on substitue x1 = 11x2 + 5x3 − 18x4 − 2x5

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +53x2 +41x3 −204x4 −20x5

x1 = +11x2 +5x3 −18x4 −2x5

x6 = −4x2 −2x3 +8x4 +x5

x7 = 1 −11x2 −5x3 +18x4 +2x5

x2 ≤ 0x2 ≤ 1

11

on substitue x2 = −0.5x3 + 2x4 + 0.25x5 − 0.25x6 retour

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +10x1 −57x2 −9x3 −24x4

x5 = −0.5x1 +5.5x2 +2.5x3 −9x4

x6 = −0.5x1 +1.5x2 +0.5x3 −x4

x7 = 1 −x1

x1 ≤ 0x1 ≤ 0x1 ≤ 1

on substitue x1 = 11x2 + 5x3 − 18x4 − 2x5

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +53x2 +41x3 −204x4 −20x5

x1 = +11x2 +5x3 −18x4 −2x5

x6 = −4x2 −2x3 +8x4 +x5

x7 = 1 −11x2 −5x3 +18x4 +2x5

x2 ≤ 0x2 ≤ 1

11

on substitue x2 = −0.5x3 + 2x4 + 0.25x5 − 0.25x6 retour

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +14.5x3 −98x4 −6.75x5 −13.25x6

x1 = −0.5x3 +4x4 +0.75x5 −2.75x6

x2 = −0.5x3 +2x4 +0.25x5 −0.25x6

x7 = 1 +0.5x3 −4x4 −0.75x5 +2.75x6

x3 ≤ 0x3 ≤ 0

on substitue x3 = −2x1 + 8x4 + 1.5x5 − 5.5x6

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +18x4 +15x5 −93x6 −29x1

x3 = +8x4 +1.5x5 −5.5x6 −2x1

x2 = −2x4 −0.5x5 +2.5x6 +x1

x7 = 1 −x1

x4 ≤ 0

on substitue x4 = −0.25x5 + 1.75x6 + 0.5x1− 0.5x2

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +14.5x3 −98x4 −6.75x5 −13.25x6

x1 = −0.5x3 +4x4 +0.75x5 −2.75x6

x2 = −0.5x3 +2x4 +0.25x5 −0.25x6

x7 = 1 +0.5x3 −4x4 −0.75x5 +2.75x6

x3 ≤ 0x3 ≤ 0

on substitue x3 = −2x1 + 8x4 + 1.5x5 − 5.5x6

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +18x4 +15x5 −93x6 −29x1

x3 = +8x4 +1.5x5 −5.5x6 −2x1

x2 = −2x4 −0.5x5 +2.5x6 +x1

x7 = 1 −x1

x4 ≤ 0

on substitue x4 = −0.25x5 + 1.75x6 + 0.5x1− 0.5x2

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +14.5x3 −98x4 −6.75x5 −13.25x6

x1 = −0.5x3 +4x4 +0.75x5 −2.75x6

x2 = −0.5x3 +2x4 +0.25x5 −0.25x6

x7 = 1 +0.5x3 −4x4 −0.75x5 +2.75x6

x3 ≤ 0x3 ≤ 0

on substitue x3 = −2x1 + 8x4 + 1.5x5 − 5.5x6

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +18x4 +15x5 −93x6 −29x1

x3 = +8x4 +1.5x5 −5.5x6 −2x1

x2 = −2x4 −0.5x5 +2.5x6 +x1

x7 = 1 −x1

x4 ≤ 0

on substitue x4 = −0.25x5 + 1.75x6 + 0.5x1− 0.5x2

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +14.5x3 −98x4 −6.75x5 −13.25x6

x1 = −0.5x3 +4x4 +0.75x5 −2.75x6

x2 = −0.5x3 +2x4 +0.25x5 −0.25x6

x7 = 1 +0.5x3 −4x4 −0.75x5 +2.75x6

x3 ≤ 0x3 ≤ 0

on substitue x3 = −2x1 + 8x4 + 1.5x5 − 5.5x6

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +18x4 +15x5 −93x6 −29x1

x3 = +8x4 +1.5x5 −5.5x6 −2x1

x2 = −2x4 −0.5x5 +2.5x6 +x1

x7 = 1 −x1

x4 ≤ 0

on substitue x4 = −0.25x5 + 1.75x6 + 0.5x1− 0.5x2

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +14.5x3 −98x4 −6.75x5 −13.25x6

x1 = −0.5x3 +4x4 +0.75x5 −2.75x6

x2 = −0.5x3 +2x4 +0.25x5 −0.25x6

x7 = 1 +0.5x3 −4x4 −0.75x5 +2.75x6

x3 ≤ 0x3 ≤ 0

on substitue x3 = −2x1 + 8x4 + 1.5x5 − 5.5x6

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +18x4 +15x5 −93x6 −29x1

x3 = +8x4 +1.5x5 −5.5x6 −2x1

x2 = −2x4 −0.5x5 +2.5x6 +x1

x7 = 1 −x1

x4 ≤ 0

on substitue x4 = −0.25x5 + 1.75x6 + 0.5x1− 0.5x2

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +14.5x3 −98x4 −6.75x5 −13.25x6

x1 = −0.5x3 +4x4 +0.75x5 −2.75x6

x2 = −0.5x3 +2x4 +0.25x5 −0.25x6

x7 = 1 +0.5x3 −4x4 −0.75x5 +2.75x6

x3 ≤ 0x3 ≤ 0

on substitue x3 = −2x1 + 8x4 + 1.5x5 − 5.5x6

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +18x4 +15x5 −93x6 −29x1

x3 = +8x4 +1.5x5 −5.5x6 −2x1

x2 = −2x4 −0.5x5 +2.5x6 +x1

x7 = 1 −x1

x4 ≤ 0

on substitue x4 = −0.25x5 + 1.75x6 + 0.5x1− 0.5x2

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +10.5x5 −70.5x6 −20x1 −9x2

x3 = −0.5x5 +4.5x6 +2x1 −4x2

x4 = −0.25x5 +1.75x6 +0.5x1 −0.5x2

x7 = 1 −x1

x5 ≤ 0x5 ≤ 0

on substitue x5 = 9x6 + 4x1 − 8x2 − 2x3

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +24x6 +22x1 −93x2 −21x3

x5 = +9x6 +4x1 −8x2 −2x3

x4 = −x6 −0.5x1 +1.5x2 +0.5x3

x7 = 1 −x1

x6 ≤ 0

on substitue x6 = −0.5x1 + 1.5x2 + 0.5x3 − x4

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +10.5x5 −70.5x6 −20x1 −9x2

x3 = −0.5x5 +4.5x6 +2x1 −4x2

x4 = −0.25x5 +1.75x6 +0.5x1 −0.5x2

x7 = 1 −x1

x5 ≤ 0x5 ≤ 0

on substitue x5 = 9x6 + 4x1 − 8x2 − 2x3

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +24x6 +22x1 −93x2 −21x3

x5 = +9x6 +4x1 −8x2 −2x3

x4 = −x6 −0.5x1 +1.5x2 +0.5x3

x7 = 1 −x1

x6 ≤ 0

on substitue x6 = −0.5x1 + 1.5x2 + 0.5x3 − x4

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +10.5x5 −70.5x6 −20x1 −9x2

x3 = −0.5x5 +4.5x6 +2x1 −4x2

x4 = −0.25x5 +1.75x6 +0.5x1 −0.5x2

x7 = 1 −x1

x5 ≤ 0x5 ≤ 0

on substitue x5 = 9x6 + 4x1 − 8x2 − 2x3

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +24x6 +22x1 −93x2 −21x3

x5 = +9x6 +4x1 −8x2 −2x3

x4 = −x6 −0.5x1 +1.5x2 +0.5x3

x7 = 1 −x1

x6 ≤ 0

on substitue x6 = −0.5x1 + 1.5x2 + 0.5x3 − x4

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +10.5x5 −70.5x6 −20x1 −9x2

x3 = −0.5x5 +4.5x6 +2x1 −4x2

x4 = −0.25x5 +1.75x6 +0.5x1 −0.5x2

x7 = 1 −x1

x5 ≤ 0x5 ≤ 0

on substitue x5 = 9x6 + 4x1 − 8x2 − 2x3

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +24x6 +22x1 −93x2 −21x3

x5 = +9x6 +4x1 −8x2 −2x3

x4 = −x6 −0.5x1 +1.5x2 +0.5x3

x7 = 1 −x1

x6 ≤ 0

on substitue x6 = −0.5x1 + 1.5x2 + 0.5x3 − x4

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +10.5x5 −70.5x6 −20x1 −9x2

x3 = −0.5x5 +4.5x6 +2x1 −4x2

x4 = −0.25x5 +1.75x6 +0.5x1 −0.5x2

x7 = 1 −x1

x5 ≤ 0x5 ≤ 0

on substitue x5 = 9x6 + 4x1 − 8x2 − 2x3

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +24x6 +22x1 −93x2 −21x3

x5 = +9x6 +4x1 −8x2 −2x3

x4 = −x6 −0.5x1 +1.5x2 +0.5x3

x7 = 1 −x1

x6 ≤ 0

on substitue x6 = −0.5x1 + 1.5x2 + 0.5x3 − x4

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +10.5x5 −70.5x6 −20x1 −9x2

x3 = −0.5x5 +4.5x6 +2x1 −4x2

x4 = −0.25x5 +1.75x6 +0.5x1 −0.5x2

x7 = 1 −x1

x5 ≤ 0x5 ≤ 0

on substitue x5 = 9x6 + 4x1 − 8x2 − 2x3

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +24x6 +22x1 −93x2 −21x3

x5 = +9x6 +4x1 −8x2 −2x3

x4 = −x6 −0.5x1 +1.5x2 +0.5x3

x7 = 1 −x1

x6 ≤ 0

on substitue x6 = −0.5x1 + 1.5x2 + 0.5x3 − x4

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +10x1 −57x2 −9x3 −24x4

x5 = −0.5x1 +5.5x2 +2.5x3 −9x4

x6 = −0.5x1 +1.5x2 +0.5x3 −x4

x7 = 1 −x1

x1 ≤ 0x1 ≤ 0x1 ≤ 1

on entre dans une boucle ! 1er dictionnaire

lp_solve boucle aussi sur ce programme, mais trouve la solutionquand on échange les lignes x5 et x6 au départ :

max: 10 x1 - 57 x2 - 9 x3 - 24 x4;x6 = - 0.5 x1 + 1.5 x2 + 0.5 x3 - x4;x5 = - 0.5 x1 + 5.5 x2 + 2.5 x3 - 9 x4;x7 = 1 - x1 ;

on trouve :z(max)=1, x1=1, x2=0, x3=1, x4=0, x5=2, x6=0, x7=0

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +10x1 −57x2 −9x3 −24x4

x5 = −0.5x1 +5.5x2 +2.5x3 −9x4

x6 = −0.5x1 +1.5x2 +0.5x3 −x4

x7 = 1 −x1

x1 ≤ 0x1 ≤ 0x1 ≤ 1

on entre dans une boucle ! 1er dictionnaire

lp_solve boucle aussi sur ce programme, mais trouve la solutionquand on échange les lignes x5 et x6 au départ :

max: 10 x1 - 57 x2 - 9 x3 - 24 x4;x6 = - 0.5 x1 + 1.5 x2 + 0.5 x3 - x4;x5 = - 0.5 x1 + 5.5 x2 + 2.5 x3 - 9 x4;x7 = 1 - x1 ;

on trouve :z(max)=1, x1=1, x2=0, x3=1, x4=0, x5=2, x6=0, x7=0

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +10x1 −57x2 −9x3 −24x4

x5 = −0.5x1 +5.5x2 +2.5x3 −9x4

x6 = −0.5x1 +1.5x2 +0.5x3 −x4

x7 = 1 −x1

x1 ≤ 0x1 ≤ 0x1 ≤ 1

on entre dans une boucle ! 1er dictionnaire

lp_solve boucle aussi sur ce programme, mais trouve la solutionquand on échange les lignes x5 et x6 au départ :

max: 10 x1 - 57 x2 - 9 x3 - 24 x4;x6 = - 0.5 x1 + 1.5 x2 + 0.5 x3 - x4;x5 = - 0.5 x1 + 5.5 x2 + 2.5 x3 - 9 x4;x7 = 1 - x1 ;

on trouve :z(max)=1, x1=1, x2=0, x3=1, x4=0, x5=2, x6=0, x7=0

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

Exercice 5.2

z(max) = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 1

z(max) = +10x1 −57x2 −9x3 −24x4

x5 = −0.5x1 +5.5x2 +2.5x3 −9x4

x6 = −0.5x1 +1.5x2 +0.5x3 −x4

x7 = 1 −x1

x1 ≤ 0x1 ≤ 0x1 ≤ 1

on entre dans une boucle ! 1er dictionnaire

lp_solve boucle aussi sur ce programme, mais trouve la solutionquand on échange les lignes x5 et x6 au départ :

max: 10 x1 - 57 x2 - 9 x3 - 24 x4;x6 = - 0.5 x1 + 1.5 x2 + 0.5 x3 - x4;x5 = - 0.5 x1 + 5.5 x2 + 2.5 x3 - 9 x4;x7 = 1 - x1 ;

on trouve :z(max)=1, x1=1, x2=0, x3=1, x4=0, x5=2, x6=0, x7=0

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

(*) Exercice 5.4

z(max) = +400m1 +600m2 +800m3 +1000m4

x1 = 6000 −8m1 −10m2 −12m3 −15m4

x2 = 1500 −2m1 −2m2 −4m3 −5m4

x3 = 450 −m1 −m2 −m3 −m4

x4 = 300 −m3 −m4

m4 ≤ 400m4 ≤ 300m4 ≤ 450m4 ≤ 300

on substitue m4 = 300− 0.4m1 − 0.4m2 − 0.8m3 − 0.2x2

z(max) 300000 +200m2 −200x2

x1 = 1500 −2m1 −4m2 +3x2

m4 = 300 −0.4m1 −0.4m2 −0.8m3 −0.2x2

x3 = 150 −0.6m1 −0.6m2 −0.2m3 +0.2x2

x4 = +0.4m1 +0.4m2 −0.2m3 +0.2x2

m2 ≤ 375m2 ≤ 750m2 ≤ 250

on substitue m2 = 250−m1 − 13 m3 + 1

3 x2 − 53 x3

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

(*) Exercice 5.4

z(max) = +400m1 +600m2 +800m3 +1000m4

x1 = 6000 −8m1 −10m2 −12m3 −15m4

x2 = 1500 −2m1 −2m2 −4m3 −5m4

x3 = 450 −m1 −m2 −m3 −m4

x4 = 300 −m3 −m4

m4 ≤ 400m4 ≤ 300m4 ≤ 450m4 ≤ 300

on substitue m4 = 300− 0.4m1 − 0.4m2 − 0.8m3 − 0.2x2

z(max) 300000 +200m2 −200x2

x1 = 1500 −2m1 −4m2 +3x2

m4 = 300 −0.4m1 −0.4m2 −0.8m3 −0.2x2

x3 = 150 −0.6m1 −0.6m2 −0.2m3 +0.2x2

x4 = +0.4m1 +0.4m2 −0.2m3 +0.2x2

m2 ≤ 375m2 ≤ 750m2 ≤ 250

on substitue m2 = 250−m1 − 13 m3 + 1

3 x2 − 53 x3

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

(*) Exercice 5.4

z(max) = +400m1 +600m2 +800m3 +1000m4

x1 = 6000 −8m1 −10m2 −12m3 −15m4

x2 = 1500 −2m1 −2m2 −4m3 −5m4

x3 = 450 −m1 −m2 −m3 −m4

x4 = 300 −m3 −m4

m4 ≤ 400m4 ≤ 300m4 ≤ 450m4 ≤ 300

on substitue m4 = 300− 0.4m1 − 0.4m2 − 0.8m3 − 0.2x2

z(max) 300000 +200m2 −200x2

x1 = 1500 −2m1 −4m2 +3x2

m4 = 300 −0.4m1 −0.4m2 −0.8m3 −0.2x2

x3 = 150 −0.6m1 −0.6m2 −0.2m3 +0.2x2

x4 = +0.4m1 +0.4m2 −0.2m3 +0.2x2

m2 ≤ 375m2 ≤ 750m2 ≤ 250

on substitue m2 = 250−m1 − 13 m3 + 1

3 x2 − 53 x3

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

(*) Exercice 5.4

z(max) = +400m1 +600m2 +800m3 +1000m4

x1 = 6000 −8m1 −10m2 −12m3 −15m4

x2 = 1500 −2m1 −2m2 −4m3 −5m4

x3 = 450 −m1 −m2 −m3 −m4

x4 = 300 −m3 −m4

m4 ≤ 400m4 ≤ 300m4 ≤ 450m4 ≤ 300

on substitue m4 = 300− 0.4m1 − 0.4m2 − 0.8m3 − 0.2x2

z(max) 300000 +200m2 −200x2

x1 = 1500 −2m1 −4m2 +3x2

m4 = 300 −0.4m1 −0.4m2 −0.8m3 −0.2x2

x3 = 150 −0.6m1 −0.6m2 −0.2m3 +0.2x2

x4 = +0.4m1 +0.4m2 −0.2m3 +0.2x2

m2 ≤ 375m2 ≤ 750m2 ≤ 250

on substitue m2 = 250−m1 − 13 m3 + 1

3 x2 − 53 x3

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

(*) Exercice 5.4

z(max) = +400m1 +600m2 +800m3 +1000m4

x1 = 6000 −8m1 −10m2 −12m3 −15m4

x2 = 1500 −2m1 −2m2 −4m3 −5m4

x3 = 450 −m1 −m2 −m3 −m4

x4 = 300 −m3 −m4

m4 ≤ 400m4 ≤ 300m4 ≤ 450m4 ≤ 300

on substitue m4 = 300− 0.4m1 − 0.4m2 − 0.8m3 − 0.2x2

z(max) 300000 +200m2 −200x2

x1 = 1500 −2m1 −4m2 +3x2

m4 = 300 −0.4m1 −0.4m2 −0.8m3 −0.2x2

x3 = 150 −0.6m1 −0.6m2 −0.2m3 +0.2x2

x4 = +0.4m1 +0.4m2 −0.2m3 +0.2x2

m2 ≤ 375m2 ≤ 750m2 ≤ 250

on substitue m2 = 250−m1 − 13 m3 + 1

3 x2 − 53 x3

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

(*) Exercice 5.4

z(max) = +400m1 +600m2 +800m3 +1000m4

x1 = 6000 −8m1 −10m2 −12m3 −15m4

x2 = 1500 −2m1 −2m2 −4m3 −5m4

x3 = 450 −m1 −m2 −m3 −m4

x4 = 300 −m3 −m4

m4 ≤ 400m4 ≤ 300m4 ≤ 450m4 ≤ 300

on substitue m4 = 300− 0.4m1 − 0.4m2 − 0.8m3 − 0.2x2

z(max) 300000 +200m2 −200x2

x1 = 1500 −2m1 −4m2 +3x2

m4 = 300 −0.4m1 −0.4m2 −0.8m3 −0.2x2

x3 = 150 −0.6m1 −0.6m2 −0.2m3 +0.2x2

x4 = +0.4m1 +0.4m2 −0.2m3 +0.2x2

m2 ≤ 375m2 ≤ 750m2 ≤ 250

on substitue m2 = 250−m1 − 13 m3 + 1

3 x2 − 53 x3

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

(*) Exercice 5.4

z(max) = 350000 −200m1 − 10003 x3 − 200

3 m3 − 4003 x2

x1 = 500 +2m1 + 203 x3 + 5

3 x2

m4 = 200 + 23 x3 − 2

3 m3 − 13 x2

m2 = 250 −m1 − 53 x3 − 1

3 m3 + 13 x2

x4 = 100 − 23 x3 − 1

3 m3 + 13 x2

solution optimale : z(max) = 350000x1 = 500, x2 = 0, x3 = 0, x4 = 100

m1 = 0, m2 = 250, m3 = 0, m4 = 200

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 5 Cas particuliers de l’algorithme du Simplexe

(*) Exercice 5.4

z(max) = 350000 −200m1 − 10003 x3 − 200

3 m3 − 4003 x2

x1 = 500 +2m1 + 203 x3 + 5

3 x2

m4 = 200 + 23 x3 − 2

3 m3 − 13 x2

m2 = 250 −m1 − 53 x3 − 1

3 m3 + 13 x2

x4 = 100 − 23 x3 − 1

3 m3 + 13 x2

solution optimale : z(max) = 350000x1 = 500, x2 = 0, x3 = 0, x4 = 100

m1 = 0, m2 = 250, m3 = 0, m4 = 200

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 6 Méthode du Simplexe

Exercice 6.2Problème 3. (*)

introduction des variables d’écarts

8<:max: x1 + x2

e1 = −4− x1 + 4x2

e2 = 6− x1 − x2

phase 1

8><>:min: 4 + x1 − 4x2 + e1

a1 = 4 + x1 −4x2 + e1

e2 = 6− x1 − x2

8<:min: a1

x2 = 1 + 14 x1 + 1

4 e1 − 14 a1

e2 = 5− 54 x1 − 1

4 e1 + 14 a1

phase 28><>:max: 1 + 5

4 x1 + 14 e1

x2 = 1 + 14 x1 + 1

4 e1

e2 = 5 − 54 x1 − 1

4 e1

8<:max: 6− e2

x2 = 2 + 15 e1 − 1

5 e2

x1 = 4− 15 e1 − 4

5 e2

x1

x2

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 6 Méthode du Simplexe

Exercice 6.2Problème 4. (*)

phase 18<:min: ae1 = −1− x1 + 2x2 + ae2 = −1− 2x1 + x2 +a

8<:min: 1 + 2x1 − x2 + e2

e1 = x1 + x2 + e2

a = 1 + 2x1 −x2 + e2

8<:min: ae1 = 1 + 3x1 + 2e2 − ax2 = 1 + 2x1 + e2 − a

phase 28><>:max: 1 +3x1 + e2

e1 = 1 + 3x1 + 2e2

x2 = 1 + 2x1 + e2

=⇒ problème non borné

x1

x2

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 6 Méthode du Simplexe

Exercice 6.2Problème 6. (*)

x2

x1

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 10 Résolution de Problème, Interprétation des Résultats

(*) Exercice 10.2

Correction en

salle machines

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 11 Algorithme du Simplexe Révisé

(*) Exercice 11.2

max : CNxN + CBxBs.c. ANxN + ABxB = b

CN =(

3 2 4)

CB =(

0 0 0)

AN =

1 1 22 0 32 1 3

AB =

1 0 00 1 00 0 1

b =

457

= x∗B

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 11 Algorithme du Simplexe Révisé

(*) Exercice 11.2

Itération 1 :

1 yAB = CB ⇐⇒ y

0@ 1 0 00 1 00 0 1

1A =`

0 0 0´

=⇒ y =`

0 0 0´

2 on peut choisir la troisième colonne :quatrième : a =

0@ 233

1A3 ABd = a ⇐⇒

0@ 1 0 00 1 00 0 1

1A d =

0@ 233

1A =⇒ d =

0@ 233

1A

4 x∗B − td ≥ 0 ⇐⇒

0@ 4− 2t5− 3t7− 3t

1A ≥

0@ 000

1A → t ≤ 2

→ t ≤ 53

→ t ≤ 73

5 variable sortante : x5, colonne sortante : deuxième colonne de AB ,variable entrante : x3, colonne entrante : troisième colonne de AN .

Solution : x∗B =

0@ x∗4x∗3x∗6

1A =

0@ 23532

1ACN =

`3 2 0

´CB =

`0 4 0

´AN =

0@ 1 1 02 0 12 1 0

1A AB =

0@ 1 2 00 3 00 3 1

1A

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 11 Algorithme du Simplexe Révisé

(*) Exercice 11.2

Itération 2 :

1 yAB = CB ⇐⇒ y

0@ 1 2 00 3 00 3 1

1A =`

0 4 0´

=⇒ y =`

0 43 0

´

2 on choisit la première colonne : a =

0@ 122

1A3 ABd = a ⇐⇒

0@ 1 2 00 3 00 3 1

1A d =

0@ 122

1A =⇒ d =

0@ − 13

230

1A

4 x∗B − td ≥ 0 ⇐⇒

0@ 23 + 1

3 t53 −

23 t

2

1A ≥

0@ 000

1A → t ≥ −2

→ t ≤ 52

→ t ∈ R5 variable sortante : x3, colonne sortante : deuxième colonne de AB ,

variable entrante : x1, colonne entrante : première colonne de AN .

Solution : x∗B =

0@ x∗4x∗1x∗6

1A =

0@ 32522

1ACN =

`4 2 0

´CB =

`0 3 0

´AN =

0@ 2 1 03 0 13 1 0

1A AB =

0@ 1 1 00 2 00 2 1

1A

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 11 Algorithme du Simplexe Révisé

(*) Exercice 11.2

Itération 3 :

1 yAB = CB ⇐⇒ y

0@ 1 1 00 2 00 2 1

1A =`

0 3 0´

=⇒ y =`

0 32 0

´

2 on choisit la deuxière colonne : a =

0@ 101

1A3 ABd = a ⇐⇒

0@ 1 1 00 2 00 2 1

1A d =

0@ 101

1A =⇒ d =

0@ 101

1A

4 x∗B − td ≥ 0 ⇐⇒

0@ 32 − t

52

2− t

1A ≥

0@ 000

1A → t ≤ 32

→ t ∈ R→ t ≤ 2

5 variable sortante : x4, colonne sortante : première colonne de AB ,variable entrante : x2, colonne entrante : deuxième colonne de AN .

Solution : x∗B =

0@ x∗2x∗1x∗6

1A =

0@ 325212

1ACN =

`4 0 0

´CB =

`2 3 0

´AN =

0@ 2 1 03 0 13 0 0

1A AB =

0@ 1 1 00 2 01 2 1

1A

L3 STIC info/miage Programmation Linéaire (PLRO)

Feuille 11 Algorithme du Simplexe Révisé

(*) Exercice 11.2

Itération 4 :

1 yAB = CB ⇐⇒ y

1 1 00 2 01 2 1

=(

2 3 0)

=⇒ y =(2 1

2 0)

2 aucune colonne entrante donc solution optimale.

z = CNx∗N + CBx∗B = CBx∗B =(

2 3 0) 3

25212

= 212

L3 STIC info/miage Programmation Linéaire (PLRO)