public SocketOperationsImpl(EntityCache <CustomSocket> socketCache, EntityCache <SocketGroup> socketGroupCache,
                                    SocketExchange.SocketExchangeClient client, SocketOperationsOptions options)
        {
            _client           = client;
            _socketCache      = socketCache;
            _socketGroupCache = socketGroupCache;
            _options          = options;

            var sockets = _socketCache.GetAll();
            var productionRulesGenerator = new ProductionRulesGenerator();
            var logicRulesGenerator      = new LogicRulesGenerator();
            var fuzzyRulesGenerator      = new FuzzyRulesGenerator();
            var neuralRulesGenerator     = new NeuralRulesGenerator();

            // Продукционный вывод
            var rulesGraph = productionRulesGenerator.GenerateRules(sockets);
            // Логический вывод
            var logicRules = logicRulesGenerator.GenerateRules(sockets);
            // Нечеткий вывод
            var fuzzyDomains = fuzzyRulesGenerator.GetFuzzyDomains(sockets);
            var fuzzyFacts   = fuzzyRulesGenerator.GetFuzzyFacts(fuzzyDomains, sockets);
            // Нейро-нечеткий вывод
            var neuralNetwork = neuralRulesGenerator.GetNeuralNetwork(sockets);

            var processorOptions = new ProcessorOptions {
                Debug = _options.Debug
            };

            _productionProcessor = new ProductionProcessor(rulesGraph, processorOptions);
            _logicProcessor      = new LogicProcessor(logicRules, processorOptions);
            _fuzzyProcessor      = new FuzzyProcessor(fuzzyDomains, fuzzyFacts, processorOptions);
            _neuralProcessor     = new NeuralProcessor(neuralNetwork, processorOptions);
        }
Exemple #2
0
 public NeuralRulesGeneratorTest()
 {
     _generator = new NeuralRulesGenerator();
 }
 public NeuralProcessor(NeuralNetwork network, ProcessorOptions options)
     : base(options)
 {
     _network   = network;
     _generator = new NeuralRulesGenerator();
 }