There are many ways to go about solving an optimization problem with constraints, once you have the constraints written down mathematically as we did in the previous section. Some of these techniques involve a lot of algebra to solve equations, others use matrices and linear algebra to solve large systems of equations simultaneously, others are essentially based on guessing and checking, then changing your guess based on some calculus concepts.
Linear programming (LP) can be used to find solutions to optimization problems when the constraint functions and the objective function are all linear. Such problems typically occur in many operations research situations, such as studying the flow of materials through a network. Because the problem involves only linear functions, there are a variety of algebraic tools to solve them. One commonly used technique is called the simplex algorithm. But don’t let the name fool you; this can be a very sophisticated technique, involving things like slack variables and shadow prices. Nonlinear and dynamic programming methods are modifications to LP that relax some of the conditions so that you can apply these techniques to nonlinear situations.
A more general method of optimization comes from multivariable calculus. Once you have defined all of your constraints, you have determined a feasible region for your solutions. You can then use calculus techniques to find any solutions inside this region, and can use the method of Lagrange multipliers to find possible solutions on the boundary of this region. The downside is that, since any kinds of constraints and objective functions can be used, there is no guarantee that you can solve the problem algebraically. You may need to resort to numerical tools to approximate the solution.
If your problem has only two independent variables, you can always graph the objective function and the constraints and used graphical techniques to approximate the solution. This method fails, though, when dealing with more than two independent variables because you cannot graph such functions easily.
The method we will discuss in this section is a combination of these techniques built into Excel called solver table. This lets us create an objective function, define our input variables, and develop a variety of constraints, both explicit and implicit. The solver table will then locate solutions based on the tools we tell it to use. It will also help us perform sensitivity analysis to find out how much our solutions will change if the inputs or constraints change. It is one thing to give your boss a report claiming that the company needs to do X under conditions Y, but it is much more useful to give him a report that says ”under conditions Y we should do X, but if conditions Z change, we should modify our approach in the following ways...” This second version not only provides knowledge about the current situation, but also helps the decision maker respond to other situations and to anticipate the possible future directions he or she may need to explore.