The University of Queensland
School of Information Technology & Electrical Engineering
Engg7302 Advanced Computational Techniques in Engineering Assignment 1: Optimization
Due date:
see https://course-profiles.uq.edu.au/student_section_loader/section_5/110834#424311
Where to submit:
This assignment is worth 22% of the total marks for the course.
For this assignment, you must carry out the process of attempting to solve different optimization problems. For each question, you are required to report your results in detail. It should include your best solution and its corresponding solution procedures. If you are asked to solve those sub-questions using MATLAB, then their MATLAB source code is required, and code should be commented in detail.
Marks will be awarded based on how well your submission addresses the above points.
Submit the assignment report via the Blackboard Turnitin assignment
submission system.
Question 1
You have certain types of chicken wire to build a temporary enclosure for holding chicken in your backyard. You have 100m of Type-1 chicken wire, and you want to maximize the area of the enclosure for your given materials.
(a) You plan to build a triangular enclosure (the lengths of three sides are x, y and z, respectively. See Figure 1)
1
y
Figure 1 Triangular enclosure (chicken ho
– Suppose the lengths of two sides have the following relationship: x=y. Please find the
lengths of three sides x, y, z using the Golden Section Search method and Newton¡¯s method. Please convert it to be a one-dimensional optimization problem and provide your Matlab code.
z
(b) You plan to build a quadrilateral enclosure:
x
use).
(20 marks)
Figure 2 General quadrilateral enclosure (chicken house).
As shown in Figure 2, the enclosure is a general quadrilateral (the lengths of four sides are x,y,z,w respectively), and ¡ÏA+¡ÏC= 240o.
– If w=18, please use the Lagrange multiplier method to calculate the lengths of three
sides x, y, z.
Note: You only need to provide the solution procedure and write down the final Lagrange equation; you are not asked to find the values of x,y,z.
For the calculation of area of a general quadrilateral, see http://www.geom.uiuc.edu/docs/reference/CRC-formulas/node23.html
(20 marks)
2
Figure 3 Rectangular enclosure (chicken house).
– If it is a rectangular enclosure, please find the rectangular sides x, y using the Linear Programming (LP) method. Please set up the optimization model and provide your Matlab code (in your code, you should call the matlab function linprog()).
Suggestion:
please use the Taylor series (up to first order) to approximate the nonlinear problem with a
linear one and then solve the converted LP problem iteratively:
x(1)=… % set up initial guess for n=1:N
…
x(n+1) = linprog(x(n)); % that is, you need to set up matrices f,A,b,… based on x(n),
… end
Question 2
% and then call linprog(); parameters f, A,b,…,x(n)
% are associated with your Taylor series approximation.
(20 marks)
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:
Quantity of product A sold
Quantity of product B sold
Price of raw material
9
1
5
13
8
2
17
3
9
8
5
10
10
9
4
15
2
6
Assume the prediction equation is y =c +c x +c x , where c ,c are the prediction i 0 11i 22i 12
parameters on the quantity of products A and B sold, respectively, and c0 is the intercept.
3
y
x
Define x , x as the observations on the quantity of products A and B sold, respectively, 1i 2i
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 a minimum of
the sum of the absolute deviations between the raw material price and its prediction. Please develop an LP model to minimize the sum of the absolute deviations and write
down the tabular form of the formed LP problem.
(20 marks)
(2) Suppose the desired criterion for equation fit is that the fitted data exhibit a minimum of
the largest absolute deviation between the raw material price and its prediction.
Please develop an LP model to minimize the largest absolute deviation and solve the
formed LP problem using the MATLAB function-linprog.
(20 marks)
4