## Decision Analysis

### The Decision Analytic Advantage

### Here's why you should opt for a decision analytic approach

### The Decision Analytic Process

### Take a quick visual tour of a typical decision analytic process

### DPL Tutorial Videos

### Quickly learn DPL modeling basics via a series of six software video tutorials

### Decision Analytic Videos

### Learn about basic decision analytic tools and concepts via short, simple video tutorials using DPL

## Products

### Product Comparison

### Which version of DPL is right for you?

### What's New in DPL 9

### From game-changing analytics to modeling ease of use

### DPL Product Versions

### DPMX

### A decision analytic portfolio management system

### FREE DPL Pro Trial

### Get started with your FREE DPL Pro Trial today!

### FREE DPL Fault Tree Trial

### Get started with your FREE DPL Fault Tree Trial today!

### Order DPL Now

### Start making better decisions for your business today!

## Industries

### All Industry Examples

### View Real-world DPL Examples by Industry

### Customers

### See our list of satisfied customers by industry.

### Partners

### See a list of experienced consultants who use DPL

## Support

### Register DPL

### Get the latest support & product update information

### Downloads

### Knowledge Base

### Training

### Online, group & customized training on DPL

### Purchase Support

### Don't take unnecessary risks! Keep your DPL Support plan current.

## About Syncopation

### Company History

### Find out more about DPL software's history -- one that spans over 20 years

### Our People

### Meet the folks behind the DPL Software

### Opportunities

### Discover opportunities at Syncopation Software

# DPL 9 Help

# Specifying the Use of a Utility Function *(DPL Code)*

DPL allows you to represent a decision maker's attitude toward risk by one or more utility functions. DPL selects the best alternative for each decision that follows a utility function in the event sequence (or decision tree) based on expected utilities instead of expected values.

DPL provides two ways to define a utility function: One produces an exponential utility function, and the other lets you define any function and its inverse. You can specify multiple utility functions in the same sequence section. Each specification applies only to the subtree below it, and each specification overrides any specification higher in the tree.

__The Built-in Utility Function__

The expression for DPL's built-in exponential utility function is -exp(-V/T), where V is a value and T is the risk tolerance coefficient. To use it, you only need to specify the decision maker's risk tolerance coefficient.

use tolerance 100

The following program uses the built-in exponential utility function; the risk tolerance coefficient is defined as a value called RiskTolerance.

value RiskTolerance = 100; 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}; sequence: use tolerance RiskTolerance and decide to MainDecision: decide to gamble on Demand and receive Revenues - 120 to quit to pay 10 and gamble on MarketForecast then perform MainDecision

The expression for the risk tolerance coefficient cannot contain values that depend on events. Also, this expression cannot contain the state function. Because the specification occurred at the beginning of the sequence section, it applies to the entire tree.

__User-Defined Utility Functions__

You can define your own utility function for converting values into utiles. If you do so, you must also define the inverse utility function for converting utiles to values.

The expressions for the utility function and inverse utility function use a dollar sign ($) to represent the arguments of these functions. For example, the following defines a utility function that is equivalent to the built-in exponential utility function.

use utility -exp(-$/RiskTolerance),-RiskTolerance*log(-$)

The expressions for the utility function and inverse utility function cannot contain values that depend on events. Also, these expressions cannot contain the state function.

The following program is equivalent to the previous one, except it defines a utility function and its inverse with the keyword utility.

value RiskTolerance = 100; 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}; sequence: use utility -exp(-$/RiskTolerance), -RiskTolerance * log(-$) and decide to MainDecision: decide to gamble on Demand and receive Revenues - 120 to quit to pay 10 and gamble on MarketForecast then perform MainDecision

The utility function defined in this program is the same as the default exponential utility function provided by DPL.

You are responsible for ensuring that the two functions are inverses of each other. DPL will perform an analysis with functions that are not inverses, but the results may be meaningless.

The $ argument can appear more than once in a utility function or inverse utility function. For example the following clause could appear in a DPL program.

use utility $ / (1 + $), $ / (1 - $)

In this example, you must make sure that the utility function is never evaluated with an argument of -1 and that the inverse utility function is never evaluated with an argument of 1.

* Versions:* DPL Professional, DPL Enterprise, DPL Portfolio

*See Also*