|
Decision variables are the variables within a model that one can control. They are not random variables. For example, a decision variable might be: whether to vaccinate a population (TRUE or FALSE); the amount of budget to spend (a continuous variable between some minimum and maximum); or how many cars to have in a car pool (a discrete variable between some minimum and maximum).
Clicking the Add button in the Decision variables tab opens the following dialog:
Location is the cell position of the variable to be changed. This cell should already have a fixed possible value entered for the Optimizer to work with. The content of the cell should not be a formula. The Optimizer will change this value during its optimization routine.
Mode provides a list of options: Discrete; Continuous; Boolean; or List. If one chooses ‘List’ the dialog suppresses the Lower bound, Upper bound and Step fields, and make the List field active, for example:
Name is a text field that identifies the decision variable
Lower bound specifies the lower bound of the range of values that can be tested when the Mode is either Discrete or Continuous
Upper bound specifies the upper bound of the range of values that can be tested when the Mode is either Discrete or Continuous
Step specifies the increments between the lower and upper bounds when the Mode is Discrete. This will usually be 1. The difference between Upper Bound and Lower Bound must equal an integer number of Step values.
List specifies the values that will be tried when the Mode is List. This can be entered as a list within curly brackets {..} or a cell range within the spreadsheet (which is generally better modeling practice)
Enabled is a Booelan parameter switching the decision variable definition on and off: TRUE indicates it is active, FALSE indicated that it is disabled.
Entering the information as shown above and selecting OK will add the decision variable definition to the Optimization Settings. In the first instance above, where a value of 3 had previously been in the selected cell, the following formula now appears:
= 3 + VoseOptDecisionDiscrete("# cars","Discrete",4,7,,1,TRUE)
ModelRisk incorporates three functions for defining decision variables to optimize:
VoseOptDecisionContinuous(Name, LowerBound, UpperBound, Enabled) for a continuous variable
VoseOptDecisionDiscrete(Name, LowerBound, UpperBound, Step, Enabled) for a discrete variable
VoseOptDecisionBoolean(Name, Enabled) for a Boolean variable
VoseOptDecisionList(Name, List, Enabled) for a variable taking a value from a list of possible candidates
Options for the function parameters are:
Name: a text field identifying the decision variable to the user
LowerBound: any numerical value
UpperBound: any numerical value greater than LowerBound
List: any set of different numerical values
Step: any positive value with the restriction that (UpperBound – LowerBound)/Step must be an integer value
Enabled: a Boolean parameter taking either TRUE (or equivalently 1) when the decision variable is to be used, or FALSE (or equivalently 0) when the decision variable is not to be used.