$               This information is provided by the
$                       Aptronix FuzzyNet
$                 http://www.aptronix.com/fuzzynet 
$                  email fuzzynet@aptronix.com 
$               Aptronix may also be reached by phone
$                       at 408-261-1898 or
$                       FAX at 408-490-2729
$
$
$ FILENAME:	camera/af1.fil
$ DATE: 	29/07/1992
$ UPDATE:	06/08/1992

$ Three inputs, three outputs, decision making
$ for Automatic Focusing System
$ INPUT(S):	Left(Distance), Center(Distance), Right(Distance)
$ OUTPUT(S):	Plau(sibility)_of_Left, Plau(sibility)_of_Center, Plau(sibility)_of_Right

$ FIU HEADER

fiu tvfi (min max) *8;

$ DEFINITION OF INPUT VARIABLE(S)

invar Left "meter" : 1 () 100 [
	Far      (@10, 0,  @40,  1,  @100, 1),
	Medium   (@1,  0,  @10,  1,  @40,  0),
	Near     (@1,  1,  @10,  0)
	]; 

invar Center "meter" : 1 () 100 [
	Far      (@10, 0,  @40,  1,  @100, 1),
	Medium   (@1,  0,  @10,  1,  @40,  0),
	Near     (@1,  1,  @10,  0)
	]; 

invar Right "meter" : 1 () 100 [
	Far      (@10, 0,  @40,  1,  @100, 1),
	Medium   (@1,  0,  @10,  1,  @40,  0),
	Near     (@1,  1,  @10,  0)
	]; 

$ DEFINITION OF OUTPUT VARIABLE(S)

outvar Plau_of_Left "degree" : 0 () 1 * (
	VeryHigh = 1.0,      
	High     = 0.8,
	Medium   = 0.5,
        Low      = 0.3
    );

outvar Plau_of_Center "degree" : 0 () 1 * (
	VeryHigh = 1.0,      
	High     = 0.8,
	Medium   = 0.5,
        Low      = 0.3
    );

outvar Plau_of_Right "degree" : 0 () 1 * (
	VeryHigh = 1.0,      
	High     = 0.8,
	Medium   = 0.5,
        Low      = 0.3
    );

$ RULES

if Left is Near then Plau_of_Left is Medium;
if Center is Near then Plau_of_Center is Medium;
if Right is Near then Plau_of_Right is Medium;

if Left is Near and Center is Near and Right is Near then Plau_of_Center is High;
if Left is Near and Center is Near then Plau_of_Left is Low;
if Right is Near and Center is Near then Plau_of_Right is Low;

if Left is Medium then Plau_of_Left is High;
if Center is Medium then Plau_of_Center is High;
if Right is Medium then Plau_of_Right is High;

if Left is Medium and Center is Medium and Right is Medium then Plau_of_Center is VeryHigh;
if Left is Medium and Center is Medium then Plau_of_Left is Low;
if Right is Medium and Center is Medium then Plau_of_Right is Low;

if Left is Far then Plau_of_Left is Low;
if Center is Far then Plau_of_Center is Low;
if Right is Far then Plau_of_Right is Low;
if Left is Far and Center is Far and Right is Far then Plau_of_Center is High;

if Left  is Medium and Center is Far then Plau_of_Center is Low;
if Right is Medium and Center is Far then Plau_of_Center is Low

end