Вы находитесь на странице: 1из 6

Département E.E.

A – Filière Automatique
4ème année Automatique – Semestre 2
TRAVAUX PRATIQUE – Optimisation et Recherche Opérationnel

TP 3
Méthode de Relaxation
Réalisé par

Leulmi Mohammed Islam


E-mail : islamfcb.enpc@gmail.com

Encadré par

Pr. Samir Ladaci

Année universitaire 2018/2019


1. Analyse du problème :

Étant donné la fonction quadratique :


1
J(x) = < Ax , x > − < b , x > + c
2
Avec 𝐴 ∈ 𝑀𝑛 (ℝ) matrice symétrique et définie positive, 𝑏 ∈ ℝ𝑛
𝑐 ∈ ℝ (donc c’est une forme quadratique associée à une matrice
SDP).
Dans le cas ou J est une fonction quadratique L’algorithme de
la méthode de relaxation n’est autre que l’algorithme de Gauss-
Seidel (vu en classes préparatoires) pour la résolution
numérique du système linéaire :
𝐴𝑥 = 𝑏
Ceci s’explique par le fait que le point de minimum u∗ de J
satisfait l’équation d’Euler
𝛻𝐽(𝑢 ∗) = 0
Alors l’algorithme dans ce cas s’écrit :

Étant donné 𝐴 ∈ 𝑀𝑛 (ℝ) matrice symétrique et définie positive,


𝑏 ∈ ℝ𝑛 , 𝑐 ∈ ℝ , On veut réaliser un programme permettant de
retvrouver u* qui minimise J.
2. L’organigramme de l’algorithme :
3. Programme écrit :

clear all;close all;clc

% Entrée des données ________________________________________

