# Interior-point method for LP

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Authors: Tomas Lopez Lauterio, Rohit Thakur and Sunil Shenoy (SysEn 5800 Fall 2020)

## Introduction

Linear programming problems seek to optimize linear functions given linear constraints. There are several applications of linear programming including inventory control, production scheduling, transportation optimization and efficient manufacturing processes. Simplex method has been a very popular method to solve these linear programming problems and has served these industries well for a long time. But over the past 40 years, there have been significant number of advances in different algorithms that can be used for solving these types of problems in more efficient ways, especially where the problems become very large scale in terms of variables and constraints.  In early 1980s Karmarkar (1984)  published a paper introducing interior point methods to solve linear-programming problems. A simple way to look at differences between simplex method and interior point method is that a simplex method moves along the edges of a polytope towards a vertex having a lower value of the cost function, whereas an interior point method begins its iterations inside the polytope and moves towards the lowest cost vertex without regard for edges. This approach reduces the number of iterations needed to reach that vertex, thereby reducing computational time needed to solve the problem.

### Lagrange Function

Before getting too deep into description of Interior point method, there are a few concepts that are helpful to understand. First key concept to understand is related to Lagrange function. Lagrange function incorporates the constraints into a modified objective function in such a way that a constrained minimizer $(x^{*})$ is connected to an unconstrained minimizer $\left\{x^{*},\lambda ^{*}\right\}$ for the augmented objective function $L\left(x,\lambda \right)$ , where the augmentation is achieved with $'p'$ Lagrange multipliers. 
To illustrate this point, consider a simple an optimization problem:
minimize $f\left(x\right)$ subject to: $A\cdot x=b$ where, $A\,\in \,R^{p\,\times \,n}$ is assumed to have a full row rank Lagrange function can be laid out as:
$L(x,\lambda )=f(x)+\sum _{i=1}^{p}\lambda _{i}\cdot a_{i}(x)$ where, $'\lambda '$ introduced in this equation is called Lagrange Multiplier.

### Newton's Method

Another key concept to understand is regarding solving linear and non-linear equations using Newton's methods. Assume an unconstrained minimization problem in the form:
minimize $g\left(x\right)$ , where $g\left(x\right)$ is a real valued function with $'n'$ variables.
A local minimum for this problem will satisfy the following system of equations:
$\left[{\frac {\partial g(x)}{\partial x_{1}}}.....{\frac {\partial g(x)}{\partial x_{n}}}\right]^{T}=\left[0...0\right]$ The Newton's iteration looks like:
$x^{k+1}=x^{k}-\left[\nabla ^{2}g(x^{k})\right]^{-1}\cdot \nabla g(x^{k})$ ## Theory and algorithm

Given a linear programming problem with constraint equations that have inequality terms, the inequality term is typically replaced with an equality term using slack variables. The new reformulation can be discontinuous in nature and to replace the discontinuous function with a smoother function, a logarithmic form of this reformulation is utilized. This nonlinear objective function is called "Logarithmic Barrier Function" The process involves starting with formation of a primal-dual pair of linear programs and then using "Lagrangian function" form on the "Barrier function" to convert the constrained problems into unconstrained problems. These unconstrained problems are then solved using Newton's method as shown above.

### Problem Formulation

Consider a combination of primal-dual problem below:
(Primal Problem formulation)
→ minimize $c^{T}x$ Subject to: $Ax=b$ and $x\geq 0$ (Dual Problem formulation)
→ maximize $b^{T}y$ Subject to: $A^{T}y+\lambda =c$ and $\lambda \geq 0$ $'\lambda '$ vector introduced represents the slack variables.

The Lagrangian functional form is used to configure two equations using "Logarithmic Barrier Function" for both primal and dual forms mentioned above:
Lagrangian equation for Primal using Logarithm Barrier Function : $L_{p}(x,y)=c^{T}\cdot x-\mu \cdot \sum _{j=1}^{n}log(x_{j})-y^{T}\cdot (Ax-b)$ Lagrangian equation for Dual using Logarithm Barrier Function : $L_{d}(x,y,\lambda )=b^{T}\cdot y+\mu \cdot \sum _{j=1}^{n}log(\lambda _{j})-x^{T}\cdot (A^{T}y+\lambda -c)$ Taking the partial derivatives of Lp and Ld with respect to variables $'x'\;'\lambda '\;'y'$ , and forcing these terms to zero, we get the following equations:
$Ax=b$ and $x\geq 0$ $A^{T}y+\lambda =c$ and $\lambda \geq 0$ $x_{j}\cdot \lambda _{j}=\mu$ for j= 1,2,.......n

