Package fuzzytester

Source Code of fuzzytester.TesterPlikowLogikiRozmytej

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fuzzytester;

import net.sourceforge.jFuzzyLogic.FIS;

/**
*
* @author DLSV3550
*/
public class TesterPlikowLogikiRozmytej {
    public static boolean CheckRedLightFile(String filename){
                FIS fis = null;
        try{
        fis = FIS.load(filename, true);
        }
        catch(Exception e){
           
            return false;
        }
        finally{
              if(fis != null){
                  try{
                   fis.setVariable("KOLEJKA", new Float("50.0"));
                   fis.setVariable("DROGA_DOCELOWA", new Float("50.0"));
                   fis.setVariable("SWIATLO_CZERWONE", new Float("50.0"));
                   fis.evaluate();
                   fis.getVariable("KONIECZNOSC_ZMIANY");
                   return true;
                  }
                  catch (Exception e){
                      return false;
                  }
             //testujemy zmienne
            }
            else{
            return false;
            }
        }
       
    }
    public static boolean CheckGreenLightFile(String filename){
                FIS fis = null;
        try{
        fis = FIS.load(filename, true);
        }
        catch(Exception e){
           
            return false;
        }
        finally{
              if(fis != null){
                  try{
                   fis.setVariable("KOLEJKA", new Float("50.0"));
                   fis.setVariable("DROGA_DOCELOWA", new Float("50.0"));
                
                   fis.evaluate();
                   fis.getVariable("KONIECZNOSC_PRZEDLUZENIA");
                   return true;
                  }
                  catch (Exception e){
                      return false;
                  }
             //testujemy zmienne
            }
            else{
            return false;
            }
        }
    } 
}
TOP

Related Classes of fuzzytester.TesterPlikowLogikiRozmytej

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.