ancmat02.qxd 11/16/06 3:25 PM Page B6B6 • SUPPLEMENT BINTRODUCTION TO OPTIMIZATIONPutting all the constraints <strong>to</strong>gether, we haveConstraintsNormally, we consolidate the entire formulation <strong>to</strong>gether in<strong>to</strong> a standard format, asfollows:Complete Formulation5C 8G 5000 (steel lb)1C 4G 1500 (labor, hr)3C 2G 1000 (machine time, hr)C, G 0 (nonnegativity)Decision variables:C number of camshafts <strong>to</strong> makeG number of gears <strong>to</strong> makeMax: 25C 18G (profit, $)Subject <strong>to</strong> (or, “s.t.”):5C 8G 5000 (steel, lb)1C 4G 1500 (labor, hr)3C 2G 1000 (machine time, hr)C, G 0 (nonnegativity) Linear program (LP)A constrained optimizationproblem in which all thefunctions involving decisionvariables are linear. Feasible solutionA specific combinationof values of the decisionvariables such that all ofthe constraints are satisfied. Infeasible solutionA specific combinationof values of the decisionvariables such that at leas<strong>to</strong>ne of the constraints isviolated. Optimal solutionThe feasible solution with thelargest (for a maximizationproblem) or smallest (for aminimization) objectivevalue.Examining the FormulationThe formulation is a concise mathematical description of the problem. It indicatesthat we want <strong>to</strong> find the values of C and G that produce the largest value of the objectivefunction while satisfying all the constraints. In this formulation all of the relationshipsamong the variables are linear. That is, all expressions involving thevariables C and G consist of a constant multiplied by the variable itself. Combinationsof variables can be added (or subtracted) <strong>to</strong> one another, but there are nononlinear expressions involving variables, such as C 2 , G/C, or C. Thus, this formulationis referred <strong>to</strong> as a linear program (LP), or an LP formulation. A linearprogram (LP) is an optimization problem in which all of the relationships amongthe decision variables are linear. LPs are much easier <strong>to</strong> solve, in general, thanproblems involving nonlinear expressions. The solver built in<strong>to</strong> Excel has the capability<strong>to</strong> solve both linear and nonlinear problems, but if your problem can be formulatedas an LP, it is best <strong>to</strong> do so because its solution algorithm is faster andmore reliable.A feasible solution <strong>to</strong> an optimization problem in general, or an LP as in this case,is a particular combination of C and G that satisfies all of the constraints. An infeasiblesolution violates at least one of the constraints. The optimal solution is the feasiblesolution with the largest (for a “max” problem) or smallest (for a “min” problem)objective function value.Consider the solution C 75, G 200. Is this solution feasible? To determine if itis, evaluate each of the constraints. The amount of steel required would be 5(75) 8(200) 1975 lb, which is less than the 5000 pounds available. Similarly, the solutionrequires 1(75) 4(200) 875 hr labor (less than the 1500 hours available), and
ancmat02.qxd 11/16/06 3:25 PM Page B7SPREADSHEET MODEL DEVELOPMENT • B73(75) 2(200) 625 hr machine time. Both C and G are nonnegative, so this solutionis feasible. Now consider C 300, G 200. Verify that this solution requires3100 pounds steel, 700 hours of labor, and 1300 hours of machine time. Is the solutionfeasible? It satisfies two of the constraints, but violates the machine time constraint.Therefore, this solution is infeasible. The point is that if a solution violateseven a single constraint, the solution is infeasible.Is either one of these solutions the optimal solution? The second solution, C 300and G 200, cannot be optimal because it is not even feasible. The first solution,C 75 and G 200, is at least feasible. Actually, it is one of an infinite number offeasible solutions <strong>to</strong> this problem. However, it is not the optimal solution. You can try<strong>to</strong> find a better feasible solution. In fact, for this small problem, you could probably,using pencil, paper, and a calcula<strong>to</strong>r, find the optimal solution. If the problem werelarger, perhaps with 15 products and 8 constraints, finding the optimal solution bytrial-and-error would be nearly impossible.An ingenious algorithm has been developed <strong>to</strong> solve LPs. It is called the SimplexMethod and was developed by George Dantzig in 1947. Improvements have beenmade in solving large LPs since then, but the Simplex Method is still the most commonmethod for solving them. Learning the intricacies of the Simplex Method is asignificant study in itself. Fortunately, Solver, part of Microsoft Excel, implements theSimplex Method. The user does not need <strong>to</strong> learn the details of the mathematical manipulations,but can focus on developing a high-quality spreadsheet model from analgebraic formulation before setting up the problem in Solver. Once Solver is able <strong>to</strong>find the optimal solution, the user can perform additional analysis <strong>to</strong> gain insight in<strong>to</strong>the business problem. Simplex MethodA mathematical algorithmdeveloped by George Dantzigthat, when implemented insoftware, can solve LPs veryquickly.SPREADSHEET MODEL DEVELOPMENTNow that an algebraic formulation has been developed, we will implement the formulationin the spreadsheet. There is no single way <strong>to</strong> set up an LP in a spreadsheet, butthere are some guidelines that can be established:● Develop a correct, flexible, and documented model, as described in SupplementA. The user should be able <strong>to</strong> use the model in a “what-if” manner, changingany decision variable or coefficient in the model without having <strong>to</strong> change anyformulas.● Divide the worksheet in<strong>to</strong> three sections: one for the decision variables, one forthe objective function, and one for the constraints.● Use the algebraic formulation and the natural structure of the problem <strong>to</strong> guidethe structure of the spreadsheet.● Use one cell for each decision variable.● S<strong>to</strong>re the coefficients of the objective function in separate cells, and use anothercell <strong>to</strong> s<strong>to</strong>re a formula that calculates the value of the objective function (by referring<strong>to</strong> the decision variable cells and the coefficient cells).● Likewise, s<strong>to</strong>re the coefficients of the constraints in cells, and write formulas <strong>to</strong>compute the “left-hand-side” (LHS) value of each constraint. The LHS value isthe value of the constraint expression <strong>to</strong> the left of the , , or sign. Thens<strong>to</strong>re the “right-hand-side” value (RHS value) of each constraint next <strong>to</strong> this formulafor easy comparison. LHS valueThe value of the constraintexpression <strong>to</strong> the left of the, ,or sign. RHS valueThe value of the constraintexpression <strong>to</strong> the right of the, ,or sign.