where, $'\mu '$ is strictly positive scaler parameter. For each $\mu >0$ , the vectors in the set $\left\{x\left(\mu \right),y\left(\mu \right),\lambda \left(\mu \right)\right\}$ satisfying above equations, can we viewed as set of points in $R^{n}$ , $R^{p}$ , $R^{n}$ respectively, such that when $'\mu '$ varies, the corresponding points form a set of trajectories called "Central Path". The central path lies in the "Interior" of the feasible regions. There is a sample illustration of "Central Path" method in figure to right. Starting with a positive value of $'\mu '$ and as $'\mu '$ approaches 0, the optimal point is reached.

Let Diagonal[...] denote a diagonal matrix with the listed elements on its diagonal. Define the following:
X = Diagonal [$x_{1}^{0},....x_{n}^{0}$ ]
$\lambda$ = Diagonal ($\lambda _{1}^{0},....\lambda _{n}^{0}$ )
eT = (1 .....1) as vector of all 1's.
Using these newly defined terms, the equation above can be written as:
$X\cdot \lambda \cdot e=\mu \cdot e$ ### Iterations using Newton's Method

Employing the Newton's iterative method to solve the following equations:
$Ax-b=0$ $A^{T}y+\lambda =c$ $X\cdot \lambda \cdot e-\mu \cdot e=0$ With definition of starting point that lies within feasible region as $\left(x^{0},y^{0},\lambda ^{0}\right)$ such that $x^{0}>0\,and\lambda ^{0}>0$ . Also defining 2 residual vectors for both the primal and dual equations:
$\delta _{p}=b-A\cdot x^{0}$ $\delta _{d}=c-A^{0}\cdot y^{0}-\lambda ^{0}$ Applying Newton's Method to solve above equations:
${\begin{bmatrix}A&0&0\\0&A^{T}&1\\\lambda &0&X\end{bmatrix}}\cdot {\begin{bmatrix}\delta _{x}\\\delta _{y}\\\delta _{\lambda }\end{bmatrix}}={\begin{bmatrix}\delta _{p}\\\delta _{d}\\\mu \cdot e-X\cdot \lambda \cdot e\end{bmatrix}}$ So a single iteration of Newton's method involves the following equations. For each iteration, we solve for the next value of $x^{k+1},y^{k+1},\lambda ^{k+1}$ :
$(A\lambda ^{-1}XA^{T})\delta _{y}=b-\mu A\lambda ^{-1}+A\lambda ^{-1}X\delta _{d}$ $\delta _{\lambda }=\delta _{d}\cdot A^{T}\delta _{y}$ $\delta _{x}=\lambda ^{-1}\left[\mu \cdot e-X\lambda e-\lambda \delta _{z}\right]$ $\alpha _{p}=min\left\{{\frac {-x_{j}}{\delta _{x_{j}}}}\right\}$ for $\delta x_{j}<0$ $\alpha _{d}=min\left\{{\frac {-\lambda _{j}}{\delta _{\lambda _{j}}}}\right\}$ for $\delta \lambda _{j}<0$ The value of the the following variables for next iteration (+1) is determined by:
$x^{k+1}=x^{k}+\alpha _{p}\cdot \delta _{x}$ $y^{k+1}=y^{k}+\alpha _{d}\cdot \delta _{y}$ $\lambda ^{k+1}=\lambda ^{k}+\alpha _{d}\cdot \delta _{\lambda }$ The quantities $\alpha _{p}$ and $\alpha _{d}$ are positive with $0\leq \alpha _{p},\alpha _{d}\leq 1$ .
After each iteration of Newton's method, we assess the duality gap that is given by the expression below and compare it against a small value ε
${\frac {c^{T}x^{k}-b^{T}y^{k}}{1+\left|b^{T}y^{k}\right|}}\leq \varepsilon$ The value of ε can be chosen to be something small 10-6, which essentially is the permissible duality gap for the problem.

