import fuzzylite as fl engine = fl.Engine(name="mam21", description="") engine.input_variables = [ fl.InputVariable(name="angle", description="", enabled=True, minimum=-5.000, maximum=5.000, lock_range=False, terms=[ fl.Bell("small", -5.000, 5.000, 8.000), fl.Bell("big", 5.000, 5.000, 8.000) ]), fl.InputVariable(name="velocity", description="", enabled=True, minimum=-5.000, maximum=5.000, lock_range=False, terms=[ fl.Bell("small", -5.000, 5.000, 2.000), fl.Bell("big", 5.000, 5.000, 2.000) ]) ] engine.output_variables = [ fl.OutputVariable(name="force", description="", enabled=True, minimum=-5.000, maximum=5.000,
import fuzzylite as fl engine = fl.Engine( name="tsukamoto", description="" ) engine.input_variables = [ fl.InputVariable( name="X", description="", enabled=True, minimum=-10.000, maximum=10.000, lock_range=False, terms=[ fl.Bell("small", -10.000, 5.000, 3.000), fl.Bell("medium", 0.000, 5.000, 3.000), fl.Bell("large", 10.000, 5.000, 3.000) ] ) ] engine.output_variables = [ fl.OutputVariable( name="Ramps", description="", enabled=True, minimum=0.000, maximum=1.000, lock_range=False, aggregation=None, defuzzifier=fl.WeightedAverage("Automatic"),
fl.Sigmoid("A", 0.500, -20.000), fl.ZShape("B", 0.000, 1.000), fl.Ramp("C", 1.000, 0.000), fl.Triangle("D", 0.500, 1.000, 1.500), fl.Trapezoid("E", 1.000, 1.250, 1.750, 2.000), fl.Concave("F", 0.850, 0.250), fl.Rectangle("G", 1.750, 2.250), fl.Discrete("H", [ 2.000, 0.000, 2.250, 1.000, 2.500, 0.500, 2.750, 1.000, 3.000, 0.000 ]), fl.Gaussian("I", 3.000, 0.200), fl.Cosine("J", 3.250, 0.650), fl.GaussianProduct("K", 3.500, 0.100, 3.300, 0.300), fl.Spike("L", 3.640, 1.040), fl.Bell("M", 4.000, 0.250, 3.000), fl.PiShape("N", 4.000, 4.500, 4.500, 5.000), fl.Concave("O", 5.650, 6.250), fl.SigmoidDifference("P", 4.750, 10.000, 30.000, 5.250), fl.SigmoidProduct("Q", 5.250, 20.000, -10.000, 5.750), fl.Ramp("R", 5.500, 6.500), fl.SShape("S", 5.500, 6.500), fl.Sigmoid("T", 6.000, 20.000) ]) ] engine.output_variables = [ fl.OutputVariable(name="AllOutputTerms", description="", enabled=True, minimum=0.000,
import fuzzylite as fl engine = fl.Engine(name="invkine2", description="") engine.input_variables = [ fl.InputVariable(name="input1", description="", enabled=True, minimum=-6.287, maximum=17.000, lock_range=False, terms=[ fl.Bell("in1mf1", -5.763, 3.015, 1.851), fl.Bell("in1mf2", -1.624, 3.130, 2.111), fl.Bell("in1mf3", 3.552, 3.193, 2.104), fl.Bell("in1mf4", 8.273, 2.907, 1.985), fl.Bell("in1mf5", 13.232, 2.708, 2.056), fl.Bell("in1mf6", 17.783, 1.635, 1.897) ]), fl.InputVariable(name="input2", description="", enabled=True, minimum=0.000, maximum=16.972, lock_range=False, terms=[ fl.Bell("in2mf1", 0.005, 1.877, 1.995), fl.Bell("in2mf2", 3.312, 2.017, 1.829), fl.Bell("in2mf3", 6.568, 2.261, 1.793), fl.Bell("in2mf4", 10.111, 2.741, 1.978), fl.Bell("in2mf5", 14.952, 2.045, 1.783), fl.Bell("in2mf6", 17.910, 0.824, 1.734)
import fuzzylite as fl engine = fl.Engine(name="membrn2", description="") engine.input_variables = [ fl.InputVariable(name="in_n1", description="", enabled=True, minimum=1.000000000, maximum=31.000000000, lock_range=False, terms=[ fl.Bell("in1mf1", 1.152000000, 8.206000000, 0.874000000), fl.Bell("in1mf2", 15.882000000, 7.078000000, 0.444000000), fl.Bell("in1mf3", 30.575000000, 8.602000000, 0.818000000) ]), fl.InputVariable(name="in_n2", description="", enabled=True, minimum=1.000000000, maximum=31.000000000, lock_range=False, terms=[ fl.Bell("in2mf1", 1.426000000, 8.602000000, 0.818000000), fl.Bell("in2mf2", 16.118000000, 7.078000000, 0.445000000), fl.Bell("in2mf3", 30.847000000, 8.206000000, 0.875000000)
import fuzzylite as fl engine = fl.Engine( name="invkine1", description="" ) engine.input_variables = [ fl.InputVariable( name="input1", description="", enabled=True, minimum=-6.287, maximum=17.000, lock_range=False, terms=[ fl.Bell("in1mf1", -6.122, 2.259, 1.761), fl.Bell("in1mf2", -2.181, 2.095, 2.232), fl.Bell("in1mf3", 2.080, 2.157, 1.314), fl.Bell("in1mf4", 4.962, 2.790, 2.508), fl.Bell("in1mf5", 9.338, 2.506, 1.812), fl.Bell("in1mf6", 13.150, 2.363, 2.267), fl.Bell("in1mf7", 17.789, 1.310, 1.756) ] ), fl.InputVariable( name="input2", description="", enabled=True, minimum=0.000, maximum=16.972, lock_range=False,
fl.Triangle("right", 0.333000000, 0.666000000, 1.000000000) ]) ] engine.output_variables = [ fl.OutputVariable(name="steer", description="direction to steer the vehicle to", enabled=True, minimum=0.000000000, maximum=1.000000000, lock_range=False, aggregation=fl.Maximum(), defuzzifier=fl.Centroid(100), lock_previous=False, terms=[ fl.Bell("left", 0.333000000, 0.166500000, 3.000000000), fl.Bell("right", 0.666500000, 0.166750000, 3.000000000) ]) ] engine.rule_blocks = [ fl.RuleBlock(name="steer_away", description="steer away from obstacles", enabled=True, conjunction=None, disjunction=None, implication=fl.Minimum(), activation=fl.General(), rules=[ fl.Rule.create("if obstacle is left then steer is right", engine),
import fuzzylite as fl engine = fl.Engine(name="slcp", description="") engine.input_variables = [ fl.InputVariable(name="in1", description="", enabled=True, minimum=-0.300, maximum=0.300, lock_range=False, terms=[ fl.Bell("in1mf1", -0.300, 0.300, 2.000), fl.Bell("in1mf2", 0.300, 0.300, 2.000) ]), fl.InputVariable(name="in2", description="", enabled=True, minimum=-1.000, maximum=1.000, lock_range=False, terms=[ fl.Bell("in2mf1", -1.000, 1.000, 2.000), fl.Bell("in2mf2", 1.000, 1.000, 2.000) ]), fl.InputVariable(name="in3", description="", enabled=True, minimum=-3.000, maximum=3.000, lock_range=False, terms=[
import fuzzylite as fl engine = fl.Engine(name="slbb", description="") engine.input_variables = [ fl.InputVariable(name="in1", description="", enabled=True, minimum=-1.500, maximum=1.500, lock_range=False, terms=[ fl.Bell("in1mf1", -1.500, 1.500, 2.000), fl.Bell("in1mf2", 1.500, 1.500, 2.000) ]), fl.InputVariable(name="in2", description="", enabled=True, minimum=-1.500, maximum=1.500, lock_range=False, terms=[ fl.Bell("in2mf1", -1.500, 1.500, 2.000), fl.Bell("in2mf2", 1.500, 1.500, 2.000) ]), fl.InputVariable(name="in3", description="", enabled=True, minimum=-0.200, maximum=0.200, lock_range=False, terms=[
import fuzzylite as fl engine = fl.Engine(name="fpeaks", description="") engine.input_variables = [ fl.InputVariable(name="in1", description="", enabled=True, minimum=-3.000, maximum=3.000, lock_range=False, terms=[ fl.Bell("in1mf1", -2.233, 1.578, 2.151), fl.Bell("in1mf2", -0.394, 0.753, 1.838), fl.Bell("in1mf3", 0.497, 0.689, 1.844), fl.Bell("in1mf4", 2.270, 1.528, 2.156) ]), fl.InputVariable(name="in2", description="", enabled=True, minimum=-3.000, maximum=3.000, lock_range=False, terms=[ fl.Bell("in1mf1", -2.686, 1.267, 2.044), fl.Bell("in1mf2", -0.836, 1.266, 1.796), fl.Bell("in1mf3", 0.859, 1.314, 1.937), fl.Bell("in1mf4", 2.727, 1.214, 2.047) ]) ] engine.output_variables = [ fl.OutputVariable(
import fuzzylite as fl engine = fl.Engine( name="juggler", description="" ) engine.input_variables = [ fl.InputVariable( name="xHit", description="", enabled=True, minimum=-4.000, maximum=4.000, lock_range=False, terms=[ fl.Bell("in1mf1", -4.000, 2.000, 4.000), fl.Bell("in1mf2", 0.000, 2.000, 4.000), fl.Bell("in1mf3", 4.000, 2.000, 4.000) ] ), fl.InputVariable( name="projectAngle", description="", enabled=True, minimum=0.000, maximum=3.142, lock_range=False, terms=[ fl.Bell("in2mf1", 0.000, 0.785, 4.000), fl.Bell("in2mf2", 1.571, 0.785, 4.000), fl.Bell("in2mf3", 3.142, 0.785, 4.000)