Examples of FIS


Examples of net.sourceforge.jFuzzyLogic.FIS

  public TestExecutioner() {}

  public List execute(String fileName, String[] inputVariables, int steps, int stepSize) {

    // Load FIS
    FIS fis = FIS.load(fileName, false);
    if( fis == null ) { // Error while loading?
      System.err.println("Can't load file: '" + fileName + "'");
      return null;
    }
    FuzzyRuleSet fuzzyRuleSet = fis.getFuzzyRuleSet();

    // Time recording
    List timeRecords = new ArrayList();
    long startTime;
    int curStep = 0;
View Full Code Here

Examples of net.sourceforge.jFuzzyLogic.FIS

        "   RULE 3 : IF service IS excellent AND food IS delicious THEN tip is generous;\n" + //
        "END_RULEBLOCK\n" + //
        "\n" + //
        "END_FUNCTION_BLOCK\n";

    FIS fis = FIS.createFromString(fcl, true);
    FuzzyRuleSet fuzzyRuleSet = fis.getFuzzyRuleSet("tipper");
    fuzzyRuleSet.chart();

    // Set inputs
    fuzzyRuleSet.setVariable("service", 3);
    fuzzyRuleSet.setVariable("food", 7);
View Full Code Here

Examples of net.sourceforge.jFuzzyLogic.FIS

*/
public class TestMembershipFunctions {

  public static void main(String[] args) throws Exception {
    // Load from 'FCL' file?
    FIS fis = FIS.load("fcl/membershipFunctionsDemo.fcl", false);
    if( fis == null ) return;

    // Show ruleset
    FuzzyRuleSet fuzzyRuleSet = fis.getFuzzyRuleSet();
    fuzzyRuleSet.chart();
  }
View Full Code Here

Examples of net.sourceforge.jFuzzyLogic.FIS

public class TestTipper {

  public static void main(String[] args) throws Exception {
    // Load from 'FCL' file
    String fileName = "fcl/tipper.fcl";
    FIS fis = FIS.load(fileName, true);
    if( fis == null ) { // Error while loading?
      System.err.println("Can't load file: '" + fileName + "'");
      return;
    }

    // Show ruleset
    FuzzyRuleSet fuzzyRuleSet = fis.getFuzzyRuleSet();
    fuzzyRuleSet.chart();

    // Set inputs
    fuzzyRuleSet.setVariable("service", 3);
    fuzzyRuleSet.setVariable("food", 7);
View Full Code Here

Examples of net.sourceforge.jFuzzyLogic.FIS

    System.out.println("ParameterOptimizationDemo: Begin");

    //---
    // Load FIS (Fuzzy Inference System)
    //---
    FIS fis = FIS.load("fcl/qualify.fcl");
    FuzzyRuleSet fuzzyRuleSet = fis.getFuzzyRuleSet();

    //---
    // Create a list of parameter to optimize
    //---
    ArrayList<Parameter> parameterList = new ArrayList<Parameter>();
View Full Code Here

Examples of net.sourceforge.jFuzzyLogic.FIS

  public static void main(String[] args) throws Exception {
    boolean show = true;

    // Load from 'FCL' file
    String fileName = "fcl/zzz.fcl";
    FIS fis = FIS.load(fileName, show);
    if( fis == null ) { // Error while loading?
      System.err.println("Can't load file: '" + fileName + "'");
      return;
    }

    // Get rule set
    FuzzyRuleSet fuzzyRuleSet = fis.getFuzzyRuleSet();

    // Show ruleset
    if( show ) fuzzyRuleSet.chart();

    for( int i = 0; i < 5; i++ ) {
View Full Code Here

Examples of net.sourceforge.jFuzzyLogic.FIS

    image=element.jLoadImage(element.jGetSourcePath()+"icon.png");

    // Load from 'FCL' file

    FIS fis =null;
   
    try
    {
      if (textVar.getValue().length()==0)
      {

        String fileName = element.jGetSourcePath()+"fuzzy.fcl";
        fis = FIS.load(fileName,false);
        textVar.setValue(fis.toStringFCL());

      }else
      {
        fis = FIS.createFromString(textVar.getValue(),false);
      }

    } catch(Exception ex)
    {
       element.jException(" There are Errors in the FLC! : "+ex);
       return;
    }


    if( fis == null )
    { // Error while loading?
        //System.err.println("Error);
        return;
    }
    // Show ruleset
    fuzzyRuleSet = fis.getFuzzyRuleSet();



    Iterator item=fuzzyRuleSet.variablesIterator();
   
View Full Code Here

Examples of 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;
                  }
View Full Code Here

Examples of net.sourceforge.jFuzzyLogic.FIS

            }
        }
       
    }
    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;
                  }
View Full Code Here

Examples of net.sourceforge.jFuzzyLogic.FIS

   * @throws Exception
   */
  public static void main(String[] args) throws Exception {
    System.out.println("Begin TestTipperJava");

    FIS fis = new FIS();

    // FUNCTION_BLOCK tipper
    FunctionBlock functionBlock = new FunctionBlock(fis);
    fis.addFunctionBlock("tipper", functionBlock);

    //    VAR_INPUT             
    //       service : REAL;
    //       food : REAL
    //    END_VAR
View Full Code Here
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.