Statenames Shortcut (DPL Code)

If you don't want to name the states of an event, you can define events without state names. DPL will supply default state names. For example, the following statement defines a decision called Invest that has two alternatives.

decision Invest.{2};

In the program you can refer to these alternatives as Invest.s1 and Invest.s2. Whenever the states of an event are unnamed, DPL provides the generic names s1, s2, s3, and so on (or S1, S2, S3, and so on). If an event has only two states, DPL also allows you to call them t (for true) and f (for false), or y (for yes) and n (for no), respectively. You can also use uppercase letters: T, F, Y, and N. For example, you could refer to the first alternative of the decision called Invest as Invest.y or Invest.T.

If you do not specify the number of alternatives or list their names, DPL will generate two unnamed states. The following definition is equivalent to the one above.

decision Invest;

If you define a chance event without specifying state names, you should still provide probabilities.

chance MarketPrice.{4} = {0.1, 0.3, 0.4};

In the program, you refer to the outcomes as MarketPrice.s1, MarketPrice.s2, MarketPrice.s3, and MarketPrice.s4.

If you define a chance event without probabilities, DPL will assign a uniform distribution to it.

chance MarketPrice.{4};

For this example, each state of MarketPrice will have a probability of 0.25.

Versions: DPL Professional, DPL Enterprise, DPL Portfolio

See Also

The Definition Section