Exemplo n.º 1
0
        public static void ManualSystem(Defuzzifier def, FuzzySystem fsAkcel, FuzzySystem fsKormilo)
        {
            int L, D, LK, DK, V, S, A, K;

            while (true)
            {
                Console.WriteLine("Unesi L D LK DK V S        ||  ili 'K' za kraj");
                String str = Console.ReadLine();

                if (str[0] == 'K')
                {
                    break;
                }

                String[] p = str.Split(' ');

                L  = int.Parse(p[0]);
                D  = int.Parse(p[1]);
                LK = int.Parse(p[2]);
                DK = int.Parse(p[3]);
                V  = int.Parse(p[4]);
                S  = int.Parse(p[5]);


                A = fsAkcel.Zakljuci(L, D, LK, DK, V, S);
                //A = 4;
                K = fsKormilo.Zakljuci(L, D, LK, DK, V, S);
                //K = 5;
                //akcel = 10; kormilo = 5;
                Console.Write("Akcel:" + A.ToString() + " Kormilo:" + K.ToString() + "\r\n");
                Console.Out.Flush();
            }
        }