home › Forums › # Technical Support › Pipe output of one fuzzy model into another fuzzy model using QTFuzzylite › Reply To: Pipe output of one fuzzy model into another fuzzy model using QTFuzzylite
thanks for your questions.
You can merge the two models into a single engine (just append the contents of one FLL into the other without the Engine tag). This merge assumes you have different names for Variables and RuleBlocks.
Once merged, you could add in your relevant rule block a rule using the output variable in the antecedent.
Check this example: https://github.com/fuzzylite/fuzzylite/blob/release/examples/mamdani/SimpleDimmerChained.fll
Just make sure that the order of rules execution updates the output variable (to be used as input) before the rule.
Also, have in mind that this approach is not exactly piping. Piping to me means that you defuzzify your output and use it as input in an input variable, thereby losing information in the process. The approach I am suggesting uses the fuzzy output directly, without defuzzification, thereby not losing information in the process.
If this approach does not work for you, I am afraid that piping as you want it is not currently possible in QtFuzzyLite, but would be pretty easy to set up programmatically using the libraries.