Interior point method for constrained minimization
62 次查看(过去 30 天)
显示 更早的评论
I have a code for iinterior point method but am unsure how to use it to solve these problems:
1 个评论
回答(1 个)
Saarthak Gupta
2023-12-6
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:
For each μ > 0, the approximate problem is:
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:
The KKT condition are:
Solving the above KKT conditions using a linearized Lagrangian yields the direct step
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 个评论
KAGANA SARATH
2024-2-20
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
And constraints are
The final optimization problem is given as follows:
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!
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Nonlinear Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!