## Numerical Example

Maximize
$3X_{1}+3X_{2}$ such that
$X_{1}+X_{2}\leq 4,$ $X_{1}\geq 0,$ $X_{2}\geq 0,$ Barrier form of the above primal problem is as written below:

$P(X,\mu )=3X_{1}+3X_{2}+\mu .log(4-X_{1}-X_{2})+\mu .log(X_{1})+\mu .log(X_{2})$ The Barrier function is always concave, since the problem is a maximization problem, there will be one and only one solution. In order to find the maximum point on the concave function we take a derivate and set it to zero.

Taking partial derivative and setting to zero, we get the below equations

${\frac {\partial P(X,\mu )}{\partial X_{1}}}=3-{\frac {\mu }{(4-X_{1}-X_{2})}}+{\frac {\mu }{X_{1}}}=0$ ${\frac {\partial P(X,\mu )}{\partial X_{2}}}=3-{\frac {\mu }{(4-X_{1}-X_{2})}}+{\frac {\mu }{X_{2}}}=0$ Using above equations the following can be derived: $X_{1}=X_{2}$ Hence the following can be concluded

$3-{\frac {\mu }{(4-2X_{1})}}+{\frac {\mu }{X_{1}}}=0$ The above equation can be converted into a quadratic equation as below:

$6X_{1}^{2}-3X_{1}(4-\mu )-4\mu =0$ The solution to the above quadratic equation can be written as below:

$X_{1}={\frac {3(4-\mu )\pm ({\sqrt {9(4-\mu )^{2}+96\mu }}}{12}}=X_{2}$ Taking only take the positive value of $X_{1}$ and $X_{2}$ from the above equation as $X_{1}\geq 0$ and $X_{2}\geq 0$ we can solve $X_{1}$ and $X_{2}$ for different values of $\mu$ . The outcome of such iterations is listed in the table below.

Objective & Barrier Function w.r.t $X_{1}$ , $X_{2}$ and $\mu$ $\mu$ $X_{1}$ $X_{2}$ $P(X,\mu )$ $f(x)$ 0 2 2 12 12
0.01 1.998 1.998 11.947 11.990
0.1 1.984 1.984 11.697 11.902
1 1.859 1.859 11.128 11.152
10 1.486 1.486 17.114 8.916
100 1.351 1.351 94.357 8.105
1000 1.335 1.335 871.052 8.011

From the above table it can be seen that:

1. as $\mu$ gets close to zero, the Barrier Function becomes tight and close to the original function.
2. at $\mu =0$ the optimal solution is achieved.

Summary: Maximum Value of Objective function $=12$ Optimal points $X_{1}=2$ and $X_{2}=2$ The Newton's Method can also be applied to solve linear programming problems as indicated in the "Theory and Algorithm" section above. The solution to linear programming problems as indicated in this section "Numerical Example", will be similar to quadratic equation as obtained above and will converge in one iteration.

## Applications

Primal-Dual interior-point (PDIP) methods  are commonly used in optimal power flow (OPF), in this case what is being looked is to maximize user utility and minimize operational cost satisfying operational and physical constraints. The solution to the OPF needs to be available to grid operators in few minutes or seconds due to changes and fluctuations in loads during power generation. Newton-based primal-dual interior point can achieve fast convergence in this OPF optimization problem. 

Another application of the PDIP  is for the minimization of losses and cost in the generation and transmission in hydroelectric power systems. 

PDIP are commonly used in imaging processing.  One these applications is for image deblurring, in this case the constrained deblurring problem is formulated as primal-dual.  The constrained primal-dual is solved using a semi-smooth Newton’s method. 

PDIP can be utilized to obtain a general formula for a shape derivative of the potential energy describing the energy release rate for curvilinear cracks.  Problems on cracks and their evolution have important application in engineering and mechanical sciences. 

## Conclusion

The primal-dual interior point method is a good alternative to the simplex methods for solving linear programming problems. The primal dual method shows superior performance and convergence on many large complex problems. simplex codes are faster on small to medium problems, interior point primal-dual are much faster on large problems.