home Forums # Technical Support Can´t find com.*; imports

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #1798

    Hello, I´m a student from Mexico, I´m trying to do an application which may obtain the weather, and with that weather fuzzy may take the information to control a temperature regulator, but when I was looking for the sources to add fuzzy to java, I found the .jar, but the .jar of fuzzy download doesn´t contains the com.*; import that I think I may need to errase my error in my java code.

    Where I can find the com.*; imports D:!!!!!!
    package termo.sensor;
    * @misc{fl::fuzzylite,
    * @author={Juan Rada-Vilela},
    * title={fuzzylite: a fuzzy logic control library},
    * url={http://fuzzylite.com},
    * year={2014}}

    import com.fuzzylite.Engine;
    import com.fuzzylite.term.Triangle;
    import com.fuzzylite.term.Trapezoid;
    import com.fuzzylite.variable.InputVariable;
    import com.fuzzylite.variable.OutputVariable;
    import com.fuzzylite.defuzzifier.Centroid;
    import com.fuzzylite.rule.RuleBlock;
    import com.fuzzylite.rule.Rule;
    import com.fuzzylite.norm.s.EinsteinSum;
    import com.fuzzylite.norm.t.EinsteinProduct;
    * @author 7h3n3w3r4cr4ck3r
    public class TermoSensor {
    * @param args the command line arguments
    public static void main(String[] args) {

    getWeather(“Guadalajara”, “Mexico”);

    Engine engine = new Engine();

    InputVariable inputVariable = new InputVariable();
    inputVariable.setRange(-90.000, 59.000);
    inputVariable.addTerm(new Triangle(“Ideal”, 10.000, 21.010, 30.600));
    inputVariable.addTerm(new Triangle(“Frio”, -26.920, -5.070, 15.000));
    inputVariable.addTerm(new Triangle(“MuyCaliente”, 21.750, 33.670, 45.590));
    inputVariable.addTerm(new Triangle(“DemasiadoFrio”, -60.200, -37.850, -16.990));
    inputVariable.addTerm(new Trapezoid(“ExtremadamenteFrio”, -90.000, -73.610, -54.240, -37.850));
    inputVariable.addTerm(new Triangle(“DemasiadoCaliente”, 36.650, 48.570, 59.000));

    OutputVariable outputVariable = new OutputVariable();
    outputVariable.setRange(-25.000, 80.000);
    outputVariable.fuzzyOutput().setAccumulation(new Maximum());
    outputVariable.setDefuzzifier(new Centroid(200));
    outputVariable.addTerm(new Triangle(“NoCambiar”, 10.000, 20.010, 30.000));
    outputVariable.addTerm(new Triangle(“Enfriar”, -10.800, 3.000, 15.000));
    outputVariable.addTerm(new Triangle(“Calentar”, 28.550, 36.950, 45.350));
    outputVariable.addTerm(new Trapezoid(“Congelar”, -25.000, -13.810, -8.070, 0.000));
    outputVariable.addTerm(new Triangle(“CalentarMucho”, 40.100, 52.700, 65.300));
    outputVariable.addTerm(new Trapezoid(“CalentarExtremo”, 55.850, 64.250, 69.500, 80.000));

    RuleBlock ruleBlock = new RuleBlock();
    ruleBlock.setConjunction(new Minimum());
    ruleBlock.setDisjunction(new Maximum());
    ruleBlock.setActivation(new Minimum());
    ruleBlock.addRule(Rule.parse(“if Temperatura is DemasiadoFrio then Control is CalentarMucho”, engine));
    ruleBlock.addRule(Rule.parse(“if Temperatura is Frio then Control is Calentar”, engine));
    ruleBlock.addRule(Rule.parse(“if Temperatura is Ideal then Control is NoCambiar”, engine));
    ruleBlock.addRule(Rule.parse(“if Temperatura is MuyCaliente then Control is Enfriar”, engine));
    ruleBlock.addRule(Rule.parse(“if Temperatura is ExtremadamenteFrio then Control is CalentarExtremo”, engine));
    ruleBlock.addRule(Rule.parse(“if Temperatura is DemasiadoCaliente then Control is Congelar”, engine));

    private static String getWeather(java.lang.String cityName, java.lang.String countryName) {
    Temper.GlobalWeather service = new Temper.GlobalWeather();
    Temper.GlobalWeatherSoap port = service.getGlobalWeatherSoap();
    return port.getWeather(cityName, countryName);



    in the jfuzzylite zip file downloaded from fuzzylite.com/downloads/ you will find two jars, one containing the sources (jfuzzylite-src.jar) and the other containing the compiled classes (jfuzzylite.jar). You need to add the jfuzzylite.jar to the libraries in your project.

    If you utilize a POM project or want to utilize one, please revise the project located within examples/application.


Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.