The Scenaria Generation Procedure
 

The following provides guidelines for :



Calculating the number of scenaria

The number of scenaria embedded in the change process model can be calculated using the recursive function provided below. This function is a breath first descent in the change process model. It is first called with the parameter G as the top goal.  In this function, Gi are the sub-goals of G.

Function Calculate(G)
If G participates to a AND resolution Then
C : = 1
For all Gi
C : = C * Calculate(Gi)
Calculate := C
 If G participates to a OR resolution Then
C : = 0
For all Gi
C : = C + Calculate(Gi)
Calculate  := C
If G participates to a AND/OR resolution Then
C : = 0
For all Gi
C : = C + Calculate(Gi)
Calculate := 2C - 1
Else Calculate : = 1
 
End Calculate
Top of the page

Generating scenaria

The procedure for generating all scenaria from the change process model is called Generate(G), where G is a goal and Gi its sub-goals.  It is a recursive procedure that must be initially called with the top goal of the change process model as the parameter, an empty scenario description must be created first. It shall be noticed that this procedure is a simplification of the more general one that transforms a logical formula into a disjunction of conjunctions.

Let G be a change goal and Gi its sub-goals and desS a scenario description under generation (empty at the first place).

Procedure Generate(G)

Concatenate(G, desS)
/* this function extends the scenario description desS with G */

If G participates to a AND resolution

Then For each scenario description desS comprising  G
For each Gi
Concatenate(Generate(Gi), desS)
If G participates to a OR resolution
Then For each scenario description desS comprising  G
Create i-1 copies of desS (called desSi)
For each Gi
Concatenate(Generate(Gi), desSi)
If G participates to a AND/OR resolution
Then For each scenario description desS comprising  G
Create 2i-2 copies of desS (called desSi)
For each of the 2i-1 alternatives Ai
For each goal Gi of Ai
Concatenate(Generate(Gi), desSi)
End Generate
 
Compile the list of scenaria


Copyright  ELEKTRA 1998