Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

ELEC5213 Engineering Optimisation

Assignment 2

Due on Friday 07/04/2023 at 11:59 pm in Week 7

Module 3

Question 1 [5 points]

Consider the following optimisation problem:

minimize   f0 (x) = (x1− 3)2 + (x2− 2)2

subject to   f1 (x) = −x1 − x2 − 1 ≤ 0

f2 (x) = −x1 + 3x2 − 1 ≤ 0

f3 (x) = −x1 − 5x2 − 4 ≤ 0

f4 (x) = 8x1 + x2 16 0

1. Visualise the problem (plot the functions on the x1 -x2 plane). Use Matlab’s functions syms (to create symbolic variables), fcontour (to plot the contour plots of the objective function) and fimplicit (to plot the constraints).

2. Find the optimal solution visually.  Are all constraints binding?  Which constraints are not binding (if any)?

3. Eliminate non-binding constraints (if any) and solve the resulting KKT optimality conditions using Mat- lab’s fsolve.

4. Find the dual optimisation problem. The easiest way is to use Matlab’s Symbolic computation Toolbox. Use gradient to compute symbolic derivatives.

5. Solve the primal and the dual optimisation problems using Matlab’s Optimisation Toolbox. Confirm if the solutions of the primal and the dual problems are same. How about the KKT optimality conditions?

Module 4

Question 2 Single-variable unconstrained minimisation [5 points]

Find the minimum of the function:

f(x) = e 2x + 2x2

using the following approaches separately:

(a) Gradient descent;

(b) Newton’s method;

(c) Secant method.

Please set the limit for iteration as 100, and the termination gap ϵ as 10 3 .

In your report, you should discuss the following aspects:

1. Use different step sizes (at least two) and initial points (at least two) for all approaches.

2. Separately plot the values of x and f(x) until the convergence or the iteration limit.

3. Compare the results and convergence efficiency of all approaches.

4. Analyse impacts of the different step sizes and initial points on the results and convergence efficiency.

NOTE: Make sure that you also submit the Matlab code along with your report.