10.6 Variable Sets - different model inputs, same model
You can create multiple variable sets to store different model input scenarios within a model. Each variable set contains a different set of root node variable definitions. No definitions at other nodes or other model inputs are affected by variable set selection.
We will use the Healthcare example model Markov_PriceThreshold.trex to examine variable sets. (The model type is not important, the functionality of the Variables Sets is important).
In the image above, note the designation of this set of root node variable definitions as "Variable Set: Low Risk Patients" at the right of the Variables View toolbar. This model has two Variable sets, one for low and one for high risk patients.
To create a new variable set:
-
Click the down arrow to the right of "Variable Set: Low Risk Patients".
-
Choose the option Add/Rename Set.
-
Click the "+" icon.
-
Either use the default name "Variable Set 2" (or provide a new name).
-
Click the down arrow to the right of "Variable Set: Default".
-
Choose the new variable set "Variable Set 2" (or the name you provided).
At this point, nothing has changed in the model because the root node variable definitions in the new Variable Set match the ones in the original set. Once you change any variable definitions in the new Variable Set, it becomes a separate set of definitions. If you then return to the Default set, all the variable definitions return to their prior values.
The Healthcare tutorial example Markov_PriceThreshold.trex already has two variable sets - Low Risk Patients and High Risk Patients. Switch between the two sets to see the payoff variables change. Look at the pDieLocal and pDieMets variables
To review the variables which are different between the different Variable Sets, select the Variable Sets Diff Report via the same Variable Sets dropdown menu (as below).
If a variable has the same value in multiple variable sets, when you change the value in one variable set, you will be prompted with the option to apply the same change to additional variable set(s). You can see this below where you are being prompted to change the value of pDieLocal across to the Low Risk Patients group.