private FuzzyVariable GetOutputVariable(FuzzyCheckDBContext context)
        {
            var parameters = (from item in context.Parameters where !item.IsInput select item).ToList();
            List<FuzzyVariable> variables = new List<FuzzyVariable>();
            foreach (var variable in parameters)
            {
                FuzzyVariable fsVariable = new FuzzyVariable(
                    variable.Name,
                    variable.Min,
                    variable.Max);
                foreach (var term in variable.Terms)
                {
                    fsVariable.Terms.Add(new FuzzyTerm(term.Name, new NormalMembershipFunction(term.b, term.c)));
                }

                return fsVariable;
            }

            return null;
        }
        private List<FuzzyVariable> GetInputVariables(FuzzyCheckDBContext context)
        {
            List<FuzzyVariable> variables = new List<FuzzyVariable>();
            foreach (var inputVariable in context.Parameters)
            {
                if (inputVariable.IsInput)
                {
                    FuzzyVariable fsVariable = new FuzzyVariable(
                        inputVariable.Name,
                        inputVariable.Min,
                        inputVariable.Max);
                    variables.Add(fsVariable);
                }
            }

            foreach (var variable in variables)
            {
                var dbVariable = context.Parameters.Single(p => p.Name == variable.Name);
                foreach (var term in dbVariable.Terms)
                {
                    variable.Terms.Add(new FuzzyTerm(term.Name, new NormalMembershipFunction(term.b, term.c)));
                }
            }

            return variables;
        }