Syncopation Software

DPL 9 Help

Setting the State of an Event (DPL Code)

Setting the State of an Event (DPL Code)

At any point in the sequence of events, DPL allows you to specify the occurrence of a particular state of an event (chance event, decision, or controlled event). This is called setting the state of the event. Set the state of an event with the keyword set. If you set the state (outcome) of a chance event, that outcome effectively has a probability of 1.0 at that point in the decision tree, regardless of the initial probabilities contained in the event's definition. If you set the state (alternative) of a decision, that alternative is selected regardless of the expected values associated with other alternatives. (DPL does not even explore the other alternatives to see if they are optimal.) The only way you can include a controlled event in the sequence section of a program is by setting its state.

You can only set the state of a decision or chance event if it has not occurred previously along that path through the decision tree. Also, once you set the state of a decision or chance event, you cannot use keywords like decide or gamble to make the event occur at a subsequent point along the same path. In contrast, you can set the state of a controlled event several times along any path.

decision Invest.{Yes,No};
chance Demand.{High,Average,Low} = {0.3,0.3};
value Revenues given Demand = 200, 150, 50;
chance MarketForecast.{High,Average,Low} given Demand =
   {0.7,0.2}, {0.15,0.7}, {0.1,0.2};
   to MainDecision: decide
      on Invest.Yes then
         set Demand.High and receive Revenues - 120
      on Invest.No and quit
   to pay 10 and gamble on MarketForecast then
         perform MainDecision

Versions: DPL Professional, DPL Enterprise, DPL Portfolio

See Also

The Sequence Section