[Gambas-user] A new componet named [gb.fuzzy] now can do fuzzy logic in Gambas
Benoît Minisini
benoit.minisini at gambas-basic.org
Sat Dec 9 14:46:25 CET 2023
Le 09/12/2023 à 14:17, kk a écrit :
> Good night!
>
> recently, I find
> The FuzzyLite Libraries for Fuzzy Logic Control
> can be used in gambas. and I make a component for it .
> the fuzzy model is complicated, professional designe is needed.
>
> With a model file , one can set InputVariable, process, and get
> OutputVariable.
> the same result just like the basic example did.
>
> Public Sub Main()
>
> Dim ae As FuzzyLite
> ae = New FuzzyLite("/home/deuser/fuzzy/ObstacleAvoidance.fll")
> Dim ai As New FuzzInputVariable
> ai.GetInputVariable(ae, "obstacle")
>
> Dim ap As New FuzzOutputVariable
> ap.GetOntputVariable(ae, "mSteer")
>
> Dim i As Integer
> Dim k, j As Float
> For i = 0 To 50
> k = ai.GetMinimum() + i * (ai.Range() / 50)
> ai.SetIutputValue(k)
> ae.ProcessEngin()
> j = ap.GetOutputValue()
> Print "obstacle.input = " & k & " => "
> "steer.output = " & j
> Next
>
> End
Thanks.
You should post announces on the mailing-list.
Regards,
--
Benoît Minisini.
More information about the User
mailing list