Solving dynamic optimization with non-binding inequality constraint












1














I want to solve a problem similar to the following discrete and finite time horizon dynamic optimization problem :
begin{equation}
begin{split}
&max_{{d_t}} sum_{t=0}^{T} - left [ f(s_t) + k(d_t) right ] + F(s_{T+1})\
& s.t. left { begin{array}{ll}
s_{t+1} = s_t + d_t \
s_t < A \
s_0 in mathbb{R}_+ \
s_T = A \
end{array}
right.
end{split}
end{equation}



I am able to solve the problem without the inequality constraint $s_t < A$ using Lagrangian multiplier which leads to a recursive equation on $s_t$ which I am able to solve numerically afterwards.



I wish to find a similar recursive equation, but this time when considering $s_t < A$. How should I take this inequality constraint into account when computing the Lagrangian first order conditions ?










share|cite|improve this question


















  • 1




    Introduce a slack variable $epsilon$ such that $s_t-A+epsilon^2 = 0$
    – Cesareo
    Dec 26 at 14:06






  • 1




    Thank you @Cesareo for your answer. Then how should I deal with the slack variable when deriving the first order condition ? Is there a direct method regarding slack variables ?
    – AlexC75
    Dec 26 at 14:11






  • 1




    Handle it as more a variable. The Lagrangian now reads $L(d_t,lambda,epsilon)$ so regarding $epsilon$ we have $L_{epsilon} = 2lambda_iepsilon = 0$ and $L_{lambda_i} = s_t -A+epsilon^2=0$ one additional condition.
    – Cesareo
    Dec 26 at 14:18








  • 1




    But there is no new co-state variable ? I am not sure on how to write the Lagrangian is this framework.
    – AlexC75
    Dec 26 at 14:26










  • $L(d_t,lambda,epsilon) = sum_{t=0}^{T} - left [ f(s_t) + k(d_t) right ] + F(s_{T+1})+lambda_1(s_{t+1} - s_t - d_t)+lambda_2(s_t-A+epsilon_1^2)+lambda_3(S_T-A)+lambda_4(s_0-epsilon_2^2)$
    – Cesareo
    Dec 26 at 14:31


















1














I want to solve a problem similar to the following discrete and finite time horizon dynamic optimization problem :
begin{equation}
begin{split}
&max_{{d_t}} sum_{t=0}^{T} - left [ f(s_t) + k(d_t) right ] + F(s_{T+1})\
& s.t. left { begin{array}{ll}
s_{t+1} = s_t + d_t \
s_t < A \
s_0 in mathbb{R}_+ \
s_T = A \
end{array}
right.
end{split}
end{equation}



I am able to solve the problem without the inequality constraint $s_t < A$ using Lagrangian multiplier which leads to a recursive equation on $s_t$ which I am able to solve numerically afterwards.



I wish to find a similar recursive equation, but this time when considering $s_t < A$. How should I take this inequality constraint into account when computing the Lagrangian first order conditions ?










share|cite|improve this question


















  • 1




    Introduce a slack variable $epsilon$ such that $s_t-A+epsilon^2 = 0$
    – Cesareo
    Dec 26 at 14:06






  • 1




    Thank you @Cesareo for your answer. Then how should I deal with the slack variable when deriving the first order condition ? Is there a direct method regarding slack variables ?
    – AlexC75
    Dec 26 at 14:11






  • 1




    Handle it as more a variable. The Lagrangian now reads $L(d_t,lambda,epsilon)$ so regarding $epsilon$ we have $L_{epsilon} = 2lambda_iepsilon = 0$ and $L_{lambda_i} = s_t -A+epsilon^2=0$ one additional condition.
    – Cesareo
    Dec 26 at 14:18








  • 1




    But there is no new co-state variable ? I am not sure on how to write the Lagrangian is this framework.
    – AlexC75
    Dec 26 at 14:26










  • $L(d_t,lambda,epsilon) = sum_{t=0}^{T} - left [ f(s_t) + k(d_t) right ] + F(s_{T+1})+lambda_1(s_{t+1} - s_t - d_t)+lambda_2(s_t-A+epsilon_1^2)+lambda_3(S_T-A)+lambda_4(s_0-epsilon_2^2)$
    – Cesareo
    Dec 26 at 14:31
















1












1








1







I want to solve a problem similar to the following discrete and finite time horizon dynamic optimization problem :
begin{equation}
begin{split}
&max_{{d_t}} sum_{t=0}^{T} - left [ f(s_t) + k(d_t) right ] + F(s_{T+1})\
& s.t. left { begin{array}{ll}
s_{t+1} = s_t + d_t \
s_t < A \
s_0 in mathbb{R}_+ \
s_T = A \
end{array}
right.
end{split}
end{equation}



I am able to solve the problem without the inequality constraint $s_t < A$ using Lagrangian multiplier which leads to a recursive equation on $s_t$ which I am able to solve numerically afterwards.



I wish to find a similar recursive equation, but this time when considering $s_t < A$. How should I take this inequality constraint into account when computing the Lagrangian first order conditions ?










share|cite|improve this question













I want to solve a problem similar to the following discrete and finite time horizon dynamic optimization problem :
begin{equation}
begin{split}
&max_{{d_t}} sum_{t=0}^{T} - left [ f(s_t) + k(d_t) right ] + F(s_{T+1})\
& s.t. left { begin{array}{ll}
s_{t+1} = s_t + d_t \
s_t < A \
s_0 in mathbb{R}_+ \
s_T = A \
end{array}
right.
end{split}
end{equation}



I am able to solve the problem without the inequality constraint $s_t < A$ using Lagrangian multiplier which leads to a recursive equation on $s_t$ which I am able to solve numerically afterwards.



I wish to find a similar recursive equation, but this time when considering $s_t < A$. How should I take this inequality constraint into account when computing the Lagrangian first order conditions ?







inequality optimization lagrange-multiplier constraints






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Dec 26 at 13:58









AlexC75

215




215








  • 1




    Introduce a slack variable $epsilon$ such that $s_t-A+epsilon^2 = 0$
    – Cesareo
    Dec 26 at 14:06






  • 1




    Thank you @Cesareo for your answer. Then how should I deal with the slack variable when deriving the first order condition ? Is there a direct method regarding slack variables ?
    – AlexC75
    Dec 26 at 14:11






  • 1




    Handle it as more a variable. The Lagrangian now reads $L(d_t,lambda,epsilon)$ so regarding $epsilon$ we have $L_{epsilon} = 2lambda_iepsilon = 0$ and $L_{lambda_i} = s_t -A+epsilon^2=0$ one additional condition.
    – Cesareo
    Dec 26 at 14:18








  • 1




    But there is no new co-state variable ? I am not sure on how to write the Lagrangian is this framework.
    – AlexC75
    Dec 26 at 14:26










  • $L(d_t,lambda,epsilon) = sum_{t=0}^{T} - left [ f(s_t) + k(d_t) right ] + F(s_{T+1})+lambda_1(s_{t+1} - s_t - d_t)+lambda_2(s_t-A+epsilon_1^2)+lambda_3(S_T-A)+lambda_4(s_0-epsilon_2^2)$
    – Cesareo
    Dec 26 at 14:31
















  • 1




    Introduce a slack variable $epsilon$ such that $s_t-A+epsilon^2 = 0$
    – Cesareo
    Dec 26 at 14:06






  • 1




    Thank you @Cesareo for your answer. Then how should I deal with the slack variable when deriving the first order condition ? Is there a direct method regarding slack variables ?
    – AlexC75
    Dec 26 at 14:11






  • 1




    Handle it as more a variable. The Lagrangian now reads $L(d_t,lambda,epsilon)$ so regarding $epsilon$ we have $L_{epsilon} = 2lambda_iepsilon = 0$ and $L_{lambda_i} = s_t -A+epsilon^2=0$ one additional condition.
    – Cesareo
    Dec 26 at 14:18








  • 1




    But there is no new co-state variable ? I am not sure on how to write the Lagrangian is this framework.
    – AlexC75
    Dec 26 at 14:26










  • $L(d_t,lambda,epsilon) = sum_{t=0}^{T} - left [ f(s_t) + k(d_t) right ] + F(s_{T+1})+lambda_1(s_{t+1} - s_t - d_t)+lambda_2(s_t-A+epsilon_1^2)+lambda_3(S_T-A)+lambda_4(s_0-epsilon_2^2)$
    – Cesareo
    Dec 26 at 14:31










1




1




Introduce a slack variable $epsilon$ such that $s_t-A+epsilon^2 = 0$
– Cesareo
Dec 26 at 14:06




Introduce a slack variable $epsilon$ such that $s_t-A+epsilon^2 = 0$
– Cesareo
Dec 26 at 14:06




1




1




Thank you @Cesareo for your answer. Then how should I deal with the slack variable when deriving the first order condition ? Is there a direct method regarding slack variables ?
– AlexC75
Dec 26 at 14:11




Thank you @Cesareo for your answer. Then how should I deal with the slack variable when deriving the first order condition ? Is there a direct method regarding slack variables ?
– AlexC75
Dec 26 at 14:11




1




1




Handle it as more a variable. The Lagrangian now reads $L(d_t,lambda,epsilon)$ so regarding $epsilon$ we have $L_{epsilon} = 2lambda_iepsilon = 0$ and $L_{lambda_i} = s_t -A+epsilon^2=0$ one additional condition.
– Cesareo
Dec 26 at 14:18






Handle it as more a variable. The Lagrangian now reads $L(d_t,lambda,epsilon)$ so regarding $epsilon$ we have $L_{epsilon} = 2lambda_iepsilon = 0$ and $L_{lambda_i} = s_t -A+epsilon^2=0$ one additional condition.
– Cesareo
Dec 26 at 14:18






1




1




But there is no new co-state variable ? I am not sure on how to write the Lagrangian is this framework.
– AlexC75
Dec 26 at 14:26




But there is no new co-state variable ? I am not sure on how to write the Lagrangian is this framework.
– AlexC75
Dec 26 at 14:26












$L(d_t,lambda,epsilon) = sum_{t=0}^{T} - left [ f(s_t) + k(d_t) right ] + F(s_{T+1})+lambda_1(s_{t+1} - s_t - d_t)+lambda_2(s_t-A+epsilon_1^2)+lambda_3(S_T-A)+lambda_4(s_0-epsilon_2^2)$
– Cesareo
Dec 26 at 14:31






$L(d_t,lambda,epsilon) = sum_{t=0}^{T} - left [ f(s_t) + k(d_t) right ] + F(s_{T+1})+lambda_1(s_{t+1} - s_t - d_t)+lambda_2(s_t-A+epsilon_1^2)+lambda_3(S_T-A)+lambda_4(s_0-epsilon_2^2)$
– Cesareo
Dec 26 at 14:31












1 Answer
1






active

oldest

votes


















1














I will present a reduced example shoving how to solve this kind of problems using the classical procedure of Lagrange multipliers. To apply this technique, previously we transform the inequalities into equalities with the help of the $epsilon_k$ slack variables.



First form the Lagrangian



$$
L(x,u,lambda,epsilon) = phi(x_{n+1})-f(x,u)+sum_{k=1}^nlambda_k(x_{k+1}-x_k-u_k) + sum_{k=1}^nlambda_{n+k}(x_k-A+epsilon_k^2)+lambda_{2n+1}(x_n-A)
$$



where



$$
phi(x_{n+1}) = x_{n+1}^2\
f(x,u) = min(max)sum_{k=1}^na x_k^2+b u_k^2
$$



Now considering $n = 5$ the stationary conditions are



$$
nabla L = left{
begin{array}{rcl}
2 epsilon _1 lambda _6&=&0 \
2 epsilon _2 lambda _7&=&0 \
2 epsilon _3 lambda _8&=&0 \
2 epsilon _4 lambda _9&=&0 \
2 epsilon _5 lambda _{10}&=&0 \
-u_1-x_1+x_2&=&0 \
-u_2-x_2+x_3&=&0 \
-u_3-x_3+x_4&=&0 \
-u_4-x_4+x_5&=&0 \
-u_5-x_5+x_6&=&0 \
epsilon _1^2-A+x_1&=&0 \
epsilon _2^2-A+x_2&=&0 \
epsilon _3^2-A+x_3&=&0 \
epsilon _4^2-A+x_4&=&0 \
epsilon _5^2-A+x_5&=&0 \
x_5-A&=&0 \
2 b u_1+lambda _1&=&0 \
2 b u_2+lambda _2&=&0 \
2 b u_3+lambda _3&=&0 \
2 b u_4+lambda _4&=&0 \
2 b u_5+lambda _5&=&0 \
-lambda _1+lambda _6-2 a x_1&=&0 \
lambda _1-lambda _2+lambda _7-2 a x_2&=&0 \
lambda _2-lambda _3+lambda _8-2 a x_3&=&0 \
lambda _3-lambda _4+lambda _9-2 a x_4&=&0 \
lambda _4-lambda _5+lambda _{10}+lambda _{11}-2 a x_5&=&0 \
lambda _5+2 x_6&=&0 \
end{array}
right.
$$



Solving this system of equations we obtain for the parametric values $a = 2, b = 2, A = 1, n = 5$



follows the $min$ strategy (in red $u$ and in blue $x$)



enter image description here



and the $max$ strategy



enter image description here



Any way, this kind of problem can be satisfactorily solved with a quadratic programming package, without the need for the slack variables introduction. See https://en.wikipedia.org/wiki/Quadratic_programming



I hope this helps.






share|cite|improve this answer























  • This definitely help. Thank's a lot.
    – AlexC75
    Dec 27 at 15:26











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3052959%2fsolving-dynamic-optimization-with-non-binding-inequality-constraint%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














I will present a reduced example shoving how to solve this kind of problems using the classical procedure of Lagrange multipliers. To apply this technique, previously we transform the inequalities into equalities with the help of the $epsilon_k$ slack variables.



First form the Lagrangian



$$
L(x,u,lambda,epsilon) = phi(x_{n+1})-f(x,u)+sum_{k=1}^nlambda_k(x_{k+1}-x_k-u_k) + sum_{k=1}^nlambda_{n+k}(x_k-A+epsilon_k^2)+lambda_{2n+1}(x_n-A)
$$



where



$$
phi(x_{n+1}) = x_{n+1}^2\
f(x,u) = min(max)sum_{k=1}^na x_k^2+b u_k^2
$$



Now considering $n = 5$ the stationary conditions are



$$
nabla L = left{
begin{array}{rcl}
2 epsilon _1 lambda _6&=&0 \
2 epsilon _2 lambda _7&=&0 \
2 epsilon _3 lambda _8&=&0 \
2 epsilon _4 lambda _9&=&0 \
2 epsilon _5 lambda _{10}&=&0 \
-u_1-x_1+x_2&=&0 \
-u_2-x_2+x_3&=&0 \
-u_3-x_3+x_4&=&0 \
-u_4-x_4+x_5&=&0 \
-u_5-x_5+x_6&=&0 \
epsilon _1^2-A+x_1&=&0 \
epsilon _2^2-A+x_2&=&0 \
epsilon _3^2-A+x_3&=&0 \
epsilon _4^2-A+x_4&=&0 \
epsilon _5^2-A+x_5&=&0 \
x_5-A&=&0 \
2 b u_1+lambda _1&=&0 \
2 b u_2+lambda _2&=&0 \
2 b u_3+lambda _3&=&0 \
2 b u_4+lambda _4&=&0 \
2 b u_5+lambda _5&=&0 \
-lambda _1+lambda _6-2 a x_1&=&0 \
lambda _1-lambda _2+lambda _7-2 a x_2&=&0 \
lambda _2-lambda _3+lambda _8-2 a x_3&=&0 \
lambda _3-lambda _4+lambda _9-2 a x_4&=&0 \
lambda _4-lambda _5+lambda _{10}+lambda _{11}-2 a x_5&=&0 \
lambda _5+2 x_6&=&0 \
end{array}
right.
$$



Solving this system of equations we obtain for the parametric values $a = 2, b = 2, A = 1, n = 5$



follows the $min$ strategy (in red $u$ and in blue $x$)



enter image description here



and the $max$ strategy



enter image description here



Any way, this kind of problem can be satisfactorily solved with a quadratic programming package, without the need for the slack variables introduction. See https://en.wikipedia.org/wiki/Quadratic_programming



I hope this helps.






share|cite|improve this answer























  • This definitely help. Thank's a lot.
    – AlexC75
    Dec 27 at 15:26
















1














I will present a reduced example shoving how to solve this kind of problems using the classical procedure of Lagrange multipliers. To apply this technique, previously we transform the inequalities into equalities with the help of the $epsilon_k$ slack variables.



First form the Lagrangian



$$
L(x,u,lambda,epsilon) = phi(x_{n+1})-f(x,u)+sum_{k=1}^nlambda_k(x_{k+1}-x_k-u_k) + sum_{k=1}^nlambda_{n+k}(x_k-A+epsilon_k^2)+lambda_{2n+1}(x_n-A)
$$



where



$$
phi(x_{n+1}) = x_{n+1}^2\
f(x,u) = min(max)sum_{k=1}^na x_k^2+b u_k^2
$$



Now considering $n = 5$ the stationary conditions are



$$
nabla L = left{
begin{array}{rcl}
2 epsilon _1 lambda _6&=&0 \
2 epsilon _2 lambda _7&=&0 \
2 epsilon _3 lambda _8&=&0 \
2 epsilon _4 lambda _9&=&0 \
2 epsilon _5 lambda _{10}&=&0 \
-u_1-x_1+x_2&=&0 \
-u_2-x_2+x_3&=&0 \
-u_3-x_3+x_4&=&0 \
-u_4-x_4+x_5&=&0 \
-u_5-x_5+x_6&=&0 \
epsilon _1^2-A+x_1&=&0 \
epsilon _2^2-A+x_2&=&0 \
epsilon _3^2-A+x_3&=&0 \
epsilon _4^2-A+x_4&=&0 \
epsilon _5^2-A+x_5&=&0 \
x_5-A&=&0 \
2 b u_1+lambda _1&=&0 \
2 b u_2+lambda _2&=&0 \
2 b u_3+lambda _3&=&0 \
2 b u_4+lambda _4&=&0 \
2 b u_5+lambda _5&=&0 \
-lambda _1+lambda _6-2 a x_1&=&0 \
lambda _1-lambda _2+lambda _7-2 a x_2&=&0 \
lambda _2-lambda _3+lambda _8-2 a x_3&=&0 \
lambda _3-lambda _4+lambda _9-2 a x_4&=&0 \
lambda _4-lambda _5+lambda _{10}+lambda _{11}-2 a x_5&=&0 \
lambda _5+2 x_6&=&0 \
end{array}
right.
$$



Solving this system of equations we obtain for the parametric values $a = 2, b = 2, A = 1, n = 5$



follows the $min$ strategy (in red $u$ and in blue $x$)



enter image description here



and the $max$ strategy



enter image description here



Any way, this kind of problem can be satisfactorily solved with a quadratic programming package, without the need for the slack variables introduction. See https://en.wikipedia.org/wiki/Quadratic_programming



I hope this helps.






share|cite|improve this answer























  • This definitely help. Thank's a lot.
    – AlexC75
    Dec 27 at 15:26














1












1








1






I will present a reduced example shoving how to solve this kind of problems using the classical procedure of Lagrange multipliers. To apply this technique, previously we transform the inequalities into equalities with the help of the $epsilon_k$ slack variables.



First form the Lagrangian



$$
L(x,u,lambda,epsilon) = phi(x_{n+1})-f(x,u)+sum_{k=1}^nlambda_k(x_{k+1}-x_k-u_k) + sum_{k=1}^nlambda_{n+k}(x_k-A+epsilon_k^2)+lambda_{2n+1}(x_n-A)
$$



where



$$
phi(x_{n+1}) = x_{n+1}^2\
f(x,u) = min(max)sum_{k=1}^na x_k^2+b u_k^2
$$



Now considering $n = 5$ the stationary conditions are



$$
nabla L = left{
begin{array}{rcl}
2 epsilon _1 lambda _6&=&0 \
2 epsilon _2 lambda _7&=&0 \
2 epsilon _3 lambda _8&=&0 \
2 epsilon _4 lambda _9&=&0 \
2 epsilon _5 lambda _{10}&=&0 \
-u_1-x_1+x_2&=&0 \
-u_2-x_2+x_3&=&0 \
-u_3-x_3+x_4&=&0 \
-u_4-x_4+x_5&=&0 \
-u_5-x_5+x_6&=&0 \
epsilon _1^2-A+x_1&=&0 \
epsilon _2^2-A+x_2&=&0 \
epsilon _3^2-A+x_3&=&0 \
epsilon _4^2-A+x_4&=&0 \
epsilon _5^2-A+x_5&=&0 \
x_5-A&=&0 \
2 b u_1+lambda _1&=&0 \
2 b u_2+lambda _2&=&0 \
2 b u_3+lambda _3&=&0 \
2 b u_4+lambda _4&=&0 \
2 b u_5+lambda _5&=&0 \
-lambda _1+lambda _6-2 a x_1&=&0 \
lambda _1-lambda _2+lambda _7-2 a x_2&=&0 \
lambda _2-lambda _3+lambda _8-2 a x_3&=&0 \
lambda _3-lambda _4+lambda _9-2 a x_4&=&0 \
lambda _4-lambda _5+lambda _{10}+lambda _{11}-2 a x_5&=&0 \
lambda _5+2 x_6&=&0 \
end{array}
right.
$$



Solving this system of equations we obtain for the parametric values $a = 2, b = 2, A = 1, n = 5$



follows the $min$ strategy (in red $u$ and in blue $x$)



enter image description here



and the $max$ strategy



enter image description here



Any way, this kind of problem can be satisfactorily solved with a quadratic programming package, without the need for the slack variables introduction. See https://en.wikipedia.org/wiki/Quadratic_programming



I hope this helps.






share|cite|improve this answer














I will present a reduced example shoving how to solve this kind of problems using the classical procedure of Lagrange multipliers. To apply this technique, previously we transform the inequalities into equalities with the help of the $epsilon_k$ slack variables.



First form the Lagrangian



$$
L(x,u,lambda,epsilon) = phi(x_{n+1})-f(x,u)+sum_{k=1}^nlambda_k(x_{k+1}-x_k-u_k) + sum_{k=1}^nlambda_{n+k}(x_k-A+epsilon_k^2)+lambda_{2n+1}(x_n-A)
$$



where



$$
phi(x_{n+1}) = x_{n+1}^2\
f(x,u) = min(max)sum_{k=1}^na x_k^2+b u_k^2
$$



Now considering $n = 5$ the stationary conditions are



$$
nabla L = left{
begin{array}{rcl}
2 epsilon _1 lambda _6&=&0 \
2 epsilon _2 lambda _7&=&0 \
2 epsilon _3 lambda _8&=&0 \
2 epsilon _4 lambda _9&=&0 \
2 epsilon _5 lambda _{10}&=&0 \
-u_1-x_1+x_2&=&0 \
-u_2-x_2+x_3&=&0 \
-u_3-x_3+x_4&=&0 \
-u_4-x_4+x_5&=&0 \
-u_5-x_5+x_6&=&0 \
epsilon _1^2-A+x_1&=&0 \
epsilon _2^2-A+x_2&=&0 \
epsilon _3^2-A+x_3&=&0 \
epsilon _4^2-A+x_4&=&0 \
epsilon _5^2-A+x_5&=&0 \
x_5-A&=&0 \
2 b u_1+lambda _1&=&0 \
2 b u_2+lambda _2&=&0 \
2 b u_3+lambda _3&=&0 \
2 b u_4+lambda _4&=&0 \
2 b u_5+lambda _5&=&0 \
-lambda _1+lambda _6-2 a x_1&=&0 \
lambda _1-lambda _2+lambda _7-2 a x_2&=&0 \
lambda _2-lambda _3+lambda _8-2 a x_3&=&0 \
lambda _3-lambda _4+lambda _9-2 a x_4&=&0 \
lambda _4-lambda _5+lambda _{10}+lambda _{11}-2 a x_5&=&0 \
lambda _5+2 x_6&=&0 \
end{array}
right.
$$



Solving this system of equations we obtain for the parametric values $a = 2, b = 2, A = 1, n = 5$



follows the $min$ strategy (in red $u$ and in blue $x$)



enter image description here



and the $max$ strategy



enter image description here



Any way, this kind of problem can be satisfactorily solved with a quadratic programming package, without the need for the slack variables introduction. See https://en.wikipedia.org/wiki/Quadratic_programming



I hope this helps.







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Dec 27 at 10:10

























answered Dec 27 at 1:34









Cesareo

8,2133516




8,2133516












  • This definitely help. Thank's a lot.
    – AlexC75
    Dec 27 at 15:26


















  • This definitely help. Thank's a lot.
    – AlexC75
    Dec 27 at 15:26
















This definitely help. Thank's a lot.
– AlexC75
Dec 27 at 15:26




This definitely help. Thank's a lot.
– AlexC75
Dec 27 at 15:26


















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3052959%2fsolving-dynamic-optimization-with-non-binding-inequality-constraint%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Human spaceflight

Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

File:DeusFollowingSea.jpg