Changing Values (Command Program)

As part of your analysis, you may want to study the effects of different input values on your model. In the Command Program, you can modify the value of one or more value variables without changing the DPL model. After using the let command, you can run your model to generate new outputs. Remember, changes made with the let command remain in effect during subsequent decision and sensitivity analyses, whereas changes made with the set command do not. The ability to modify multiple variables allows you to observe the cumulative effect on outcome distributions and Policy Tree. You cannot use the let command to change the initializations of series or array elements.

Consider the following variables, which are defined in the program as

series UnitSales =
   from 1: 36075,
   from 2 to 5 :UnitSales[$ - 1] * 1.15;
value DMarkToDollars = 1.55;
series SalesDollars =
   from 1 to 5: UnitSales[$]/DMarkToDollars;
chance CostAddition.{3} = {.2,.3};
value MarginalCost | CostAddition = 100,120,140;

In the Command Program you can use the let command to change the value of the values defined in the program.

let DMarkToDollars = 1.7;
SalesDollars[5];

The Session Log displays the new value of SalesDollars[5] using the modified value of DMarkToDollars.

= 37115

In this case, SalesDollars does not depend on any conditioning events. To display a conditioned value, you must always set the state of the conditioning event(s), so DPL knows which number to assign to the conditioned value.

The following commands change a conditioned value and then display all the numbers represented by the value:

let MarginalCost | CostAddition.s2 = 125;
MarginalCost | CostAddition.s1;
MarginalCost | CostAddition.s2;
MarginalCost | CostAddition.s3;

The Log displays the modified numbers represented by value MarginalCost.

= 100
= 125
= 140

To see what impact the changed values have on the optimal Policy Tree, execute the command, and then run a Decision Analysis. The Policy Tree and outcome distributions this run generates will reflect the modified values.

These changes are now part of the compiled code in memory; to remove the modifications, you must recompile the model.

Versions: DPL Professional, DPL Enterprise, DPL Portfolio

See Also

Working in the Command Program