A=input('Entrez la matrice A symétrique et définie


positive\n');
b=input('Entrez le vecteur colonne b\n');
c=input('Entrez le scalaire c\n');
x0=input('entrez le vecteur colonne initial\n');
epsilon=input('Entrez epsilon\n');
itmax=input('Entrez le nobmre d''iteration maximal\n');

% Calcul des itérations _____________________________________

x(:,1)=x0;
[n,m]=size(A); %Calcule taille de A
j=1; %intialisation de j
while norm(A*x(:,j)-b)>epsilon && j<itmax % Test d'arret
%calcule de premier element de vecteur x de l'itération
numero j
x(1,j+1)=(1/A(1,1))*(b(1)-sum(A(1,2:m)*x(2:m,j)));
%calcule de reste des éléments de vecteur x de
l'itération numero j
for i=2:n
x(i,j+1)=(1/A(i,i))*(b(i)-sum(A(i,i+1:m)*x(i+1:m,j))-
sum(A(i,1:i-1)*x(1:i-1,j+1)));
end
j=j+1;%incrémentation de j (nbr d'itérations)
end

%Affichage des resultats ____________________________________

disp('---------------------------------------------');
disp(' Le vecteur u* qui minimise la fontion J est');
u=x(:,j)
disp('La valeur de minimum de la fonction J est');
min=0.5*dot(A*u,u)-dot(b,u)+c
disp('---------------------------------------------');
4. Exemples d’exécution :

Exemple 1 :

2 1 1 0
𝐴=[ ] 𝑏=[ ] 𝑐=3 𝑢(0) = [ ] ℰ = 10−6
1 2 2 0
Exemple 2 :

4 −1 −1 3 0
𝐴 = [−2 6 1] 𝑏=[ 9 ] 𝑐=1 𝑢(0) = [0] ℰ = 10−6
−1 1 7 −6 0

Вам также может понравиться

  • DTU 31.1 P1 - Charpente Bois
    DTU 31.1 P1 - Charpente Bois
    Документ24 страницы
    DTU 31.1 P1 - Charpente Bois
    Dinh Anh Quan
    100% (6)
  • Des Problèmes Sans Nombres
    Des Problèmes Sans Nombres
    Документ22 страницы
    Des Problèmes Sans Nombres
    Jean-Philippe Solanet-Moulin
    100% (9)
  • TP4 Opt Leulmi
    TP4 Opt Leulmi
    Документ6 страниц
    TP4 Opt Leulmi
    Med ISslam Leulmi
    Оценок пока нет
  • TP2 Opt Leulmi
    TP2 Opt Leulmi
    Документ6 страниц
    TP2 Opt Leulmi
    Med ISslam Leulmi
    Оценок пока нет
  • Série D'exercices N0 2 Analyse Numérique 1 Résolution Numérique Des Équations Non Linéaires Et Scripts Matlab Oct 2019
    Série D'exercices N0 2 Analyse Numérique 1 Résolution Numérique Des Équations Non Linéaires Et Scripts Matlab Oct 2019
    Документ13 страниц
    Série D'exercices N0 2 Analyse Numérique 1 Résolution Numérique Des Équations Non Linéaires Et Scripts Matlab Oct 2019
    Marwa aboura
    Оценок пока нет
  • Chapitre1 Méthodes Numériques Et Programmation
    Chapitre1 Méthodes Numériques Et Programmation
    Документ8 страниц
    Chapitre1 Méthodes Numériques Et Programmation
    Taki Eddine
    Оценок пока нет
  • Integration Numérique Avec Matlab
    Integration Numérique Avec Matlab
    Документ13 страниц
    Integration Numérique Avec Matlab
    wassimbeaissa
    50% (2)
  • Enonces tp9
    Enonces tp9
    Документ4 страницы
    Enonces tp9
    Aaissa Aaiss
    Оценок пока нет
  • Codeelimination de Gauss
    Codeelimination de Gauss
    Документ2 страницы
    Codeelimination de Gauss
    Ferdaousse Bounail
    Оценок пока нет
  • 2015 10 15 tp2
    2015 10 15 tp2
    Документ8 страниц
    2015 10 15 tp2
    Fatma Belabed
    Оценок пока нет
  • TP MATLAB MATH 2LMD Math
    TP MATLAB MATH 2LMD Math
    Документ6 страниц
    TP MATLAB MATH 2LMD Math
    rose
    Оценок пока нет
  • TP MATLAB MATH 2LMD MathQuelquesSolutions
    TP MATLAB MATH 2LMD MathQuelquesSolutions
    Документ9 страниц
    TP MATLAB MATH 2LMD MathQuelquesSolutions
    Amal Hentati
    Оценок пока нет
  • MAtlab
    MAtlab
    Документ8 страниц
    MAtlab
    screwyoureg
    Оценок пока нет
  • Signaux Matlab2
    Signaux Matlab2
    Документ79 страниц
    Signaux Matlab2
    Ayoub Amri
    Оценок пока нет
  • TP
    TP
    Документ8 страниц
    TP
    Salah Mohammed
    Оценок пока нет
  • Algorithmes Doptimisation Corrigé
    Algorithmes Doptimisation Corrigé
    Документ8 страниц
    Algorithmes Doptimisation Corrigé
    Mohammed Hachemi
    Оценок пока нет
  • Rapport
    Rapport
    Документ13 страниц
    Rapport
    Khaled Saheb
    Оценок пока нет
  • Matlab - TP9 - Résolution Système Linéaire
    Matlab - TP9 - Résolution Système Linéaire
    Документ7 страниц
    Matlab - TP9 - Résolution Système Linéaire
    OUMAIMA BAHAFID
    Оценок пока нет
  • Cours Memo
    Cours Memo
    Документ12 страниц
    Cours Memo
    Alexandre Seriy
    Оценок пока нет
  • 141
    141
    Документ9 страниц
    141
    Mohamed Bouchnafa
    Оценок пока нет
  • Algorithme de Simplexe
    Algorithme de Simplexe
    Документ3 страницы
    Algorithme de Simplexe
    Ghita BENCHEIKH
    Оценок пока нет
  • TP Diagraphie en Milieux Poreux
    TP Diagraphie en Milieux Poreux
    Документ11 страниц
    TP Diagraphie en Milieux Poreux
    Mohamed Oussama
    Оценок пока нет
  • TP 3
    TP 3
    Документ6 страниц
    TP 3
    Khaled Benyoucef
    Оценок пока нет
  • TP Optimisation
    TP Optimisation
    Документ4 страницы
    TP Optimisation
    Samir Sayah
    Оценок пока нет
  • MEF Exposé 3
    MEF Exposé 3
    Документ21 страница
    MEF Exposé 3
    TOVIHO Sessinou
    Оценок пока нет
  • Algo Avancée (Notes de Hamrouni)
    Algo Avancée (Notes de Hamrouni)
    Документ140 страниц
    Algo Avancée (Notes de Hamrouni)
    AhmedMehdi
    100% (1)
  • Equation Diffusion Reaction
    Equation Diffusion Reaction
    Документ7 страниц
    Equation Diffusion Reaction
    Hassan Zmour
    Оценок пока нет
  • An1 tp1
    An1 tp1
    Документ3 страницы
    An1 tp1
    Manal Chehbi
    Оценок пока нет
  • mn03 1
    mn03 1
    Документ15 страниц
    mn03 1
    Amir Na Dz
    Оценок пока нет
  • TP2
    TP2
    Документ3 страницы
    TP2
    Fares69
    Оценок пока нет
  • Erreurs Pointfixe
    Erreurs Pointfixe
    Документ4 страницы
    Erreurs Pointfixe
    Fatma Belabed
    Оценок пока нет
  • Anneduxieme
    Anneduxieme
    Документ13 страниц
    Anneduxieme
    Ammar Bougueffa
    Оценок пока нет
  • TP2 GC
    TP2 GC
    Документ2 страницы
    TP2 GC
    Lï Nà
    Оценок пока нет
  • TP Méthode Numérique
    TP Méthode Numérique
    Документ19 страниц
    TP Méthode Numérique
    Sarah Hadjadj
    67% (3)
  • MP Maths CCP 1 2006.extrait
    MP Maths CCP 1 2006.extrait
    Документ4 страницы
    MP Maths CCP 1 2006.extrait
    Issam Barmaki
    Оценок пока нет
  • Mon Projet D'analyse Numerique
    Mon Projet D'analyse Numerique
    Документ16 страниц
    Mon Projet D'analyse Numerique
    lyna karoun
    Оценок пока нет
  • Réalisé Par: MOHAMMED BABI (Groupe:1) : Compte Rendue TP Analyse Numerique
    Réalisé Par: MOHAMMED BABI (Groupe:1) : Compte Rendue TP Analyse Numerique
    Документ9 страниц
    Réalisé Par: MOHAMMED BABI (Groupe:1) : Compte Rendue TP Analyse Numerique
    Moustafa Fanè
    Оценок пока нет
  • CC1 19-20 + Corr
    CC1 19-20 + Corr
    Документ3 страницы
    CC1 19-20 + Corr
    Cecilia Chiad
    Оценок пока нет
  • TP N°1 Interpolation Solution
    TP N°1 Interpolation Solution
    Документ5 страниц
    TP N°1 Interpolation Solution
    OMAR AZOUGAGH
    Оценок пока нет
  • Demomatlab
    Demomatlab
    Документ8 страниц
    Demomatlab
    Abdelmoudjib Benkada
    Оценок пока нет
  • Exercice 1 Math
    Exercice 1 Math
    Документ2 страницы
    Exercice 1 Math
    cours fsjes
    Оценок пока нет
  • Poly TD C C
    Poly TD C C
    Документ39 страниц
    Poly TD C C
    Oliver Twiste
    Оценок пока нет
  • tp2 - Résolutions Des Systèmes Linéaires
    tp2 - Résolutions Des Systèmes Linéaires
    Документ5 страниц
    tp2 - Résolutions Des Systèmes Linéaires
    Strø Mæ
    Оценок пока нет
  • TD2 Ro 11-12
    TD2 Ro 11-12
    Документ4 страницы
    TD2 Ro 11-12
    Sarra Kaiss
    Оценок пока нет
  • TD Matlab M1ase
    TD Matlab M1ase
    Документ7 страниц
    TD Matlab M1ase
    Rani Jus
    Оценок пока нет
  • Correction A 12
    Correction A 12
    Документ17 страниц
    Correction A 12
    Amine Azaoum
    Оценок пока нет
  • TP2 Méthodes Numériques
    TP2 Méthodes Numériques
    Документ2 страницы
    TP2 Méthodes Numériques
    boutheina ghedeir
    Оценок пока нет
  • Programmation Lineaire
    Programmation Lineaire
    Документ10 страниц
    Programmation Lineaire
    LionSage
    100% (1)
  • CHAP 1 - Programmer Avec Matlab
    CHAP 1 - Programmer Avec Matlab
    Документ124 страницы
    CHAP 1 - Programmer Avec Matlab
    Bouz. Tima
    Оценок пока нет
  • TD 1 Complexite
    TD 1 Complexite
    Документ7 страниц
    TD 1 Complexite
    Åýå Ŕîfî
    Оценок пока нет
  • TP1
    TP1
    Документ6 страниц
    TP1
    Redouane Reda
    Оценок пока нет
  • Iterative
    Iterative
    Документ3 страницы
    Iterative
    Fayçal Belkessam
    Оценок пока нет
  • TP3 2018
    TP3 2018
    Документ6 страниц
    TP3 2018
    mcbenmahdi
    Оценок пока нет
  • TP - Moindre Carrés
    TP - Moindre Carrés
    Документ7 страниц
    TP - Moindre Carrés
    Maryam Javadi
    Оценок пока нет
  • Partiel 1718
    Partiel 1718
    Документ2 страницы
    Partiel 1718
    Issam Dridi
    Оценок пока нет
  • Chapitre V
    Chapitre V
    Документ13 страниц
    Chapitre V
    زهرة المدائن
    Оценок пока нет
  • HTML To PDF
    HTML To PDF
    Документ13 страниц
    HTML To PDF
    Merou ndiaye
    Оценок пока нет
  • TP1 - Intromatlab by Me
    TP1 - Intromatlab by Me
    Документ51 страница
    TP1 - Intromatlab by Me
    lodyyy4
    Оценок пока нет
  • TP 1 A Rendre
    TP 1 A Rendre
    Документ6 страниц
    TP 1 A Rendre
    Dia Mouhamadou Naby
    Оценок пока нет
  • Exercices de calcul intégral
    Exercices de calcul intégral
    От Everand
    Exercices de calcul intégral
    Оценок пока нет
  • Exercices de dérivées
    Exercices de dérivées
    От Everand
    Exercices de dérivées
    Оценок пока нет
  • Introduction à l'analyse numérique
    Introduction à l'analyse numérique
    От Everand
    Introduction à l'analyse numérique
    Оценок пока нет
  • Symboles Electriques
    Symboles Electriques
    Документ4 страницы
    Symboles Electriques
    Nizar Fellous
    Оценок пока нет
  • Symboles Electriques
    Symboles Electriques
    Документ4 страницы
    Symboles Electriques
    Nizar Fellous
    Оценок пока нет
  • EDT Doctorat 2021 Automatique Début
    EDT Doctorat 2021 Automatique Début
    Документ1 страница
    EDT Doctorat 2021 Automatique Début
    Med ISslam Leulmi
    Оценок пока нет
  • TP6 Opt Leulmi
    TP6 Opt Leulmi
    Документ7 страниц
    TP6 Opt Leulmi
    Med ISslam Leulmi
    Оценок пока нет
  • TP5 Opt Leulmi
    TP5 Opt Leulmi
    Документ7 страниц
    TP5 Opt Leulmi
    Med ISslam Leulmi
    Оценок пока нет
  • TP1 Opt LEULMI PDF
    TP1 Opt LEULMI PDF
    Документ7 страниц
    TP1 Opt LEULMI PDF
    Med ISslam Leulmi
    Оценок пока нет
  • TP1 Opt LEULMI PDF
    TP1 Opt LEULMI PDF
    Документ7 страниц
    TP1 Opt LEULMI PDF
    Med ISslam Leulmi
    Оценок пока нет
  • Fiches de Synthèse Des Expositions
    Fiches de Synthèse Des Expositions
    Документ117 страниц
    Fiches de Synthèse Des Expositions
    Master Métiers et arts de l'exposition
    Оценок пока нет
  • Chapitre 3
    Chapitre 3
    Документ40 страниц
    Chapitre 3
    othman az
    Оценок пока нет
  • KF 240
    KF 240
    Документ2 страницы
    KF 240
    Romano
    Оценок пока нет
  • FACES John Cassavetes Script
    FACES John Cassavetes Script
    Документ101 страница
    FACES John Cassavetes Script
    Manuel García
    Оценок пока нет
  • Cours de Pharmacie Galénique La Biopharmacie
    Cours de Pharmacie Galénique La Biopharmacie
    Документ14 страниц
    Cours de Pharmacie Galénique La Biopharmacie
    Zineb fella Mahi
    100% (1)
  • Syllabus Sylviculture Et Agroforesterie - UCG - Butembo
    Syllabus Sylviculture Et Agroforesterie - UCG - Butembo
    Документ62 страницы
    Syllabus Sylviculture Et Agroforesterie - UCG - Butembo
    Muyisa Kambale
    100% (7)
  • STEG - PDF Version 1
    STEG - PDF Version 1
    Документ19 страниц
    STEG - PDF Version 1
    barragan150691
    Оценок пока нет
  • 28654b Manuel D'emploi - Fra
    28654b Manuel D'emploi - Fra
    Документ36 страниц
    28654b Manuel D'emploi - Fra
    Pakkeong Marine
    Оценок пока нет
  • Est 1039
    Est 1039
    Документ9 страниц
    Est 1039
    Fella Bakhti
    Оценок пока нет
  • 1 Agent-Socio-éducatif - T
    1 Agent-Socio-éducatif - T
    Документ2 страницы
    1 Agent-Socio-éducatif - T
    Prof Hassan
    Оценок пока нет
  • Sdic PL0277
    Sdic PL0277
    Документ38 страниц
    Sdic PL0277
    Asmae illoussamen
    Оценок пока нет
  • Affiliation 150 A 1000
    Affiliation 150 A 1000
    Документ20 страниц
    Affiliation 150 A 1000
    Rabah Benbellil
    Оценок пока нет
  • Un Lève-Plaque
    Un Lève-Plaque
    Документ8 страниц
    Un Lève-Plaque
    tayeb Fitt
    Оценок пока нет
  • Pilotage Performance
    Pilotage Performance
    Документ31 страница
    Pilotage Performance
    Marc Bolds
    Оценок пока нет
  • TP 3 Thermo
    TP 3 Thermo
    Документ8 страниц
    TP 3 Thermo
    kiko
    Оценок пока нет
  • Pcastuces
    Pcastuces
    Документ92 страницы
    Pcastuces
    Myandriamaholyzi Razakatiana
    Оценок пока нет
  • 28.10 Traitement de La Prononciation en Langue
    28.10 Traitement de La Prononciation en Langue
    Документ25 страниц
    28.10 Traitement de La Prononciation en Langue
    Olga Permyakova
    Оценок пока нет
  • Le Guide de La Maçonnerie - Ciment Calcia
    Le Guide de La Maçonnerie - Ciment Calcia
    Документ112 страниц
    Le Guide de La Maçonnerie - Ciment Calcia
    AEMa CCC
    Оценок пока нет
  • Epreuve E2 Bac Pro SN Juin 2022 Risc Elements de Correction
    Epreuve E2 Bac Pro SN Juin 2022 Risc Elements de Correction
    Документ22 страницы
    Epreuve E2 Bac Pro SN Juin 2022 Risc Elements de Correction
    erwan
    Оценок пока нет
  • 160908
    160908
    Документ2 страницы
    160908
    FAVRE
    Оценок пока нет
  • Connectivisme
    Connectivisme
    Документ4 страницы
    Connectivisme
    Allioui Walid
    Оценок пока нет
  • TD Cristaux Liquides
    TD Cristaux Liquides
    Документ4 страницы
    TD Cristaux Liquides
    Habjia Abdeljalil
    Оценок пока нет
  • Chapitre 4ABC1
    Chapitre 4ABC1
    Документ5 страниц
    Chapitre 4ABC1
    William Yves Yanogo
    Оценок пока нет
  • La Métacognition
    La Métacognition
    Документ14 страниц
    La Métacognition
    amiral pro
    Оценок пока нет
  • COA88 Cle2c4226
    COA88 Cle2c4226
    Документ62 страницы
    COA88 Cle2c4226
    Khamassi Amer
    Оценок пока нет
  • TP 4 - Variateur de Vitesse
    TP 4 - Variateur de Vitesse
    Документ8 страниц
    TP 4 - Variateur de Vitesse
    Layla Agaman
    Оценок пока нет
  • Etude D'un Batiment R+8+S-sol PDF
    Etude D'un Batiment R+8+S-sol PDF
    Документ226 страниц
    Etude D'un Batiment R+8+S-sol PDF
    رسوم متحركة ماشا والدب
    Оценок пока нет