Solver Tutorial - Defining ConstraintsDefining ConstraintsConstraints reflect real-world limits on production capacity, market demand, available funds, and so on. To define a constraint, you first compute a value based on the decision variables. Then you place a limit (<=, = or >=) on this computed value. General Constraints. For example, if A1:A5 contains the percentage of funds to be invested in each of 5 stocks, you might use B1 to calculate =SUM(A1:A5), and then define a constraint B1 = 1 to say that the percentages allocated must sum up to 100%. Bounds on Variables. Of course, you can also place a limit directly on a decision variable, such as A1 <= 100. Upper and lower bounds on the variables are efficiently handled by most optimizers and are very useful in many problems. Policy ConstraintsSome constraints are determined by policies that you or your organization may set. For example, in an investment portfolio optimization, you might have a limit on the maximum percentage of funds to be invested in any one stock, or one industry group. Physical ConstraintsMany constraints are determined by the physical nature of the problem. For example, if your decision variables measure the number of products of different types that you plan to manufacture, producing a negative number of products would make no sense. This type of non-negativity constraint is very common. Although it may be obvious to you, constraints such as A1 >= 0 must be stated explicitly, because the solver has no other way to know that negative values are disallowed. As another example of a physically determined constraint, suppose you are modeling product shipments in and out of a warehouse over time. You'll probably need a balance constraint, which specifies that, in each time period, the beginning inventory plus the products received minus the products shipped out equals the ending inventory -- and hence the beginning inventory for the next period. Integer ConstraintsAdvanced optimization software also allows you to specify constraints that require decision variables to assume only integer (whole number) values at the solution. If you are scheduling a fleet of trucks, for example, a solution that called for a fraction of a truck to travel a certain route would not be useful. Integer constraints normally can be applied only to decision variables, not to quantities calculated from them. A particularly useful type of integer constraint specifies that a variable must have an integer value with a lower bound of 0, and upper bound of 1. This forces the variable to be either 0 or 1 -- nothing in between -- at the final solution. Hence, it can be used to model "yes/no" decisions. For example, you might use a 0-1 or binary integer variable to represent a decision on whether to lease a new machine. Your model might then calculate a fixed lease cost per month, but also a lower cost per item processed with the machine, if it is used. A solver can help determine whether leasing the machine will yield higher or lower profits. Next: Interpreting Solutions > |
Risk Solver Platform is an integrated superset of Premium Solver Platform and Risk Solver with best-of-breed simulation, best-of-breed optimization, and new stochastic programming and robust optimization capabilities you can't get anywhere else. Premium Solver Platform, our premier tool for conventional optimization, uses new PSI Technology to automatically analyze and transform your Excel model. It solves every type and size of problem, using built-in and plug-in Solver Engines. Premium Solver, our basic upgrade for the Excel Solver, solves up to 10X larger problems at much higher speed, and solves new kinds of problems with our Evolutionary Solver.
Risk Solver Platform is an integrated superset of Premium Solver Platform and Risk Solver with best-of-breed simulation, best-of-breed optimization, and new stochastic programming and robust optimization capabilities you can't get anywhere else. Risk Solver Premium integrates all the features of Premium Solver and Risk Solver, with far superior optimization and higher performance, easier to use simulation, for about the same price as competitive products for Monte Carlo simulation. Risk Solver is the easiest and fastest tool available for risk analysis of your Excel models, using Monte Carlo simulation. Evaluate thousands of scenarios in seconds, and see instantly updated charts and statistics, each time you ask "what if". Software Developer Tools: Solver Platform SDK makes it easy to solve any type or size of optimization problem in your Visual Basic, VB.NET, C/C++, C#, Java, or MATLAB program. And it's easy to deploy your application with our flexible licensing for software vendors and corporate developers. |


