Syncopation Software

DPL 9 Help

The Definition Section (DPL Code)

The Definition Section (DPL Code)

Most DPL programs start with a definition section. This section specifies and initializes the components of a decision problem -- decisions, uncertainties, variables, and so on -- and usually contains the bulk of the value model.

There are three components you can define in the definition section:

- Events, which include decisions, chance events, and controlled events

- Variables, which include values, series, arrays, and strings

- Named numeric constants

Definition Order

You may define the elements of a decision problem in any order; you do not have to group all values together or have all decisions appear at the beginning of the definition section. Once defined, you can refer to a named event, value, or other element in subsequent data definitions and in the sequence section. The only limitation is that you cannot refer to a name before it is defined.

Punctuation and Spacing

DPL requires that statements that define elements of a decision problem end with a semicolon. (In contrast, semicolons are not required in the second part of a DPL program, where you define the sequence of events.) Definitions also have punctuation to separate the parts; refer to the punctuation in the examples as a guide. DPL will usually catch punctuation errors during compilation. If it does find such an error, it will return you to the error location.

DPL doesn't care how many lines a definition covers or how many spaces or tabs you include between the words in a definition. The only restriction on spacing is that identifiers (the names of events, states, values, series, and so on) must not include blanks or tabs. Everywhere else, you may space things however you like. For example, the following are all valid definitions.

value Value =100;
value Value1 =     100 ;
chance Profit.{s1,s2} = {.5};
chance Profit . { s1 , s2 } = { .5 } ;

Events and Values

In DPL, an event is something that occurs or is revealed during a decision problem. Thereafter, it exists in one of several mutually exclusive states. Decisions, in this sense, are events whose states are determined by a decision maker, and their states are called alternatives. The states of chance events (sometimes called random variables) are not determined by a decision maker, and they are called outcomes. Outcomes occur with probabilities that you specify or DPL calculates. Controlled events have states that you control with commands or statements in a program. Other events and values can depend on them. They are useful for simplifying the logic in complex decision problems.

You do not have to define and name decisions and chance events to use them in an analysis. You can include unnamed decisions and unnamed chance events in the second part of a program, where you specify the sequence of events. This is described later in the chapter. However, it usually is easier to specify complex decision problems with named decisions and chance events.

Versions: DPL Professional, DPL Enterprise, DPL Portfolio

See Also

Defining Decisions

Defining Chance Events

Defining Controlled Events

Defining Values

Defining Series

Defining Arrays

Defining Strings

Defining Named Constants

The Integer Keyword

Definition Section Shortcuts

Compiler Directives

The Sequence Section

Writing DPL Programs