Solver Linear Problem Solving MAN Micro-computers & Their Applications
Installing Solver for Use File Options Add-ins Solver-ins Data Analysis Solver
What is Linear Programming? A Linear Programming model seeks to maximize or minimize a linear function, subject to a set of linear constraints.
4 Introduction to Linear Programming The Importance of Linear Programming – Many real world problems lend themselves to linear programming modeling. – Many real world problems can be approximated by linear models. – There are well-known successful applications in: Manufacturing Marketing Finance (investment) Advertising Agriculture
Setting up a Linear Problem The Objective Function The Decision Variables (optimal values will be calculated by Solver) The Constraints – Relationships ( >, <, =) – Values
Output The Answer Report The Sensitivity Report
9 Max 8X 1 + 5X 2 (Weekly profit) subject to 2X 1 + 1X 2 1000 (Plastic) 3X 1 + 4X 2 2400 (Production Time) X 1 + X 2 700 (Total production) X 1 - X 2 350 (Mix) X j > = 0, j = 1,2 (Nonnegativity) The Galaxy Linear Programming Model
10 Using Excel Solver – Optimal Solution
11 Using Excel Solver –Answer Report
12 Using Excel Solver –Sensitivity Report
13 The Role of Sensitivity Analysis of the Optimal Solution Is the optimal solution sensitive to changes in input parameters? Possible reasons for asking this question: – Parameter values used were only best estimates. – Dynamic environment may cause changes. – “What-if” analysis may provide economical and operational information.
14 Solver – Unbounded solution
15 Solver does not alert the user to the existence of alternate optimal solutions. Many times alternate optimal solutions exist when the allowable increase or allowable decrease is equal to zero. In these cases, we can find alternate optimal solutions using Solver by the following procedure: Solver – An Alternate Optimal Solution
16 Observe that for some variable X j the Allowable increase = 0, or Allowable decrease = 0. Add a constraint of the form: Objective function = Current optimal value. If Allowable increase = 0, change the objective to Maximize X j If Allowable decrease = 0, change the objective to Minimize X j Solver – An Alternate Optimal Solution
Setup VariantNumberAssemblyPolishPackProfit Total0000 Limit =$B$2*C2+$B$3*C3+$B$4*C4+$B$5*C5 =$B$2*F2+$B$3*F3+$B$4*F4+$B$5*F5
Solution VariantNumberAssemblyPolishPackProfit Total Limit
Note : Analysis below ONLY applies for a single change
21 Range of Optimality – The optimal solution will remain unchanged as long as An objective function coefficient lies within its range of optimality There are no changes in any other input parameters. – The value of the objective function will change if the coefficient multiplies a variable whose value is nonzero. Sensitivity Analysis of Objective Function Coefficients.
What they mean ? Changing the objective function coefficient for a variable Optimal LP solution will remain unchanged – Decision to produce of variant 2 and 6000 of variant 3 remains optimal even if the profit per unit on variant 2 is not actually 2.5. It lies in the range ( ) to 4.50 ( ).
What they mean ? Forcing a variable which is currently zero to be non- zero Reduced Cost column gives us, for each variable which is currently zero (X 1 and X 4 ), an estimate of how much the objective function will change if we make (force) that variable to be non-zero. Often called the 'opportunity cost' for the variable. – profit per unit on variant 1 would need to increase by 1.5 before it would be profitable to produce any of variant 1.
24 Shadow Prices Assuming there are no other changes to the input parameters, the change to the objective function value per unit increase to a right hand side of a constraint is called the “Shadow Price”
What they mean ? Changing the right-hand side of a constraint Shadow Price tells us exactly how much the objective function will change if we change the right-hand side of the corresponding constraint within the limits given in the Allowable Increase/Decrease columns Often called the 'marginal value' or 'dual value' for that constraint. – For the polish constraint, the objective function change will be exactly 0.80.
26 In sensitivity analysis of right-hand sides of constraints we are interested in the following questions: – Keeping all other factors the same, how much would the optimal value of the objective function (for example, the profit) change if the right-hand side of a constraint changed by one unit? – For how many additional or fewer units will this per unit change be valid? Sensitivity Analysis of Right-Hand Side Values
27 Any change to the right hand side of a binding constraint will change the optimal solution. Any change to the right-hand side of a non- binding constraint that is less than its slack or surplus, will cause no change in the optimal solution. Sensitivity Analysis of Right-Hand Side Values
To decide whether the objective function will go up or down use: – constraint more (less) restrictive after change in right-hand side implies objective function worse (better) – if objective is maximise (minimise) then worse means down (up), better means up (down) Hence – if you had an extra 100 hours to which operation would you assign it? – if you had to take 50 hours away from polishing or packing which one would you choose? – what would the new objective function value be in these two cases?
Minimizing Problem Nutritional facts of foods (per 100 g) Bread (500cal) – P 10 g, F 30g, C 60g, Rice (800cal) - P 10 g, F 10g, C 80g, Dahl (700cal) - P 70 g, F 10g, C 20g, Egg (1100cal) - P 80 g, F 15g, C 5g, Suppose we need to minimize our calories (2000cal), while keeping the minimum level of nutritionals. Protein – 300 cal(75g) Fat – 600 cal(67g) Carbohydrate – 1100 cal(275g)
Solver Help