Esempio n. 1
0
        public void addRule(FuzzyRule newRule)
        {
            int size = inputVar.Length;

            newRule.Adjust(size);
            size = sysRule.Length;
            Array.Resize(ref sysRule, size + 1);
            sysRule[size] = newRule;
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            FuzzyRule newRule;

            MfMode[] tempMode = new MfMode[mechanics.numberVar];
            float[]  tempPar  = new float[mechanics.numberVar + 1];
            int[]    tempMf   = new int[mechanics.numberVar];
            int      i;

            for (i = 0; i < mechanics.numberVar; i++)
            {
                // float result;
                float.TryParse(param[i].Text, out tempPar[i]);
                tempMode[i] = (MfMode)modSelect[i].SelectedIndex;
                tempMf[i]   = mfSelect[i].SelectedIndex;
            }
            float.TryParse(param[i].Text, out tempPar[i]);
            newRule = new FuzzyRule(tempMode, tempPar, tempMf);
            mechanics.mainSystem.addRule(newRule);
        }
Esempio n. 3
0
 public static void AddRule(FuzzyRule newRule)
 {
     mainSystem.addRule(newRule);
 }