Examples of JDialogFis


Examples of net.sourceforge.jFuzzyLogic.plot.JDialogFis

   * @param fis
   * @throws Exception
   */
  static void animateFis(FIS fis) throws Exception {
    // Create a plot
    JDialogFis jdf = new JDialogFis(fis, 800, 600);

    // Set different values for 'food' and 'service'. Evaluate the system and show variables
    //    for( double service = 0.0, food = 1; service <= 10; service += 0.1 ) {
    for( double service = 0.0, food = 1; service <= 10; service += 0.1 ) {
      food = service;
      // Evaluate system using these parameters
      fis.getVariable("service").setValue(service);
      fis.getVariable("food").setValue(food);
      fis.evaluate();

      // Print result & update plot
      System.out.println(String.format("Service: %2.2f\tfood:%2.2f\t=> tip: %2.2f %%", service, food, fis.getVariable("tip").getValue()));
      jdf.repaint();

      // Small delay
      Thread.sleep(100);
    }

View Full Code Here

Examples of net.sourceforge.jFuzzyLogic.plot.JDialogFis

    FIS fis = FIS.createFromString(fcl, true);
    System.out.println(fis);

    // Create a plot
    JDialogFis jdf = new JDialogFis(fis, 800, 600);

    // Set different values for 'food' and 'service'. Evaluate the system and show variables
    for( double service = 0.0, food = 1; service <= 10; service += 0.1 ) {
      food = service;
      // Evaluate system using these parameters
      fis.getVariable("service").setValue(service);
      fis.getVariable("food").setValue(food);
      fis.evaluate();

      // Print result & update plot
      System.out.println(String.format("Service: %2.2f\tfood:%2.2f\t=> tip: %2.2f %%", service, food, fis.getVariable("tip").getValue()));
      jdf.repaint();

      // Small delay
      Thread.sleep(100);
    }
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.