/*****************************************************************************/
/*                 Functional Safety Suite Example                           */
/*              Copyright © Thomas Brunnengräber 2014                        */
/*                                                                           */
/* Project: Combination Gates                                                */
/* Version: 2014-05-30                                                       */
/*****************************************************************************/

The project "Combination Gates" demonstrates the capabilities and usage
of Combination gates and Reduced Combination Gates.

As an example the loss of a certain amount of brake capacity of a train is used.
The brake command is transmitted through the train by the brake pipe. If it is
pressurized (5 bar), brakes are released and air reservoirs in each wagon are
filled. When the pressure in the brake pipe decreases, the brake cylinders are
filled from the reservoirs by some special, quite complex valves. 
Typically there is one brake cylinder per wheels, thus four per bogie.
There might be a common cause failure for each part of the brake system.

In tree 'SUB_BOGIE' one bogie is modelled. If m is set to a value > 1, a common
cause factor will be considered between the four cylinders of this bogie. The 
same common cause factor will be considered between the cylinders of different
bogies, if the tree 'SUB_BOGIE' is transfered to higher level trees via
transfer-in gates.

A train consisting of three bogies (a very short train) is modelled in tree
'Train_2of3'. As you can see, the Combination gate is just an abbreviation for
several AND and OR gates. The Reduced Combination gate in contrary first
calculates w and q of its input, then creates a new basic event with these
values (with no common cause factor) and finally calculates the combinatorical
output. Since the complete structure below the gate gets lost, no common causes
of lower events are considered anymore.

The same applies for a train consisting of four bogies, 'Train_2of4'.

The (standard) Combination gate is limited to 4 inputs in Functional Safety 
Suite Version 3.x, since firstly the extension to AND and OR gates gets very
complex for a higher number of inputs, and secondly it typically doesn't make
sense for higher number of inputs (because if there IS a considerable common
cause, its rate will always exceed the rate of two independent faults).
Thus if more inputs are needed (e.g. to model a train with more than 4 bogies),
a Reduced Combination gate is needed.
If you need to consider common causes in lower elements, use an explicit common
cause event somewhere above the Reduced Combination gate (and remember that 
this will be the critical value in the system).

In tree 'Sub_Bogie_noCC_Cyl' also one bogie is modelled, but no common causes
are assumed between the four cylinders due to the "Reduced Combination Gate".
