public float DefuzzyConcept(Concept concept) { if (!ConceptList.Contains(concept)) { throw new System.Exception("@Fuzzy Exception - No concept of name: " + concept.name + "found inside related concepts"); } return(concept.Defuzzyfication(PrecisionValue)); }
private void FuzzyCalculations() { _fBehaviour.SetConceptValue("Distancia", distancia); _fBehaviour.SetConceptValue("Vida", vida); _fBehaviour.SetConceptValue("Municao", municao); _fBehaviour.SetConceptValue("Inimigos", inimigos); _fBehaviour.ExecuteConditions(); Fuzzy.Concept __risco = _fBehaviour.GetConcept("Risco"); for (int i = 0; i < _fBehaviour.GetConcept("Risco").Functions.Count; i++) { print("Concept " + __risco.Functions[i].Name + ": " + __risco.Functions[i].Fuzzy); } print("Defuzzy: " + __risco.Defuzzyfication(0.001f)); }