Sei sulla pagina 1di 2

A standard Constrained Nonlinear Optimization problem can be written as:


 min f (x)
(O) cI (x) ≥ 0
 E
c (x) ≥ 0
where the function f : Rn → R is the objective function, cI : Rn → RmI are the
inequality constraints and cE : Rn → RmE are the equality constraints. These functions
are supposed to be smooth.

In general, the inequality constraints are of the form cI (x) = (g(x), x − l, u − x).
The vector l and u are the lower and upper bounds on the variables x and g(x) and the
non linear inequality constraints.
Under certains conditions, if x ∈ Rn is a solution of problem (O), then there exist
a vector λ = (λI , λE ) ∈ Rm , where m = mI + mE , such that the well known Karush-
Kuhn-Tucker (KKT) optimality conditions are satisfied:


 ∇`(x, λI , λE ) = ∇f (x) − ∇cI (x)λI − ∇cE (x)λE = 0


 cE (x) = 0
(P ) cI (x) ≥ 0



 λ≥0

cIi (x)λIi = 0, i = 1...m
Description:

• func is the function to minimize f .

• grad is the gradient of f . If this gradient is not available, then enter grad=NULL.
In this case, finite difference will be used to estimate the gradient.

• nl constraints is the function g(x), ie the non linear inequality constraints.

• lower bounds are the lower bounds on x.

• upper bounds are the upper bounds on x.

• x input is the initial point where the algorithm starts.

• tolerance is the precision required in solving (P).

• iter max is the maximum number of iterations in the algorithm.

• print algo steps is a flag to decide to print information.

• x output is the point where the algorithm stops.

1
The algorithm returns an int, its value depends on the output status of the algorithm.
We have 4 cases:

• 0: Output Status: Failure: Initial point is not strictly feasible.

• 1: Output Status: Step too small, we stop the algorithm.

• 2: Output Status: Maximum iteration reached.

• 3: Output Status: A solution has been found up to the required accuracy.

The last case is equivalent to the two inequalities:

||∇`(x, λ)|| = ||∇f (x) − ∇c(x)λ|| < tolerance


||c(x)λ|| < tolerance
where c(x)λ is a vector of term by term multiplication of c(x) and λ.

Imporant Remark 1: The algorithm we implement requires that the initial point x0 ,
given as an input to the algorithm, is strictly feasible, ie: c(x0 ) > 0.
Imporant Remark 2: The algorithm try to find a pair (x, λ) that solves the equations
(P ), but this does not garantee that x is a global minimun of f on the set {c(x) > 0}.

Potrebbero piacerti anche