How to Let Facilitators Create Scenarios

This feature is available in Broadcast Pro and Broadcast Enterprise only.

Often a facilitator will want to customize a simulation for a group of users.  

Forio Broadcast supports this by allowing the facilitator to create and set a "default run".   The decisions made in this run are applied when any new run is begun by a user in the same simulation group.

For example, suppose the facilitator logged in, set a decision "Initial Price" to 50, and then set the current run as the default run.  When a regular user logs in, the model decision "Initial Price" will be automatically initialized to 50.  Other model variables and decisions can then be based upon that value.

Facilitators can also enter a name and a description of the Run using the Run Fields FD_run_name and FD_run_description.  All new runs will automatically have their name and description set to the same values as the default run.

To allow facilitators to create scenarios, you will need to do the following.

  1. Create a password protected simulation and a simple facilitator home page.

  2. In your model, designate the simulation assumptions you wish the facilitator to set as decisions (if necessary, by changing the "V" to a "D").

  3. Create a decisions form that prompts for simulation assumptions, and optionally, a run name and description.

  4. Include a form field FD_action with a value of "set_default".

  5. Optionally, display the scenario name and description on the simulation main page.

The following sections give an example, based on a simple model of price elasticity.  The facilitator will set the base amount of sales and the price elasticity.  The user will be able to set a price and see the amount of calculated sales and revenue.  

All files used in the following example are available for download:

http://www.forio.com/broadcastdocs/downloads/scenarios.zip

Create a Password Protected Simulation and a Simple Facilitator Home Page

Follow the instructions in these articles.  Name the facilitator page "facilitator.htm" but leave it empty for the moment.

How to Create a Password Protected Simulation

How to Create a Facilitator Page

Designate the Scenario Assumptions

Enter the following model into your simulation.  This model calculates sales and revenue, based on a user entered price and the facilitator set assumptions regarding price sensitivity and base sales.  Notice the the facilitator-set assumptions are decisions marked with a "D".

 
## Simple pricing model

## Price Sensitivity is similar to elasticity.
##
## Setting price sensitivity to 1 means a 10% price decrease
## results in a 10% x 1 = 10% sales increase.
##
## Setting price sensitivity to 2 means a 20% price decrease
## results in a 10% x 2 = 20% sales increase (elastic demand).
##
## Setting price sensitivity to 0 means a 0% price decrease
## results in a 10% x 0 = 0% or no change in sales
## (perfectly inelastic demand).
##

V Price Sensitivity = 2

## Facilitator-set assumptions
D Competitor Price = 100
D Our Initial Price = 100
D Base Monthly Sales = 1000

## Actual user decision
D Our Price = Our Initial Price

## Calculated Results
V Our Sales = IF( Our Price < Competitor Price,
    Base Monthly Sales - MAX ( 0 ,
        ((SAFEDIV0(Our Price , Competitor Price) - 1) *
           Price Sensitivity + 1) * (Base Monthly Sales / 2) ),
         MAX ( 0,((SAFEDIV0(Competitor Price , Our Price) - 1) *
           Price Sensitivity + 1) * (Base Monthly Sales / 2)))

V Our Revenue = Our Price * Our Sales
 

 

Create a Decisions Form in the Facilitator Page

Include the following decisions form in the file "facilitator.htm".  Notice that it prompts for the run name and description as well as several scenario assumptions.

 
<form method="POST" action="facilitator.htm" name="Decisions">

<P>Name: <BR>
<input name="FD_run_name" value="$!Run.BaseRun.Name">

<P>Description<BR>
<textarea name="FD_run_description" rows="5" cols="70">$!Run.BaseRun.Description</textarea>

<P>Base Sales:<BR>#TextDecision('Base Monthly Sales')
<P>Price Sensitivity<BR>#TextDecision('Price Sensitivity')
 

<P>
<input type="submit" name="submitbtn" value="Go">

</form>
 

 

Include the FD_action Parameter

The FD_action parameter tells Forio Broadcast to set the current run as the default run (or, in the case of the second option, to clear the default run entirely).  This does not have to be in the same form as the decisions themselves.  You may want to create a "wizard"-like series of pages that only sets the default run at the end of the sequence.

Put this form field directly before the submit button in the previous example.

 

<P>
<select name="FD_action">
  <option value="set_default_init">Set Scenario</option>
  <option value="clear_default">Clear Scenario</option>
</select>
<input type="submit" name="submitbtn" value="Go">
 

 

Display the Run Name and Description

You can display the run name and description with the following FML.  See the reference $Run for more information.  This shows the name of the current scenario (which is referenced with $Run.BaseRun).  You can also get the name of the current run with $Run.Name.  Typically this will be the same as the name of the scenario, as the run name is initialized to the scenario name.  

 

#if($Run.BaseRun)
<P>Current Scenario: $Run.BaseRun.Name <BR>
 $Run.BaseRun.Description
#else
  <P>No scenario currently set.
#end
 

 

Complete Example

Here is the complete example (using the model shown above).   All the files for this simulation can be downloaded from:

http://www.forio.com/broadcastdocs/downloads/scenarios.zip

 

facilitator.htm

 

<HTML>
<HEAD>
<TITLE>Facilitator Page</TITLE>
</HEAD>

<BODY>
<A href="?FD_action=logout">logout</A><BR>
<A href="index.htm">try the sim</A>

<h2>Set Default Scenario</h2>
#if($Run.BaseRun)
<P>Current Scenario: $Run.BaseRun.Name
#end

<form method="POST" action="facilitator.htm" name="Decisions">
<P>Name: <BR>
<input name="FD_run_name" value="$!Run.BaseRun.Name">

<P>Description<BR>
<textarea name="FD_run_description" rows="5" cols="70">$!Run.BaseRun.Description</textarea>

<P>Base Sales:<BR>#TextDecision('Base Monthly Sales')
<P>Price Sensitivity<BR>#TextDecision('Price Sensitivity')

<P><select name="FD_action">
  <option value="set_default_init">Set Scenario</option>
  <option value="clear_default">Clear Scenario</option>
</select>

<input type="submit" name="submitbtn" value="Go">
</form>
</BODY>
</HTML>
 

 

 

index.htm

 

<HTML>
<HEAD>
<TITLE>Facilitator Page</TITLE>
</HEAD>

<BODY>
<A href="?FD_action=logout">logout</A>

<h2>Scenario</h2>
#if($Run.BaseRun)
<P>Current Scenario: $Run.BaseRun.Name <BR>
 $Run.BaseRun.Description
#else
  <P>No scenario currently set.
#end

<h2>Assumptions</h2>
<P><B>Base Monthly Sales:</B> $Values.get("Base Monthly Sales")<BR>
 <B>Price Sensitivity:</B> $Values.get("Price Sensitivity")

<h2>Results</h2>
<P><B>Our Sales:</B> $Values.get("Our Sales")<BR>
 <B>Our Revenue:</B> $Values.get("Our Revenue")<BR>

<h2>Decisions</h2>

<form method="POST" action="index.htm" name="Decisions">
<P><B>Price:</B> <BR>#TextDecision('Our Price')
<input type="submit" name="submitbtn" value="Go">
</form>

</BODY>
</HTML>