Interior point method for constrained minimization
62 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have a code for iinterior point method but am unsure how to use it to solve these problems:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/992755/image.jpeg)
1 comentario
Respuestas (1)
Saarthak Gupta
el 6 de Dic. de 2023
Hi Kendall,
Looks like you are trying to implement a solver for constrained optimization problem, like ‘fmincon’.
While the specifics of the solver might vary depending on your lecture material, a high-level description of the ‘fmincon’ Interior Point Algorithm might help you with a correct implementation.
The ‘fmincon’ interior point algorithm uses a path following method, where, given a convex optimization program (P) with constraints, we can convert it to an unconstrained program by adding a barrier function.
The interior-point approach to constrained minimization is to solve a sequence of approximate minimization problems. The original problem is:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1561509/image.png)
For each μ > 0, the approximate problem is:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1561514/image.png)
Since the CG step is not required in your case, to solve the approximate problem, the algorithm takes a direct step/Newton step in (x,s). This step attempts to solve the Karush-Kuhn-Tucker (KKT) conditions, using the auxiliary Lagrangian function:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1561519/image.png)
The KKT condition are:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1561524/image.png)
Solving the above KKT conditions using a linearized Lagrangian yields the direct step
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1561529/image.png)
While the ‘fmincon’ algorithm makes an LDL factorization of the matrix to solve, you may choose any alternate solver for solving the direct step.
When the approximate problem is solved with sufficient accuracy in the previous iteration, you may decrease the parameter \mu by a suitable factor (say 1/5 or 1/100) until convergence.
You can structure your algorithm to work with inputs like ‘fmincon’, i.e.,
x = fmincon(fun,x0,A,b,Aeq,beq)
To that end, your algorithm will have the following inputs for the first problem:
fun = @(x)x(1)^2+ x(2)^2+ x(3)^2+ x(4)^2+ x(5)^2
A = [0 0 -1 -1 0;0 0 0 0 1]
b = [3;-2]
Aeq = [1 -1 1 0 0]
beq = 3
The output of the function (x), hence, will be the solution to the constrained minimization problem.
Please refer to the following MATLAB documentation for further reference:
- fmincon Interior Point Algorithm: https://www.mathworks.com/help/optim/ug/constrained-nonlinear-optimization-algorithms.html
- Constrained Optimality Theory: https://www.mathworks.com/help/optim/ug/first-order-optimality-measure.html
- fmincon: https://www.mathworks.com/help/optim/ug/fmincon.html
1 comentario
KAGANA SARATH
el 20 de Feb. de 2024
Sir, Can we use CVX tool to implement optimization problems which are convex.
And my optimization problem is convex optimization problem. Should i use cvx tool or interior point method? How to decide?
My problem is given as follows:
The objective function is given as
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1622133/image.jpeg)
And constraints are
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1622138/image.jpeg)
The final optimization problem is given as follows:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1622143/image.jpeg)
It is already verify that above optimization probelm is convex . I am using CVX tool to solve the above problem, but not giving accurate values (means that it is solving the problem).
Please suggest proper tool to write a MATLAB code to get the oprimal power values.
In some research papers , authors were saying that Interior point methods can be utilized. How Can I use this in MATLAB to finish above optimization problem?
Should I use CVX tool or any optimization methods to complete the solution for the given formulated problem?
Thanks in Advance!
Ver también
Categorías
Más información sobre Nonlinear Optimization en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!