Events and Values with the Same Name (DPL Code)

# Events and Values with the Same Name (DPL Code)

Although you cannot have two events with the same name or two values with the same name, you can have an event and a value with the same name. For example, this definition:

`decision Research_Funding.{Low,Medium,High} = 30,52.5,80;`

could be replaced with these two:

```decision Research_Funding.{Low,Medium,High};
value Research_Funding given Research_Funding =
30,52.5,80;```

Values defined with events and values defined separately can be used in exactly the same ways. DPL can tell whether you are referring to the value or to the event by the context.

Remember, though, if you assign numbers to the outcomes of a chance event as part of its definition and this event depends on other events, you must provide one number for each combination of conditioning event states and states of the chance event you are defining. Consider the following definition of the chance event called Research_Cost, which includes the cost of each outcome.

```chance Research_Cost.{Low,Moderate,Outrageous}
given Research_Funding,Research_Time =
//Research_Funding   Research_Time
{0.6,0.2},      //Low                Short
{0.4,0.3},      //Low                Medium
{0.2,0.4},      //Low                Long
{0.4,0.3},      //Medium             Short
{0.4,0.3},      //Medium             Medium
{0.2,0.4},      //Medium             Long
{0.2,0.4},      //High               Short
{0.2,0.4},      //High               Medium
{0.1,0.4}       //High               Long
=
80, 100, 125,   //Low                Short
80, 100, 125,   //Low                Medium
80, 100, 125,   //Low                Long
80, 100, 125,   //Medium             Short
80, 100, 125,   //Medium             Medium
80, 100, 125,   //Medium             Long
80, 100, 125,   //High               Short
80, 100, 125,   //High               Medium
80, 100, 125;   //High               Long```

In this example, the numbers associated with the outcomes of the chance event are the same for all combinations of conditioning event states. The numbers only change with the states of the chance event you are defining. If the value depends only the states of the event whose name it shares, and not on this event's conditioning events, it may be simpler to define them separately.

```chance Research_Cost.{Low,Moderate,Outrageous}
given Research_Funding,Research_Time =
//Research_Funding   Research_Time
{0.6,0.2},      //Low                Short
{0.4,0.3},      //Low                Medium
{0.2,0.4},      //Low                Long
{0.4,0.3},      //Medium             Short
{0.4,0.3},      //Medium             Medium
{0.2,0.4},      //Medium             Long
{0.2,0.4},      //High               Short
{0.2,0.4},      //High               Medium
{0.1,0.4};      //High               Long
value Research_Cost given Research_Cost = 80, 100, 125;
```

In an Influence Diagram, this dependence would be represented by green arrows from Research_Funding and Research_Time to Research_Cost.

Versions: DPL Professional, DPL Enterprise, DPL Portfolio