Example DT-1 - Birthday Party Menu Design
Problem Statement:
Your nine year old daughter is about to have a birthday party and she invited forty of her friends. Of course, you are in charge of serving them lunch. Due to budgetary constraints, you decide to do it yourself rather than have it catered.
You have hamburgers, hot dogs and pizza on the menu. Assume the following:
- Each nine year old will eat 2 items.
- The probability that the first item is a hamburger is 50%.
- If the first item is a hamburger then the second item may be a slice of pizza (60%), another hamburger (30%) or a hot dog (10%).
- If the first item is a slice of pizza (30%) then the second item may be another slice of pizza (60%), a hot dog (20%) or a hamburger (20%).
- If the first item is a hot dog (20%) the second item may be another hot dog (80%), a slice of pizza (10%) or a hamburger (10%).
Determine the number of portions needed for each item.
RENO Solution:
Define a Constant representing the number of children at the party.

Construct the Flowchart as follows:

Step 1: Use a Standard Block to represent the number of children at the party.

Step 2 (Optional): Use a Summing Gate to pass the value down multiple paths. Note that since there is only one incoming path, the Summing Gate here serves a purely organizational purpose, visually marking a point where the paths split. If desired, you can simply join the starting block to the next three blocks, presented in Step 3.

Step 3: Use three Standard Blocks to calculate the number of children who eat hamburgers, the number who eat pizza and the number who eat hot dogs for their first item.



Step 4: (Optional): Use a Summing Gate to pass each value down multiple paths. Each value will be passed to three Standard Blocks, as described in Step 5, and a Summing Gate, as described in Step 6.
Step 5: You will need nine Standard Blocks to calculate the number of children who eat hamburgers, pizza or hot dogs for their second item. Each block will look similar to the one shown next.

This block calculates the number of children who eat a hamburger as their second item, given that their first item was a hamburger. That is, of the 50% of children whose first item was a hamburger (IN), 30% of those choose a hamburger for their second item. The other eight blocks are calculated in the same way.
Step 6: Use three Summing Gates to add the total number of hamburgers, pizza slices and hot dogs needed and pass the values to three Result Storage Blocks. The Summing Gate and Result Storage for hamburgers are shown next.


You will need to perform only one simulation of the Flowchart, since there are no random values.

The values in the simulated Flowchart will help you decide how many hamburgers, pizza slices and hot dogs you will need for the party.

A RENO project with the solution for this example (called "Birthday Party Menu.rnp") is shipped with the software and stored in the Examples\Decision (Event) Trees folder in the application directory (e.g. C:\Program Files\ReliaSoft\RENO\Examples\Decision (Event) Trees\Birthday Party Menu.rnp).


