Assignment title: Information


49928: Design Optimisation and Manufacturing Question 1: (we use the following example from lecture slides to describe the process) Exhaustive Enumeration (4 marks) Brief explanation of the code. Result Code in appendix Branch and Bound (4 marks) Result Explanation of the code in the report: Explain the purpose of each code, the order of running the code, include enough comments in the code. Tree structure– please refer to the following example structure Tree structure: (the model above is used here, it is not for Assignment 2) For every node (e.g. node 0 to node 14), the following items should be included: (1) The node number, for example, node 2 means the second step. (2) The condition, for example, "x2=1.5" (3) The optimal point under this condition, for example (1.5, 1.5, 1.67) means x1=1.5, x2=1.5, x3=1.67 (4) The optimal function value under this condition, for example, f*=0.15 (5) The reason why this node is not expanded. For example, node 1 is not expanded because its optimal function value is bigger than the incumbent solution at node 7. So ">Node 7" is added. Another example is node 6 since it is a leaf node and hence "leaf node" is added. (6) " * " when the function value of this node is the least in its level. For example, node 2, node 3, node 7 and node 13. (7) " ** " when a node is the final optimal solution. The final solution should include " * " and " leaf node". For example, node 7 is a leaf node with " * " and it is the final solution. However, node 13 is also a leaf node with " * ", but its function value is bigger than the value of node 7 and hence it is not the final solution. Moreover, a new tree is required when a node is expanded. In this way, every tree only contains two levels—the root of this tree and its children. Below are the three trees for the model above (the trees can be drawn by hand). Tree 1: Tree 2: Tree 3: Appendix: MATLAB code or Excel spreedsheet. Code for Exhastive enumeration % Min: f(x1,x2,x3) = (x1 -2)^2 + (x1 - x2)^2 + (x1 - x3)^2 +(x2 - x3)^2 % % Continous variable: x1 % Discrete Variable : x2 -> [0.5 1.5 2.5 3.5] % x3 -> [0.25 0.75 1.75 2.25 2.75] %------------------------------------------------------------- format compact clear clc % Using symbolic calculations syms x1 x2 x3; a = 2; bv = [0.5 1.5 2.5 3.5]; cv = [0.22 0.75 1.73 2.24 2.78]; f = (x1 -a)^2 + (x1 - x2)^2 + (x1 - x3)^2 +(x2 - x3)^2; % the problem is formulated such that the unconstrained solution % at x1* = 2 = x2* = x3* and f* = 0 % technically the kuhn tucker condition gradx1 = diff(f,x1) fprintf('\nDiscrete Optimization: Exhaustive enumeration\n') fprintf('-----------------------------------------------\n') for i = 1:length(bv) for j = 1:length(cv) x2 = bv(i); x3 = cv(j); % to save computation time symbolic computation % can be avoided by solving numerically - not done here aaa=solve(gradx1,'x1') x1 = subs(aaa) %x1 = subs(xx); fex(i,j) = subs(f); x1ex(i,j) = x1; end end fprintf('discrete variable x2: \n'),disp(bv) fprintf('discrete variable x3: \n'),disp(cv) fprintf(['optimal value of continuous variable x1:' ... '\nfor each combination of discrete variable\n']),disp(x1ex) fprintf(['\noptimal value of objective function:' ... '\nfor each combination of discrete variable\n']),disp(fex) Question 2: Mathematical model: (1 mark) The variables are defined as ….. The objective function is … The constraints are … So the mathematical model of the problem is … (the model here is from the Lecture slides, not for assignment 2) Exhaustive Enumeration (2 marks) Similar to Question 1. Branch and Bound (4 marks) Similar to Question 1. Appendix: MATLAB code or Excel spreedsheet. Similar to Question 1.