Unit 9.2 Analysing and Managing Business Data 4BUS1149 Optimization: Formulating the Problem 1 Introduction • In the last sub-unit, we demonstrated a trial and error approach to a typical optimisation problem. This was found to be unsatisfactory even when only a small number of variables and constraints are involved • In this sub-unit we will formulate problems mathematically. • Using this formulation, in the final sub-unit, we will the enter the details into Excel and find the optimal solution using Excel’s Solver. 2 Steps involved in solving an optimisation problem Understand and summarise the problem Define the decision variables Write the objective function Write the constraints We will then be in a position to: Develop the spreadsheet model and use Solver Analyse and interpret the results Reminder: Optimisation Example 1 An office needs photocopiers in a print area covering 19.2 m2. QuickCopy can make 15,000 copies per week it costs £120 a week to rent and takes 2.5 square metres of floor space. FastPrint can make 18,500 copies per week it costs £150 a week to rent and takes 1.8 square metres of floor space. Maximise the number of copies given a weekly budget of £1200. 4 Example 1: Finding the optimal plan Reminder: Summary of Example 1 QuickCopy FastPrint Number rented ? ? Copies per unit 15000 18500 Maximise Resource - cost £120 £150 £1200 available 2.5 m2 1.8 m2 Resource - space 19.2 m2 available 5 Example 1: Decision Variables How many of each type of copier should we buy? Let Q be the number of QuickCopy and let F be the number of FastPrint. Q and F are the Q and F represent the number of copiers bought. decision variables We might buy 0 or 1 or 2 or 3 or 4 or ... . Q and F cannot be negative We have the two constraints Q ≥ 0 and F ≥ 0. 6 Example 1: Objective Function QuickCopy FastPrint Number rented Q F Copies per unit 15000 18500 Maximise Resource - cost £120 £150 £1200 available 2.5 m2 1.8 m2 Resource - space Q.F non-negative 19.2 m2 available Objective We want to maximise the number of copies, C. The number of copies, C, is given by C = 15000Q + 18500F 15000 copies on each QuickCopy. Q are bought. C is the objective function 18500 sheets on each FastPrint. F are bought. 7 Example 1: Constraint - Cost QuickCopy FastPrint Number rented Q F Copies per unit 15000 18500 Maximise Resource - cost £120 £150 £1200 available 2.5 m2 1.8 m2 Resource - space Q.F non-negative 19.2 m2 available Constraints (i) cost QuickCopy costs £120 per week and FastPrint costs £150 per week. The cost of rental, R, is given by R = 120Q + 150F The budget available for rental is £1200 so R ≤ 1200. This constraint gives 120Q + 150F ≤ 1200 used ≤ available 8 Example 1: Constraint - Space QuickCopy FastPrint Number rented Q F Copies per unit 15000 18500 Maximise Resource - cost £120 £150 £1200 available 2.5 m2 1.8 m2 Resource - space Q.F non-negative 19.2 m2 available Constraints (ii) space QuickCopy needs 2.5 m2 of space and FastPrint needs 1.8 m2 of space. The space needed, S, is given by S = 2.5Q + 1.8F The space available is19.2 m2 so S ≤ 19.2. This constraint gives 2.5Q + 1.8F ≤ 19.2 used ≤ available 9 Example 1: Mathematical Formulation Decision variables Q = number of QuickCopy F = number of FastPrint Objective function Maximize C = 15000Q +18500F Constraints Q and F are non-negative Q ≥ 0, F ≥ 0 Cost 120Q + 150F ≤1200 Space 2.5Q + 1.8F ≤ 19.2 10 Example 1: Feasible Region The four constraints, Q ≥ 0, F ≥ 0, 120Q + 150F ≤ 1200, 2.5Q + 1.8F ≤ 19.2 form the feasible region. F Q Only the points within the feasible region satisfy the constraints. We want to find which point maximises the number of copies. 11 Optimisation Example 2 An Indian clothing manufacturer makes 2 products: – Kurta (Sherwani) – Trousers Both have a similar production requirements: – Fabric – Labour time. • A Kurta requires 2.5 metres of fabric and take 3 hours to make • Trousers require 2 metres of fabric and take 1.5 hours to make In the next week there are 300 metres of fabric and 275 hours of labour time available. Each Kurta yields a profit of £7 and each pair of Trousers £5. Maximise profit. 12 Example 2: Summary It may be helpful to summarise the data given. Kurta Trousers Number made ? ? Profit per unit 7 5 Maximise 2.5 2 300 available 3 1.5 275 available Resource - Fabric Resource - labour time 13 Example 2: Decision Variables How many of each type should we make? Let K be the number of Kurta (Sherwani ) and let T be the number of Trousers . K and T are the K and T represent the number of each item made. decision variables We might make 0 or 1 or 2 or 3 or 4 or ... . K and T cannot be negative We have the two constraints K ≥ 0 and T ≥ 0. 14 Example 2: Objective Function Kurta Trousers Number made K T K, T non negative Profit per unit (£) 7 5 Maximise Resource - Fabric 2.5 2 300 available 3 1.5 275 available Resource - labour time Objective We want to maximise profit, P. P is the objective function The profit, P, is given by A. B. C. D. P = 7K + 5T P = 12(K + T) P = 12K + 12T P = (7+K) + (5+T) 15 Example 2: Objective Function We want to maximise profit, P. P is the objective function The profit, P, is given by P = 7K + 5T £7 profit on each kurta. x are made. £5 profit on each pair of trousers. y are made. 16 Example 2: Constraint – Fabric Kurta Trousers Number made K T K, T non negative Profit per unit (£) 7 5 Maximise 2.5 2 300 available 3 1.5 275 available Resource - Fabric Resource - labour time Resources (i) Fabric Kurta use 2.5 metres of fabric K are made. 2.5K Trousers use 2 metres of fabric T are made. 2T The fabric used, F, is given by F = 2.5K + 2T The fabric available is 300 metres so F ≤ 300 giving the constraint 2.5K + 2T ≤ 300 used ≤ available 17 Example 2: Constraint – Labour Time Kurta Trousers Number made K T K, T non negative Profit per unit (£) 7 5 Maximise Resource - Fabric 2.5 2 300 available 3 1.5 275 available Resource - labour time Resources (ii) labour time The constraint for labour time is: A. 3K + 1.5T ≥ 275 B. 3K + 1.5T ≤ 275 C. 3K + 1.5T = 275 18 Example 2: Constraint – Labour Kurta Trousers Number made K T K, T non negative Profit per unit (£) 7 5 Maximise Resource - Fabric 2.5 2 300 available 3 1.5 275 available Resource - labour time Resources (ii) labour time A kurta uses 3 hours of labour time. K are made. 3K Trousers use 1.5 hour of labour time. T are made. 1.5T The total labour time used, L, is given by L = 3K + 1.5T The labour time available is 275 hours so L ≤ 275 giving the constraint 3K + 1.5T ≤ 275 used ≤ available 19 Example 2: Mathematical Formulation Kurta Trousers Number made K T K, T non negative Profit per unit (£) 7 5 Maximise Resource - Fabric 2.5 2 300 available 3 1.5 275 available Resource - labour time Decision variables K = number of Kurta (Sherwani) T = number of Trousers Objective function Maximize P = 7K +5T Constraints K and T are non-negative Fabric Labour time K ≥ 0,T ≥ 0 2.5K + 2T ≤ 300 3K + 1.5T ≤ 275 20 Example 2: Feasible Region The four constraints, K ≥ 0, T ≥ 0, 4K + 3T ≤ 240, 2K + T ≤ 100 form the feasible region. T K Only the points within the feasible region satisfy the constraints. We want to find which point maximises the profit. 21 Optimisation Example 3 A company makes (window) frames and doors. It makes a profit of £20 on a frame and £25 on a door. Each frame require 6 units of materials, 3 units of machine time and 2 units of labour. Each door requires 5 units of materials, 4 units of machine time and 1 unit of labour. The resources available are 4000 units of materials, 2600 units of machine time and 2000 units of labour. Find the production plan to maximise profit. 22 Example 3: Summary Frame Door Number made ? ? Profit per unit 20 25 Maximise Resource - materials 6 5 4000 available Resource – machine time 3 4 2600 available Resource - labour 2 1 2000 available 23 Example 3: Decision Variables How many of each type should we make? Let F be the number of frames and let D be the number of doors. F and D represent the number of each item made. We might make 0 or 1 or 2 or 3 or 4 or ... . F and D are the decision variables F and D cannot be negative This gives two constraints. What are these constraints? A. B. C. D. F ≤ 0, D ≤ 0 F ≥ 0, D ≥ 0 F+D≥0 F = 0, D = 0 24 Example 3: Objective Function Frame Door Number made ? ? Profit per unit 20 25 Maximise Resource - materials 6 5 4000 available Resource – machine time 3 4 2600 available Resource - labour 2 1 2000 available Objective We want to maximise profit, P. P is the objective function The profit, P, is given by P = 20F + 25D £20 profit on each frame. F are made. £25 profit on each door. D are made. 25 Example 2: Constraint – Materials Frame Door Number made ? ? Profit per unit 20 25 Maximise Resource - materials 6 5 4000 available Resource – machine time 3 4 2600 available Resource - labour 2 1 2000 available Resources (i) materials The constraint for materials is of the form: aF + bD ≤ c The values of a, b and c are: A. B. C. D. a = 11, a = 6, a = 5, a = 11, b = 11, b = 5, b = 6, b = 10, c = 8600 c = 4000 c = 4000 c = 8600 26 Example 3: Constraint – Materials Frame Door Number made ? ? Profit per unit 20 25 Maximise Resource - materials 6 5 4000 available Resource – machine time 3 4 2600 available Resource - labour 2 1 2000 available Resources (i) materials A frame uses 6 units of materials. F are made. A door uses 5 units of materials. D are made. 6F 5D The total of materials used, M, is given by M = 6F + 5D The materials available is 4000 units so M ≤ 4000 giving the constraint 6F + 5D ≤ 4000 used ≤ available 27 Example 3: Mathematical Formulation Frame Door Number made ? ? Profit per unit 20 25 Maximise Resource - materials 6 5 4000 available Resource – machine time 3 4 2600 available Resource - labour 2 1 2000 available Exercise: Complete the mathematical formulation Decision variables: F = number of frames D = number of doors Objective function: Maximize Constraints: F and D are non-negative materials machine time labour ……………… ……………… ……………… ……………… ……………… Example 3: Mathematical Formulation Frame Door Number made ? ? Profit per unit 20 25 Maximise Resource - materials 6 5 4000 available Resource – machine time 3 4 2600 available Resource - labour 2 1 2000 available Exercise Answers: Complete the mathematical formulation Decision variables: F = number of frames D = number of doors Objective function: Maximize Constraints: x and y are non-negative materials machine time labour P = 20F +25D F ≥ 0, D ≥ 0 6F + 5D ≤ 4000 3F + 4D ≤ 2600 2F + D ≤ 200029 Example 3: Feasible Region The five constraints, F ≥ 0, D ≥ 0, 6F + 5D ≤ 4000, 3F + 4D ≤ 2600, 2F + D ≤ 2000 form the feasible region. D F Only the points within the feasible region satisfy the constraints. We want to find which point maximises the profit. 30 Solving an optimisation problem using Excel • Now that we have formulated the problem mathematically, we can build the model in Excel. • We can then use the Solver Add-In to find the optimal solution. We will look at this in the next sub-unit. 31 Student Tasks • Try the ‘Unit 9.2 Formulating Optimisation Problems Quiz’ to check your understanding and follow the feedback if you make any mistakes. • When you feel confident with this topic, go on to the next session in the unit. 32