12 Optimization

To use the functions described in this section, you should include pnl/pnl_optim.h.

12.1 Linear constrained optimization (linear programming)

12.1.1 Overview

Consider the minimization problem

min x CT x
s.t. Aineq x Bineq
Aeq x = Beq
xmin x xmax

12.1.2 Functions

To solve such a linear problem, we provide a wrapper to the LPSolve library ( http://lpsolve.sourceforge.net).

12.2 Nonlinear constrained optimization

12.2.1 Overview

A standard Constrained Nonlinear Optimization problem can be written as:

     (
     |{ min  f(x)
(O )   cI(x) ≥ 0
     |( cE (x ) = 0

where the function f : n is the objective function, cI : n mI are the inequality constraints and cE : n mE 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 some conditions, if x n is a solution of problem (O), then there exist a vector λ = (λIE) 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
    {                      cI(x) ≥ 0
(P )||                       λI ≥ 0
    ||||               cI(x)λI = 0, i = 1...m
    |(                i    i             I

l is known as the Lagrangian of the problem (O), λI and λE as the dual variables while x is the primal variable.

12.2.2 Functions

To solve an inequality constrained optimization problem, ie mE = 0, we provide the following function.