• Aucun résultat trouvé

1 Gradient projet´ e

N/A
N/A
Protected

Academic year: 2022

Partager "1 Gradient projet´ e"

Copied!
6
0
0

Texte intégral

(1)

Optimisation sous contraintes

1 Gradient projet´ e

Soit A une matrice inversible de M N ( R ), et b ∈ R N . On cherche x ∈ R N minimisant :

J (x) = kAx − bk 2 sous les contraintes x i ≥ 0 (1 ≤ i ≤ N).

1. Cacluler ∇J .

2. Montrer que J est elliptique, et que ∇J est lipshitzienne (pr´ eciser les constantes associ´ ees).

3. Expliciter l’algorithme du gradient projet´ e associ´ e au probl` eme de mini- misation consid´ er´ e ici. Pour quelles valeurs du pas τ est-on assur´ e de la convergence ?

4. Ecrire une fonction x=minimise(A,b,τ,r) qui retourne le r´ esultat x de l’algorithme ` a l’it´ eration r.

5. Utiliser la fonction pr´ ec´ edente pour trouver la solution du probl` eme quand : A =

1 2

−1 3

et b = −3

4

6. V´ erifier ` a la main la solution obtenue ` a la question pr´ ec´ edente en appli- quant les relations de Kuhn et Tucker.

2 Gradient projet´ e (bis)

On consid` ere dans R 3 l’ensemble : C =

(x 1 , x 2 , x 3 ) ∈ R 3 , x 2 1 + x 2 2 ≤ 1

1. (a) Quelle est la forme g´ eom´ etrique de C ? Montrer que C est convexe.

(b) Expliciter la projection orthogonale P C sur C.

(c) Ecrire une fonction z=projection(x) qui en entr´ ee prend un vecteur x de R 3 et en sortie renvoie le vecteur z (de mˆ eme taille que que x) projection de x sur C.

2. Soit A une matrice r´ eelle 3 × 3 inversible, et b ∈ R 3 . On consid` ere la fonction J : R 3 → R d´ efinie par J(x) = kAx − bk 2 , et le probl` eme (P) : minimiser J (x) sous la contrainte x ∈ C

(a) Montrer que (P) admet une unique solution.

(2)

(b) Expliciter l’algorithme du gradient projet´ e associ´ e ` a (P). Pour quelles valeurs du pas est-on assur´ e de la convergence ?

(c) Ecrire une fonction x=minimise(A,b,τ,r), faisant appel ` a la fonction projection.

(d) Calculer alors num´ eriquement le minimum de J sur C quand : A =

2 1 0 1 3 1 1 0 2

 et b =

 3 1 3

(e) Trouver, dans ce cas particulier, la valeur empirique ` a 10 −4 pr` es du pas critique τ c au-del` a duquel la convergence ne se produit plus.

3 Uzawa

On consid` ere le probl` eme (P) : min 1

2 hAx, xi − hb, xi

sous la contrainte Cx ≤ d, avec x ∈ R n , d ∈ R p , C une matrice p×n ` a coefficients r´ eels et A une matrice sym´ etrique n × n r´ eelle d´ efinie positive.

Plus pr´ ecis´ ement, on prend n = 6, p = 3, et :

A =

2 −1 0 0 . . . . . .

−1 2 −1 0 . . . . . . 0 −1 2 −1 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . 0 −1 2 −1 . . . . . . . . . 0 −1 2

et b = −

 1 1 . . . . . . 1 1

C =

3 1 0 −1 0 0

−1 2 1 0 0 0

0 0 0 1 −1 1

 et d =

 0 1

0

1. V´ erifier que A est d´ efinie positive. A quel op´ erateur classique pourrait correspondre A ?

2. Ecrire le Lagrangien L associ´ e ` a ce probl` eme.

3. R´ esoudre (P) avec la m´ ethode d’Uzawa (en choisissant judicieusement le pas).

4. V´ erifier la solution obtenue avec les relations de Kuhn et Tucker.

4 Contrainte active

