SOCR ≫ | DSPA ≫ | Topics ≫ |
Apply optim()
to solve the following unconstrained optimization problems:
\(\min_x f(x)=x^4.\)
\(\max_x \left ( 2\sin{x} -\frac{x^2}{10} \right ).\)
\(\max_{x,y} \left (2xy+2x-x^2-2y^2 \right ).\)
Solve the following LP problem: \[ \max_{x_1, x_2, x_3,x_4} \left (x_1 +2x_2 +3x_3+4x_4+5 \right )\] subject to: \[ \left\{ \begin{array}{rl} 4x_1 + 3x_2 + 2x_3+ x_4 & \leq 10 \\ x_1 -x_3 +2x_4 & = 2 \\ x_1 + x_2 + x_3 +x_4 & \geq 1 \\ x_1\geq0, x_3\geq0, x_4 & \geq0 \end{array} \right . . \]
Apply lpSolveAPI
and Rsolnp
and compare the results.
Apply lpSolveAPI
to solve the following MILP problem: \[ \min_{x_1, x_2} ~{4x_1 +6x_2}\] subject to: \[
\left\{
\begin{align}
2x_1 + 2x_2 & \geq 5 \\
x_1 -x_2 & \leq 1 \\
x_1, x_2 &\geq 0 \\
x_1, x_2 & \in \text{ integers}
\end{align} \right. .
\]
Solve the following QP problem: \[ \min_{x_1,x_2} ~{2x_1^2+x_2^2+x_1x_2+x_1+x_2}\] subject to: \[ \left\{ \begin{array}{rl} x_1 +x_2 & = 1 \\ x_1, x_2 &\geq 0 \end{array} \right. . \]
quadprog
to solve the QPRsolnp
to solve the QPnumDeriv
to solve this Lagrange multiplier optimization manuallySolve the following nonlinear problem: \[ \min_{x_1,x_2} \left ( 100(x_2-x_1^2)^2+(1-x_1)^2 \right )\] subject to \(x_1,~x_2\geq 0.\)
Use the example shown in [Chapter 21]http://www.socr.umich.edu/people/dinov/courses/DSPA_notes/21_FunctionOptimization.html). Try to change the noise level and replicate the denoising process and report your findings.