Solve a Kuhn-Tucker problem symbolically in a short time?

Posted 1 month ago
313 Views
|
3 Replies
|
0 Total Likes
|
 Hi - I am trying to solve a Kuhn-Tucker constrained optimization problem. I have both tried using the built-in package below and using Solve with the various equality and inequality constraints directly. In both cases I let it run for two days and it would not solve. I'm wondering if there is a more efficient way to do this that anyone is aware of? Perhaps first finding all solutions with the equality conditions then keeping solutions that satisfy the inequality and parameter constraints? Below is my code. Any help would be much appreciated! kkt[obj_, cons_, vars_, paramcons_:True] := Module[{stdcons, eqcons, ineqcons, lambdas, mus, eqs1, eqs2, eqs3}, stdcons = cons /. {(x_) >= (y_) -> y - x <= 0, (x_) > (y_) -> y - x > 0, (x_) == (y_) -> x - y == 0, (x_) <= (y_) -> x - y <= 0}; eqcons = Cases[stdcons, (x_) == 0 -> x]; ineqcons = Cases[stdcons, (x_) <= 0 -> x]; lambdas = Array[λ, Length[ineqcons]]; mus = Array[μ, Length[eqcons]]; eqs1 = D[obj + mus . eqcons - lambdas . ineqcons == 0, {vars}]; eqs2 = Thread[lambdas >= 0]; eqs3 = Table[lambdas[[i]]*ineqcons[[i]] == 0, {i, Length[ineqcons]}]; Assuming[paramcons, Refine[Reduce[Join[eqs1, eqs2, eqs3, cons], Join[vars, lambdas, mus], Reals, Backsubstitution -> True]]]] kkt[μ*(i*R - Subscript[d, r] - Subscript[d, 2]) + (1 - μ)*θ*((i - Subscript[d, 1]/(γ*θ*R))*R - Subscript[d, 2]), {i - μ*(Subscript[d, r] + Subscript[d, 2]) - (1 - μ)*(Subscript[d, 1] + θ*Subscript[d, 2]) <= 0, θ*(Subscript[d, r] + Subscript[d, 2] - i) - c - (1 - μ)*(Subscript[d, 1] + θ*Subscript[d, 2]) + i - μ*(Subscript[d, r] + Subscript[d, 2]) <= 0, Subscript[d, 1] - Subscript[d, r] >= 0, θ*Subscript[d, r] - Subscript[d, 1] <= 0, i - 1 <= 0}, {Subscript[d, r], Subscript[d, 2], Subscript[d, 1], i}, {μ > 0, μ < 1, θ > 0, θ < 1, R > 1, μ*R + θ*(1 - μ)*R > 1, (1 - μ*R)*(1 - θ) < c, θ*(1/((1 - θ)*μ + θ) - 1) > c, μ*R < 1, γ < 1, γ > 0}] Answer
3 Replies
Sort By:
Posted 1 month ago Answer Answer Answer