Excel Solver
Excel Solver
Mathematics Department
When someone speaks of "linear programming" they are not referring to programming in the sense that someone speaks of today. When the term was introduced in the 1940's, programming was synonymous with scheduling or planning. Linear programming (LP) is a subcategory of mathematical programming.
Basic Steps in the Linear Programming Model Formulation 1. Determine the decision variables. 2. Formulate the objective function. 3. Formulate the constraints.
C o n s t r a i n t s
Example
When solving an LP model we assume that all relevant factors are known with certainty
Sensitivity analysis helps answers questions about how sensitive the optimal solution is to changes in various coefficients in an LP model
The Wyndor Glass Co. problem (Hillier & Lieberman, 1995): The problem concerns a glass manufacturer which uses three production plants to assemble its products, mainly glass doors (x1) and wooden frame windows (x2). Each product requires different times in the three plants and there are certain restrictions on available production time at each plant.
Plant 1 2 3 Profit
The best approach to entering the problem into Excel is first to list in a column the names of the objective function, decision variables and constraints. You can then enter starting values in the cells for the decision variables, usually zero.
LP
On selecting the menu option Tools | Solver the dialogue box shown below is revealed, and if you select the objective cell before invoking Solver the correct Target Cell will be identified. This is the value Solver will attempt either to maximize or minimize.
Excel
Next you enter the range of cells you want Solver to vary, the decision variables. Click on the white box and select cells B9 & B10, or alternatively type them in.
Excel
You can now enter the constraints by first clicking the 'Add ..' button. This reveals the dialogue box shown below.
Excel
Having added all the constraints, click 'OK' and the Solver dialogue box should look like the one below.
Excel
Before clicking 'Solve' it is good practice when doing LPs to go into the Options and check the 'Assume Linear Model' box as this allows Solver to provide more sensitivity information. And if you want to see each step of the calculation, check the 'Show Iteration Results' box.
Excel
After 1 iteration, we have the following solution: x1=0, x2=6 with z=30 which satisfy the linear program max z = 3x1 + 5x2 subject to: x1 <= 4 x2 <= 12 3x1 + 2x2 <= 18 x1, x2 >= 0
Excel 2nd iteration
We have the following optimum solution: x1=2, x2=6 with z=36 which satisfy the linear program max z = 3x1 + 5x2 subject to: x1 <= 4 x2 <= 12 3x1 + 2x2 <= 18 x1, x2 >= 0
Excel 3rd iteration
3rd iteration
Conclusion
Sensitivity Report
We have the following optimum solution: x1=2, x2=6 with z=57 which satisfy the linear program max z = 7.5x1+ 7x2 subject to: x1 <= 4 x2 <= 12 3x1 + 2x2 <= 18 x1, x2 >= 0
If we change the objective coefficients within the allowable range, the optimum solution does not change. Hence, max z=7.5x1 + 7x2 57=7.5(2)+7(6) Hence, max z=5x1 + 8x2 58=5(2)+8(6)
The shadow price of a constraint indicates the amount by which the objective function value changes given a unit increase in the RHS value of the constraint, assuming all
Shadow prices hold only within Right-HandSide (RHS) changes falling within the values in Allowable Increase and Allowable Decrease columns. Shadow prices for nonbinding constraints are always zero.
Sensitivity Report
We change the RHS values to: Plant One =4 Plant Two = 18 Plant Three =24
If we will change the RHS values within the allowable range, we can obtain the increase or decrease in profit without resolving the problem. If we will have the following profit Hence, The increase of 15how many in RHS However, we do not know values: Plant Two = 14 and iseach type by: obtained of product we need to of Plant Three = 22 6(1.5)+6(1) produce. Resolving the problem will Then the increase is equal to give us the new optimal solution. 2(1.5)+4=7 which gives z=43.
The new optimal solution is: x1=2 and x2=9 with z=51
Shadow prices only indicate the changes that occur in the objective function value as RHS values change Changing a RHS value for a binding constraint also changes the optimal solution To find the optimal solution after changing a binding RHS value, you must resolve the problem.
Sensitivity Report
Besides the optimal solution, Solver also produced a sensitivity report which answered questions about amounts objective coefficients can change without changing the solution the impact on the optimal objective function value of changes in the constraint RHS values
Most Filipinos are familiar with Excel Solver provides a simple, yet effective, medium for allowing users to explore linear programs Solver allows users to explore their models in a structured, yet flexible, way
Put the linear program into standard form. Construct the initial simplex tableau with all slack variables in the basic variable set (BVS). The first row in the table contains the coefficients of the objective function.
SF
=0 = 4 + s2 = 12 + s3 = 18
Simplex
7. Go to step 3.
Solver
Step 3
Given the optimum solution: x1=2 and x2=6 with z=36, we conclude that the company must produce: 2 batches of doors per week, 6 batches of windows per week
What is an Objective Function? An objective function is the function of one or more variables that one is interested in either maximizing or minimizing. The function could represent the cost or profit of some manufacturing process.
The basic variable set consists of variables with values greater than zero.
The entering variable is the one with the most negative value (In case of a tie, we select the variable that corresponds to the leftmost of the columns) .
Initial Tableau
The leaving variable is the one with smallest non-negative column ratio (to find the column ratios, divide the RHS column by the entering variable column, wherever possible). In case of a tie we select the variable that corresponds to the up-most of the tied rows.
Initial Tableau
Constraints that are satisfied as equalities at a given point are said to be binding.
Thank you!!!