Example 1: Traffic controller
An example of a fuzzy system is a traffic controller embedded in the traffic lights of an intersection, whose purpose is to minimize the
waiting time of a line of cars in a red light, as well as the length of such line. This controller is defined as follows:
Input variables

Arrival: Rate of car arrivals in a green light, with possible values: Very few, Few, Many and A lot. We will use the discrete range [0,30].

Line: Length of the line of cars in a red light, with possible values: Very Short, Short, Medium and Long. We will use the discrete range [0,30].
Output variable

TimeG: Time (in seconds) of the traffic light's green phase, with possible values: Short, Medium and Long. We will use the discrete range [5,50].
Membership functions: in this example we will be able to choose from triangular functions or trapezoidal functions for each variable.
Rule Base: rules will be specified throughout the exercise.
Next, we will apply Mamdani's method to this example, step by step, with a series of Java applets.