On veut r´ esoudre num´ eriquement le probl` eme de minimiser la fonction :

f (x 1 , x 2 ) = x 2 1 + x 2 2 − 14x 1 − 6x 2 − 7

(3)

sous les contraintes :

x 1 + x 2 ≤ 2 et x 1 + 2x 2 ≤ 3

1. Calculer la diff´ erentielle et la Hessienne de f et des contraintes (v´ erifier vos calculs avec maple).

2. Coder la fonction f , ainsi que les contraintes.

3. R´ esoudre d’abord num´ eriquement le probl` eme d’optimisation sans contrainte, par une m´ ethode de votre choix.

4. Impl´ ementer une m´ ethode de p´ enalisation afin d’obtenir une indication du minimum et des contraintes actives. Quelle est la contrainte qui semble active ?

5. Impl´ ementer la m´ ethode de Newton-Lagrange, qui consiste ` a faire une m´ ethode de Newton sur le syst` eme d’optimalit´ e (extrema li´ es) (on suppose la contrainte active partout).

6. V´ erifier le r´ esultat pr´ ec´ edent en utilisant la m´ ethode d’Uzawa.

5 Rappels sur l’algorithme d’Uzawa

5.1 Ideas from duality

Let V and M two sets, and a L a function :

L : V × M → R (1)

Definition :

A point (u, λ) is said to be a saddle point (point selle) of L if u is a minimizer of L(., λ) : v ∈ V → L(v, λ) ∈ R and if λ is a maximizer of L(u, .) : µ ∈ M → L(u, µ) ∈ R , i.e. if :

sup

µ∈M

L(u, µ) = L(u, λ) = inf

v∈V L(v, λ) (2)

We consider J : V → R and φ i : V → R , 1 ≤ i ≤ m, and

U = {v ∈ V = R N , φ i (v) ≤ 0, 1 ≤ i ≤ m} (3) We consider the problem (primal problem) (P) :

Find u ∈ U such that J (u) = inf

v∈U J (v) (4)

Under some specific conditions, any solution u of (P) is the first argument

of a saddle point (u, λ) of a certain function L called Lagrangian associated to

problem (P). The second argument λ is called generalized Lagrange multiplier

associated to u (since as we will see it is the vector given by the Kuhn and

Tucker relations).

(4)

Let us define the Lagrangien associated to problem (P) as : L : (v, µ) ∈ V × R m + → L(v, µ) = J (v) +

m

X

i=1

µ i φ i (v) (5) Under some hypotheses, a solution u of the primal problem (P) is the first argument of a saddle point of its associated Lagrangien.

Assume that we know one of the second argument λ of the saddle points of L. Then the constrained problem (P) would be replaced by an unconstrained problem (P λ ) : find u λ such that :

u λ ∈ V and L(u λ , λ) = inf

v∈V L(v, λ) (6)

Now the question is how to find such a λ ∈ R m + . Recall the equality verified by saddle points :

L(u λ , λ) = inf

v∈V L(v, λ) = sup

µ∈R

m+

v∈V inf L(v, µ) (7) We are therefore led to find λ as a solution of the dual problem (Q) :

Find λ ∈ R m + such that G(λ) = sup

µ∈R

m+

G(µ) (8)

where G : R m + → R is defined by :

G : µ ∈ R m + → G(µ) = inf

v∈V L(v, µ) (9)

µ ∈ R m + is called the dual variable of the primal variable v ∈ V = R N .

Notice that the dual problem (Q) is also a constrained problem, but the constraints µ i ≥ 0 are very easy to handle (since we know explicitely the pro- jection operator). On the contrary, the constraints φ i (u) ≤ 0 are in general impossible to handle numerically. This is the basic idea of Uzawa algorithm.

5.2 Uzawa algorithm

The idea of the method is that the projection operator P + : R m → R m + in the dual problem (Q) is very simple :

(P + λ) i = max(λ i , 0) (10)

Uzawa algorithm is in fact the projected gradient method applied to the dual problem (Q) : λ 0 ∈ R m + arbitrary, and the sequence λ k in R m + is defined by :

λ k+1 = P +k − ρ∇G(λ k )) (11)

