Skip to content

Commit 235a3e3

Browse files
author
Pavelrst
committed
code discription added
1 parent 7f5568d commit 235a3e3

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

report.tex

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,5 +274,44 @@ \subsection{Substitute the obtained in Q.3 Lagrange multipliers}
274274
Is the dual optimum achieved at that point? Yes.
275275
\[\eta(\lambda_1^*, \lambda_2^*) = 37 \frac{2}{3} \]
276276

277+
\newpage
278+
\section{Code}
279+
\subsection{Penalty method}
280+
\subparagraph{Lagrangian} Lets look at example with only one constraint
281+
\[L_{p\mu}(x) = f(x) + \mu_i \varphi_{p }(g_{i(x)}) + ... \]
282+
283+
\[\nabla_x L_{p\mu}(x) = \nabla_x f(x) + \mu_i \varphi_{p }^{'} (g_{i(x)}) \nabla_x g_{i(x)} + ... \]
284+
285+
\[\nabla_x^2 L_{p\mu}(x) = \nabla_x^2 f(x) + \mu_i \varphi_{p}^{''} (g_{i(x)}) \nabla_x g_{i(x)}\nabla_x^T g_{i(x)} + \mu_i \varphi_{p}^{'} (g_{i(x)}) \nabla_x^2 g_{i(x)} + ... = \]
286+
287+
\[\nabla_x^2 L_{p\mu}(x) = \nabla_x^2 f(x) + \mu_i \varphi_{p}^{''} (g_{i(x)}) \nabla_x g_{i(x)}\nabla_x^T g_{i(x)} + 0 \]
288+
289+
\subparagraph{Penalty Function}
290+
\[
291+
\varphi_{p}(g_{(x)}) =\left\{
292+
\begin{array}{ll}
293+
\frac{1}{p}(\frac{p^2 g_{(x)}^2}{2} + pg_{(x)}) \ ; \ pg_{(x)} \geq -\frac{1}{2} \\
294+
\frac{1}{p} [-\frac{1}{4} \log(-2pg_{(x)})-\frac{3}{8}] \ ; \ pg_{(x)} -\frac{1}{2}
295+
\end{array}
296+
\right.
297+
\]
298+
299+
\[
300+
\varphi_{p}^{'}(g_{(x)}) =\left\{
301+
\begin{array}{ll}
302+
(pg_{(x)}+1) \ ; \ pg_{(x)} \geq -\frac{1}{2} \\
303+
-\frac{1}{4pg_{(x)}}\ ; \ pg_{(x)} < -\frac{1}{2}
304+
\end{array}
305+
\right.
306+
\]
307+
308+
\[
309+
\varphi_{p}^{''}(g_{(x)}) =\left\{
310+
\begin{array}{ll}
311+
p \ ; \ pg_{(x)} \geq -\frac{1}{2} \\
312+
\frac{1}{4pg_{(x)}^2}\ ; \ pg_{(x)} < -\frac{1}{2}
313+
\end{array}
314+
\right.
315+
\]
277316

278317
\end{document}

0 commit comments

Comments
 (0)