tutorial excel solver

Upload: wilsongouveia

Post on 04-Apr-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 Tutorial Excel Solver

    1/5

    What is Solver Add-In?

    In the real world, we are often confronted with a number of waysof accomplishing a certain objective, some waysbeing better ina certain sense than others. For example, there are many combinationsof products a plant can

    manufacture, and we may be interestedin finding the combination that leads to maximum profit. Thevariables inreal-world situations are subject to restrictionsthat we shall call constraints. In the first place, it is requiredin mostinstances that the variables not take on negative values. Furthermore, certain combinations of the variables are notpermissible. For example, a product mix that requires a plant to operate morethan 24 hours a day obviously is notpermissible, nor is it permissibleto schedule output at levels exceeding plant capacity. The problems sometimes canbe as complicated as having more than 10 constraintson 6 variables. Don't worry because Excel has a powerfuloptimization feature called Solver Add-In which can calculates solution towhat-if scenarios based on adjustablecells, constraint cells,and, optionally, cells that must be optimized. Armed with this tool, we are able to solve largesystems involving up to 200 variablesand 500 constraints in a matter of seconds by setting up a spreadsheet.

    Illustration

    We must use an example to demonstrate the power of the Solver.You run a factory that makes drinking glasses, which use a singlemachine. The machine is available for 60 hr/week.You run on aweekly production schedule where you spend all week producingglasses, accumulating your output in awarehouse. At the end ofeach week you ship out that week's production.You produce two products, juice glasses and wine glasses, themachine takes 6 hours to produce 100 cases of juiceglasses, and5 hours to produce 100 cases of wine glasses. Each case of juiceglasses takes up 10 cubic feet of storagein the warehouse, eachcase of wine glasses takes up 20 cubic feet of storage. The warehouseholds at most 15, 000cubic feet.The net contribution per case of juice glasses to your profit(net of production costs) is $5, and is $4.50 per case ofwineglasses. Your marketing department (your husband, as this is asmall company) estimates that you can sell asmany cases of wineglasses as you can produce, but can sell a maximum of 800 casesof juice glasses per week. Youmust determine a production planthat respects all the limitations (constraints) which maximizestotal net profit.

    Algebraic formulation:Let J=# cases of juice glasses produce per week; W=# cases ofwine glasses produce per week.We want to maximize total net profit, in $: 5J + 4.5*Wsubject toConstraint on machine time, in hours: (6/100)*J + (5/100)*W

  • 7/31/2019 Tutorial Excel Solver

    2/5

    Let's try out the Solver! We first choose the Solver command fromthe Tools menu and then the Solver Parametersdialog box appears. Please do not worry about the edit boxes and the buttons in thedialog box since we'll explainthem in the course of our tutorial.

    You first encounter the Set Target Cell edit box in which you must specify the objective or target. Our objective is tomaximizecell F5. (If you assign a name to the cell, you can enter thename in the box) In this example, we want theSolver to maximizethe target cell, so you have to select Max. If you want to minimizethe target cell, you will have tochoose Min. In some circumstances,you might want the Solver to find a solution that makes the targetcell equal tosome particular value, in which case you would selectthe Value of option and enter an amount, a cell reference,orthe name of a cell in the adjacent edit box.

    In our example, the variable cells lie in the range E2:E3. Youcan either enter cell coordinates, type cell name, orselect cellsin the worksheet. You must enter it at least one cell that theformula in the target cell depends on for itscalculation. Otherwise,the Solver will not perform any calculation.

  • 7/31/2019 Tutorial Excel Solver

    3/5

    Specifying Constraints

    We need to specify constraints by clicking on the Add button inthe Solver Parameters dialog box and completing theAdd Constraintsdialog box.

    Our first constraint is the total time available for the machine(60 hours). The following figure shows how you canexpress thisconstraint.

    In a similar vein, you can express other constraints of the problemby clicking on the Add button. Note that there are4 comparisonoperators at your disposal. We must impose a non-negativity constrainton the changing cells becausewe want to make sure that J andW are positive values. After entering all constraints, you canclick the OK button toreturn the Solver Parameters dialog box.

    Solving the ProblemTo see the result of the Solver, click the Solver Parameters dialogbox. The optimal solution is displayed in theworksheet,

    and the Solver Results dialog box appears.

  • 7/31/2019 Tutorial Excel Solver

    4/5

    You can either save Solver parameters as named scenarios by clickingthe Save Scenario button or restore originalvalues. Saving theSolver parameters provides an excellent way to explore and performfurther what if analysis on a

    variety of possible outcomes.

    Generating Reports

    The Solver can summarize its results in 3 different ways whichprovides you with different views of analysis. Theresults canbe presented in either Answer Report, Sensitivity Report, or LimitsReport.The Answer Report displays the target cell, the changing cells,and the constraints. It also includes slack value foreach constraint.The Limits Report tells you how much the values of the changingcells can be increased or decreased withoutviolating the constraintsof your problem.The Sensitivity Report presents the sensitivity information aboutthe target cell. The detailed information of thisreport willbe delivered in class. The following is the sample of the SensitivityReport.

    Configuring Solver Options

    You can stipulate the time limits or the numbers of iterationsthat the Solver is allowed to reach before it finds aoptimalsolution. You can also specify the precision and the toleranceof the solution. More importantly, you candefine the natureof your model by deciding if it is a linear or nonlinear problem. In class, we always assume ourproblem a linear model; therefore,we activate the Assume Linear Model option as shown below.

  • 7/31/2019 Tutorial Excel Solver

    5/5

    You can also take advantage of the Show Iteration Results optionwhich shows you steps to achieving an optimalsolution. Selectingthis option will make the Solver pause for solutions that breakthe constraints as well as for

    suboptimal solutions.