Advanced Computational Techniques in Engineering Assignment - Optimisation
For this assignment, you are required to carry out the process of attempting to solve different optimisation problems. For each question, you are required to report your results in details.
Question 1 - Suppose a linear equation is to be fit predicting raw material price as a linear function of the quantity of product A and produce B (made of the same raw material) sold given the following data:
Price of raw material
|
Quantity of product A sold
|
Quantity of product B sold
|
5
|
9
|
1
|
2
|
13
|
8
|
9
|
17
|
3
|
10
|
8
|
5
|
4
|
10
|
9
|
6
|
15
|
2
|
Assume the prediction equation is yi = c1x1i + c2x2i, where c1, c2 are the prediction parameters on the quantity of products A and B sold, respectively, and c0 is the intercept. Define x1i, x2i as the observations on the quantity of products A and B sold, respectively, and yi as the observed price. I identifies the ith observation.
(1) Suppose the desired criterion for equation fit is that the fitted data exhibit minimum of the largest absolute deviation between the raw material price and its prediction.
Please define a LP model to minimize the largest absolute deviation.
Write down the tabular form of the formed LP problem.
Solve the formed LP problem using the MATLAB function-linprog.
(2) Suppose the desired criteria for equation fit is that the fitted data exhibit minimum sum of the squared deviations between the raw material price and its prediction. You are then asked to solve the formed least square (LS) problem.
Write down the linear system equation (Ax=B) of the LS problem.
Solve the LS problem using the normal equations approach.
Question 2 - You have certain types of chicken wire to build a temporary enclosure for holding chicken at your backyard. You plan to build a rectangular enclosure (see Figure 1)
You have 50m of Type-1 chicken wire, and you want to maximise the area of the enclosure for your given materials.
Please find the lengths of rectangular sides x1, x2 using the Lagrange Multipliers method. (suggestion: consider a two dimensional (2D) optimisation procedure)
Please find the rectangular sides x1, x2 using the Golden Section Search method. Please provide your matlab code. (Suggestion: please convert the 2D optimisation problem to a 1D optimisation problem using the relationship: 2*(x1+x2) = 50 → x2 = 25-x1.
Please find the rectangular sides x1, x2 using the Newton's Method. Please provide your matlab code.