Optimum Engineering Design with MATLAB
Total Page:16
File Type:pdf, Size:1020Kb
Optimization Methods in Engineering Design Prof. Kamran Iqbal, PhD, PE Professor of Systems Engineering College of Engineering and Information Technology University of Arkansas at Little Rock [email protected] Course Objectives • Learn basic optimization methods and how they are applied in engineering design • Use MATLAB to solve optimum engineering design problems – Linear programming problems – Nonlinear programming problems – Mixed integer programing problems Course Prerequisites • Prior knowledge of these areas will be assumed of the participants: – Linear algebra – Multivariable calculus – Scientific reasoning – Basic programming – MATLAB Course Materials • Arora, Introduction to Optimum Design, 3e, Elsevier, (https://www.researchgate.net/publication/273120102_Introductio n_to_Optimum_design) • Parkinson, Optimization Methods for Engineering Design, Brigham Young University (http://apmonitor.com/me575/index.php/Main/BookChapters) • Iqbal, Fundamental Engineering Optimization Methods, BookBoon (https://bookboon.com/en/fundamental-engineering-optimization- methods-ebook) Engineering Design • Engineering design is an iterative process • Design choices are limited due to resource constraints • Design optimization aims to obtain the ‘best solution’ to the problem under constraints. Optimum Engineering Design Conventional design Optimal design Optimum Engineering Design • The optimum engineering design involves: – Formulation of mathematical optimization problem – Solving the problem using analytical or iterative methods Soda Can Design Problem: Design a soda can of 125 푚푙 capacity for mass production. It is desired to minimize the material cost. For simplicity, assume that same material is used for the cylindrical can as well as the two ends. For esthetic reasons, the height to diameter ratio should be at least 2. https://images.google.com/ Insulated Spherical Tank Design Problem: Design an insulated spherical tank of radius 푅, i.e., choose the insulation layer thickness 푡 to minimize the life-cycle costs (over 10 years) of the tank. https://images.google.com/ A Transportation Problem Problem: Goods are to be shipped from 푚 supply points with capacities: 푠1, 푠2, … , 푠푚, to 푛 distribution points with demands: 푑1, 푑2, … , 푑푛. Given the transportation costs 푐푖푗 between nodes pairs 푖 and 푗, find the optimum shipping quantities, 푥푖푗, to minimize the total shipment cost. https://images.google.com/ Open-Box Problem Problem: What is the largest volume for an open box that can be constructed from a sheet of paper by cutting out squares at the corners and folding the sides? https://images.google.com/ Shortest Distance to a Curve Find the shortest distance from a given point (푥0, 푦0) to the curve: 푦 = 푓 푥 . https://images.google.com/ Data-Fitting Problem Problem: Given a set of 푁 data points 푥푖, 푦푖 , 푖 = 1, … , 푁, fit a polynomial of degree 푚 such that the mean square error is minimized. https://images.google.com/ A Manufacturing problem Problem: A manufacturer produces two products: tables and chairs. A table requires 10 kg of material, 5 units of labor, and earns $7.50 in profit. A chair requires 5 kg of material, 12 units of labor, and earns $5 in profit. A total of 60 kg of material and 80 units of labor are available. Find the best production mix to maximize total profit. https://images.google.com/ An Investment Problem Problem: Given the stock prices 푝푖 and the anticipated rates of return 푟푖 associated with a group of investments, choose a mix of securities to invest a sum of $1M in order to maximize return on investment. https://images.google.com/ A Classification Problem 푛 Problem: Given a set of data points: 풙푖 ∈ ℝ , 푖 = 1, … , 푛, with two classification labels: 푦푖 ∈ 1, −1 , find the equation of a hyperplane separating data into classes with maximum inter-class distance. https://images.google.com/ Mathematical Formulation Open-Box Problem What is the largest volume for an open box that can be constructed from a given sheet of paper (8.5”x11”) by cutting out squares at the corners and folding the sides? Formulation: Let 푥 represent the side of the squares to be cut; then, the unconstrained optimization problem is formulated as: max 푓 = 푥(8.5 − 2푥)(11 − 2푥) 푥 Data-Fitting Problem Given a set of 푁 data points 푥푖, 푦푖 , 푖 = 1, … , 푁, fit a polynomial of degree 푚 to the data such that the mean square error is minimized. Formulation: Assume a polynomial of the form: 푦 = 푎 + 푎 푥 + ⋯ + 푚 0 1 푎푚푥 ; then, the unconstrained optimization problem is defined as: 푁 1 푚 2 min 푓 = 2 푦푖 − 푎0 − 푎1푥푖 − ⋯ − 푎푚푥푖 푎0,…,푎푚 푖=1 Shortest Distance to a Curve Find the shortest distance from a given point (푥0, 푦0) to the curve: 푦 = 푓 푥 . Formulation: We want to minimize the Euclidian distance from the give point to the curve, i.e., 1 2 2 min 푓 = 푥 − 푥0 + 푦 − 푦0 푥,푦 2 Subject to: 푦 = 푓(푥) Note, this is a constrained problem Transportation Problem Goods are to be shipped from 푚 supply points with capacities: 푠1, 푠2, … , 푠푚, to 푛 distribution points with demands: 푑1, 푑2, … , 푑푛. Given the transportation costs 푐푖푗 between node pairs 푖 and 푗, find the optimum shipment schedule, 푥푖푗, to minimize the total shipment cost. Formulation: let 푥푖푗denote the shipment from node 푖 to node 푗; then, the optimization problem is formulated as: Objective: min 푓 = 푖,푗 푐푖푗푥푖푗 푥푖푗 Subject to: 푗 푥푖푗 = 푠푖, for 푖 = 1, … , 푚; 푖 푥푖푗 = 푑푗, for 푖 = 1, … , 푛; 푥푖푗 ≥ 0 Note, this is a linear programming problem. Manufacturing problem A manufacturer produces two products: tables and chairs. A table requires 10 kg of material, 5 units of labor, and earns $7.50 in profit. A chair requires 5 kg of material, 12 units of labor, and earns $5 in profit. A total of 60 kg of material and 80 units of labor are available. Find the best production mix to maximize total profit. 푇 Formulation: Let 푥 = [푥1, 푥2] represent the quantities of tables and chairs to be manufactured. Then, max 푓 = 7.5푥1 + 5푥2 푥1,푥2 Subject to: 10푥1 + 5푥2 ≤ 60, 5푥1 + 12푥2 ≤ 80; 푥1, 푥2 ∈ ℤ Note, this is an integer linear programming problem An Investment Problem Given the stock prices 푝푖 and the anticipated rates of return 푟푖 associated with a group of investments, choose a mix of securities to invest a sum of $1M in order to maximize return on investment. Formulation: Let 푥푖 denote the amount of investment 푖 that is selected; then, the investment problem is formulated as: 푛 max 푓 = 푖=1 푟푖푥푖푝푖 푥푖 푛 Subject to: 푖=1 푥푖푝푖 ≤ 1푀, 푥푖 ∈ {0,1} Note, this is a binary integer linear programming problem A Classification problem 푛 Given a set of data points: 풙푖 ∈ ℝ , 푖 = 1, … , 푁, with two classification labels: 푦푖 ∈ 1, −1 , find the equation of a hyperplane separating data into classes with maximum inter-class distance. Formulation: For simplicity, we assume that data points lie in a plane, 2 푇 i.e., 풙푖 ∈ ℝ . Consider a hyperplane: 풘 풙 − 푏 = 0, where 풘 is weight 푇 푇 vector, such that 풘 풙푖 − 푏 ≥ 1 for points labeled as 1, and 풘 풙푖 − 푏 ≤ −1 for points labeled as −1. Then, the optimization problem is formulated as: 1 2 max 풘 풘,푏 2 푇 Subject to: 푦푖 풘 풙푖 − 푏 ≥ 1; 푖 = 1, … , 푁 Soda Can Design Design a soda can of 125 푚푙 capacity for mass production. It is desired to minimize the material cost. For simplicity, assume that same material is used for the cylindrical can as well as the two ends. For esthetic reasons, the height to diameter ratio should be at least 2. Mathematical formulation: Design variables: height (ℎ), diameter (푑) 1 2 Objective: 푚푖푛 푓 = 휋푑 + 휋푑ℎ (surface area) ℎ,푑 2 1 2 Constraints: g : 휋푑 ℎ = 125 (volume) 1 4 푔2: ℎ ≥ 2푑 (height) Insulated Spherical Tank Design Choose the insulation layer thickness 푡 to minimize the life-cycle costs (over 10 years) of a spherical tank of radius 푅. Mathematical formulation: Life cycle costs: 푐2퐴푡 + 푐3퐺 + 푐4퐺 ∗ 푝푤푓 – Surface area: 퐴 = 4휋푅2 [푚2] 퐴 – Annual heat gain: 퐺 = 365 × 24 × Δ푇 × 퐶1푡 – Thermal resistivity per unit thickness: 퐶1 3 – Equipment insulation cost: 푐2 $/푚 – Equipment refrigeration cost: 푐3 $/푊ℎ – Annual operating cost: 푐4 $/푊ℎ 퐴 1 – Present worth factor: 푝푤푓(10, 0.1) = 1 − 푖 1+푖 푛 Classification of Optimization problems • Nonlinear programming (NP) problems – Objective function and constraints are nonlinear • Convex optimization problems – Feasible region is a convex set, objective function and inequality constraints are convex, and equality constraints are linear • Linear programming (LP) problems – Objective function and constraints are linear • Mixed integer programming (MIP) problems – Some of the design variables take on values over a finite set • Binary integer programming problems – The design variables take on values over 0,1 The General Optimization Problem • Let 풙 = 푥1, 푥2, … , 푥푛 denote the vector of design variables; then the general optimization problem is mathematically defined as: 푛 Objective: min 푓 풙 , 풙 ∈ ℝ 풙 Subject to: 푔푖 풙 ≤ 0, 푖 = 1, … , 푙 (inequality constraints) ℎ푖 풙 = 0, 푖 = 푙 + 1, … , 푚 (equality constraints) 푥푗 ∈ 풮, 푗 = 1, … , 푘 (discrete variables) 퐿 푈 푥푗 ≤ 푥푗 ≤ 푥푗 , 푗 = 푘 + 1, … , 푛 (continuous variables) The feasible region • Let 풙 = 푥1, 푥2, … , 푥푛 denote the vector of design variables. Consider the optimization problem: 푛 Objective: min 푓 풙 , 풙 ∈ ℝ 풙 푔푖 풙 ≤ 0, 푖 = 1, … , 푙; Subject to ℎ푖 풙 = 0, 푖 = 푙 + 1, … , 푚; 퐿 푈 푥푗 ≤ 푥푗 ≤ 푥푗 , 푗 = 1, … , 푛 • The set Ω = 푥: ℎ푖 풙 = 0, 푔푗 풙 ≤ 0, 푥푖퐿 ≤ 푥푖 ≤ 푥푖푈 is termed as the feasible region for the problem. Convex Optimization Problems • Consider a general optimization problem: min 푓(풙) 풙 푔푖 풙 ≤ 0푖, 푖 = 1, … , 푙 Subject to ℎ푖 풙 = 0, 푖 = 푙 + 1, … , 푚 퐿 푈 푥푗 ∈ 푥푗 , 푥푗 , 푗 = 1, … , 푛 • The feasible region is defined by: 푆 = {풙: 푔푖 풙 ≤ 0, ℎ푗 풙 = 0}.