Crystal Ball example model Groundwater Cleanup.xls contains two decision variables. The decision variable in cell D13 is named Remediation Method. It has a lower bound of 1.00, an upper bound of 3.00, and is defined as a Discrete decision variable with a step size of 1.00. Notice that this definition yields three values, expressed as integers 1, 2, and 3. These are not numeric values, but instead they represent three different remediation methods for groundwater cleanup.
This example model was included with Crystal Ball before new decision variable types were added. Starting with Crystal Ball 11.1.1.0.00, this decision variable can be defined as the Category type, shown in the following code:
Range("D13").Select
CB.DefineDecVarND 1, 3, 1, "Remediation Method", cbDecVarTypeCategoryThis code defines a new decision variable in cell D13 that is identical to the one in Groundwater Cleanup.xls except for the decision variable type. It has a lower bound of 1, an upper bound of 3, a step size of 1, a title of Remediation Method, and a decision variable type of Category. Although a step size is entered for this decision variable type, it is ignored.