public String exportSystem(Engine engine) {
        StringBuilder result = new StringBuilder();
        result.append("#Code automatically generated with " + FuzzyLite.LIBRARY + ".\n\n");
        result.append("[System]\n");
        result.append(String.format("Name='%s'\n", engine.getName()));
        String type;
        if (engine.type() == Engine.Type.Mamdani || engine.type() == Engine.Type.Larsen) {
            type = "mamdani";
        } else if (engine.type() == Engine.Type.TakagiSugeno) {
            type = "sugeno";
        } else if (engine.type() == Engine.Type.Tsukamoto) {
            type = "tsukamoto";
        } else if (engine.type() == Engine.Type.InverseTsukamoto) {
            type = "inverse tsukamoto";
        } else if (engine.type() == Engine.Type.Hybrid) {
            type = "hybrid";
        } else {
            type = "unknown";
        }
        result.append(String.format("Type='%s'\n", type));
        result.append(String.format("Version=%s\n", FuzzyLite.VERSION));
        result.append(String.format("NumInputs=%d\n", engine.numberOfInputVariables()));
        result.append(String.format("NumOutputs=%d\n", engine.numberOfOutputVariables()));

        int numberOfRules = 0;
        TNorm conjunction = null;
        SNorm disjunction = null;
        TNorm implication = null;
        for (RuleBlock ruleBlock : engine.getRuleBlocks()) {
            numberOfRules += ruleBlock.numberOfRules();
            if (conjunction == null) {
                conjunction = ruleBlock.getConjunction();
            }
            if (disjunction == null) {
                disjunction = ruleBlock.getDisjunction();
            }
            if (implication == null) {
                implication = ruleBlock.getImplication();
            }
        }
        result.append(String.format("NumRules=%d\n", numberOfRules));
        result.append(String.format("AndMethod='%s'\n", toString(conjunction)));
        result.append(String.format("OrMethod='%s'\n", toString(disjunction)));
        result.append(String.format("ImpMethod='%s'\n", toString(implication)));

        SNorm accumulation = null;
        Defuzzifier defuzzifier = null;
        for (OutputVariable outputVariable : engine.getOutputVariables()) {
            if (accumulation == null) {
                accumulation = outputVariable.fuzzyOutput().getAggregation();
            }
            if (defuzzifier == null) {
                defuzzifier = outputVariable.getDefuzzifier();
            }
        }
        result.append(String.format("AggMethod='%s'\n", toString(accumulation)));
        result.append(String.format("DefuzzMethod='%s'\n", toString(defuzzifier)));
        return result.toString();
    }
public String exportSystem ( Engine engine ) { StringBuilder result = new StringBuilder ( ) ; result . append ( "#Code automatically generated with " + FuzzyLite . LIBRARY + ".\n\n" ) ; result . append ( "[System]\n" ) ; result . append ( String . format ( "Name='%s'\n" , engine . getName ( ) ) ) ; String type ; if ( engine . type ( ) == Engine . Type . Mamdani || engine . type ( ) == Engine . Type . Larsen ) { type = "mamdani" ; } else if ( engine . type ( ) == Engine . Type . TakagiSugeno ) { type = "sugeno" ; } else if ( engine . type ( ) == Engine . Type . Tsukamoto ) { type = "tsukamoto" ; } else if ( engine . type ( ) == Engine . Type . InverseTsukamoto ) { type = "inverse tsukamoto" ; } else if ( engine . type ( ) == Engine . Type . Hybrid ) { type = "hybrid" ; } else { type = "unknown" ; } result . append ( String . format ( "Type='%s'\n" , type ) ) ; result . append ( String . format ( "Version=%s\n" , FuzzyLite . VERSION ) ) ; result . append ( String . format ( "NumInputs=%d\n" , engine . numberOfInputVariables ( ) ) ) ; result . append ( String . format ( "NumOutputs=%d\n" , engine . numberOfOutputVariables ( ) ) ) ; int numberOfRules = 0 ; TNorm conjunction = null ; SNorm disjunction = null ; TNorm implication = null ; for ( RuleBlock ruleBlock : engine . getRuleBlocks ( ) ) { numberOfRules += ruleBlock . numberOfRules ( ) ; if ( conjunction == null ) { conjunction = ruleBlock . getConjunction ( ) ; } if ( disjunction == null ) { disjunction = ruleBlock . getDisjunction ( ) ; } if ( implication == null ) { implication = ruleBlock . getImplication ( ) ; } } result . append ( String . format ( "NumRules=%d\n" , numberOfRules ) ) ; result . append ( String . format ( "AndMethod='%s'\n" , toString ( conjunction ) ) ) ; result . append ( String . format ( "OrMethod='%s'\n" , toString ( disjunction ) ) ) ; result . append ( String . format ( "ImpMethod='%s'\n" , toString ( implication ) ) ) ; SNorm accumulation = null ; Defuzzifier defuzzifier = null ; for ( OutputVariable outputVariable : engine . getOutputVariables ( ) ) { if ( accumulation == null ) { accumulation = outputVariable . fuzzyOutput ( ) . getAggregation ( ) ; } if ( defuzzifier == null ) { defuzzifier = outputVariable . getDefuzzifier ( ) ; } } result . append ( String . format ( "AggMethod='%s'\n" , toString ( accumulation ) ) ) ; result . append ( String . format ( "DefuzzMethod='%s'\n" , toString ( defuzzifier ) ) ) ; return result . toString ( ) ; }
Returns a string representation of the `[System]` configuration

@param engine is the engine
@return a string representation of the `[System]` configuration