Since in the dual problem (Q), one is interested in a maximum (and not a

minimum), it is therefore natural to change the sign of the parameter ρ with

respect to the classical method.

(5)

Under some hypotheses, it is possible to compute the gradient of G : (∇G(µ)) i = φ i (u µ ) , 1 ≤ i ≤ m (12) the vector u µ being the solution of the unconstrained minimization problem :

u µ ∈ V, J (u µ ) +

m

X

i=1

µ i φ i (u µ ) = inf

v∈V

( J (v) +

m

X

i=1

µ i φ i (v) )

(13)

Uzawa algorithm : λ 0 ∈ R m + arbitrary. We define by induction (λ k , u k ) ∈ R m + × V by (for the sake of clarity, we write u k = u λ

k

) :

Computation of u k : J (u k ) + P m

i=1 λ k i φ i (u k ) = inf v∈V

J (v) + P m

i=1 λ k i φ i (v) Computation of λ k+1 i : λ k+1 i = max

λ k i + ρφ i (u k ), 0

(14) Uzawa method is a way to replace a constrained minimization problem by a sequence of unconstrained minimization problem.

Notice that u k can converge while λ k does not.

Convergence of Uzawa method

V = R N . J elliptic (with contant α), and :

U = {v ∈ R N , Cv ≤ d}, C ∈ A m,N ( R ), d ∈ R m (15) is non empty. Then, if

0 < ρ < 2α

kCk 2 (16)

the sequence u k converges to the unique solution of the primal problem (P).

If the rank of C is m, then the sequence λ k also converges towards the unique solution of the dual problem (Q).

Notice that kCk = sup v∈ R

N

kCvk

m

kvk

n

. Case of a quadratic functional :

J(v) = 1

2 hAv, vi − hb, vi (17) with A symmetric definite positive matrix of size N 2 , and b ∈ R N .

U =

v ∈ R N ,

N

X

j=1

c i,j v j ≤ d i , 1 ≤ i ≤ m

=

v ∈ R N , Cv ≤ d (18)

where C is a real m × N matrix, and d ∈ R m . We assume U non empty (and thus the constraints are qualified).

An iteration of Uzawa algorithm is :

(6)

Computation of u k : Au k − b + C T λ k = 0

Computation of λ k+1 i : λ k+1 i = max{(λ k + ρ(Cu k − d)) i , 0} (19) And the method converges if

0 < ρ < 2λ 1 (A)

kCk 2 (20)

where λ 1 (A) is the smallest eigenvalue of A (it is the ellipticity constant).

Références

Documents relatifs

Ecrire le processus it´ eratif de Newton pour cette ´ equation.. quel est dans ce cas l’ordre de convergence de la

On peut alors choisir comme matrice de pr´econditionnement une matrice L voisine de B T en effectuant ce que l’on appelle une d´ecomposition de Cholesky incompl`ete qui consiste `a

Le syst` eme admet un d´ eterminant diff´ erent de 0 (il vaut − 34), il admet donc une unique solution qui est la solution nulle (et on n’a pas besoin des formules de Cramer

En analyse num´ erique, la m´ ethode de Romberg est une m´ ethode r´ ecursive de calcul num´ erique d’int´ egrale, bas´ ee sur l’application du proc´ ed´ e d’extrapolation

Par souci de simplicit´ e, on autorisera l’emploi abusif de la notation ∇ ◦n , comme dans l’expression tan ◦2 , qui d´ esignera l’application qui ` a tout r´ eel x tel

Par imparit´ e de la fonction N ρ , on montre par une r´ ecurrence imm´ ediate que les suites de Newton de termes initiaux oppos´ es sont oppos´ ees... Cette suite est n´

Dans le contexte d’enquˆ ete sur la pˆ eche sportive, la s´ election par la m´ ethode du cube semble ˆ etre une excellente alternative d’´ echantillonnage... R´

PAR M.. coefficient d'une différence d'ordre quelconque sera, pour la circonstance indiquée, le même que dans la formule de Newton. Pour abréger l'écriture, je représenterai un