How to find optimal values to a function using KKT Conditions (Karush Kuhn Tucker Conditions)?

82 views (last 30 days)
It's really simple verify the KKT (Karush-Kuhn-Tucker) conditions, but I'm stuck in doing this by a MatLab code.
Has anyone got a MatLab program/code or any suggestion for finding the optimal value of a function with constrains using KKT conditions?
The implementation need to be done 'manually', without use fmincon, solve or other MatLab function that give only the optimal results.
I need to solve: max f(x,y)=a1*x^5 + a2*y^4 + a3*x^3 + a4*y^2 + x*y + a5; s.t. 5*x + 3*y <= b1; 3*x + 5*y <= b2;
Has anyone got a MatLab program/code or any suggestion for finding the optimal value of a function with constrains using KKT conditions?
  4 Comments
Qingyang Xiao
Qingyang Xiao on 20 Nov 2022
Hi Jose, you can first apply KKT conditions for this problem (of course you need first prove it's a convex optimization problem), then, hard code by multiple equations for all four KKT conditions (i.e. stationary, primal & dual feasibility and complementary slackness ) in matlab. It should work.

Sign in to comment.

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!