Syncopation Software

DPL 9 Help

Events and Values with the Same Name (Command Program)

Events and Values with the Same Name (Command Program)

Events and values can share the same names. Consider the following example, in which the name Revenues is used to represent an event as well as the values associated with the states of the event:

chance Revenues.{Low,High} = {.8} = 10,20;

In the program in which Revenues is defined, DPL can distinguish events and values with the same names by the context of the program statements. But in the Command Program, DPL needs to know whether you mean the event or the value because it is not obvious from the context of the commands. To distinguish between events and values with the same name, use just the name of the event to indicate the event and a plus sign preceding the name to indicate the value.

For example, to display the probability distribution of the event Revenues, type the name of the event without a plus sign in the Command Program.


With no plus sign preceding the name, the Session Log displays the marginal distribution of the event Revenues.

-Revenues.s1: 0.8
-Revenues.s2: 0.2

To display the value Revenues, place a plus sign directly preceding the name of the value.

+ Revenues | Revenues.s1 

The Session Log displays the value Revenues associated with the first state of the event Revenues.

+ Revenues | Revenues.s1 = 10

Notice that the state of the event must be specified because the value depends on it as a conditioning event.

If you use Command | Select | Value, DPL will automatically insert the plus sign before the name.

Versions: DPL Professional, DPL Enterprise, DPL Portfolio

See Also

Working in the Command Program

Working with Command Statements

Events and Values with the Same Name (DPL Code)