Exemplo n.º 1
0
 private void CreateCollectorAgents(Configuration configuration)
 {
     StorageCollector = _simulation.ActorSystem.ActorOf(props: Collector.Props(actorPaths: ActorPaths, collectorBehaviour: CollectorAnalyticsStorage.Get()
                                                                               , msgHub: _messageHub, configuration: configuration, time: 0, debug: _debugAgents
                                                                               , streamTypes: CollectorAnalyticsStorage.GetStreamTypes()), name: "StorageCollector");
     ContractCollector = _simulation.ActorSystem.ActorOf(props: Collector.Props(actorPaths: ActorPaths, collectorBehaviour: CollectorAnalyticsContracts.Get()
                                                                                , msgHub: _messageHub, configuration: configuration, time: 0, debug: _debugAgents
                                                                                , streamTypes: CollectorAnalyticsContracts.GetStreamTypes()), name: "ContractCollector");
     JobCollector = _simulation.ActorSystem.ActorOf(props: Collector.Props(actorPaths: ActorPaths, collectorBehaviour: CollectorAnalyticJob.Get(resources: _resourceDictionary)
                                                                           , msgHub: _messageHub, configuration: configuration, time: 0, debug: _debugAgents
                                                                           , streamTypes: CollectorAnalyticJob.GetStreamTypes()), name: "JobCollector");
     ResourceCollector = _simulation.ActorSystem.ActorOf(props: Collector.Props(actorPaths: ActorPaths, collectorBehaviour: CollectorAnalyticResource.Get(resources: _resourceDictionary)
                                                                                , msgHub: _messageHub, configuration: configuration, time: 0, debug: _debugAgents
                                                                                , streamTypes: CollectorAnalyticResource.GetStreamTypes()), name: "ResourceCollector");
 }
Exemplo n.º 2
0
        private void CreateCollectorAgents(Configuration configuration)
        {
            var resourcelist = new ResourceDictionary();

            _dBContext.Resources.Where(x => x.IsPhysical)
            .Select(selector: x => new { x.Id, Name = x.Name.Replace(" ", ""), x.IsBiological })
            .ForEach(x => resourcelist.Add(x.Id, new ResourceDefinition(x.Name, x.Id, ActorRefs.Nobody, string.Empty, x.IsBiological? ResourceType.Worker : ResourceType.Workcenter)));

            StorageCollector = _simulation.ActorSystem.ActorOf(props: Collector.Props(actorPaths: ActorPaths, collectorBehaviour: CollectorAnalyticsStorage.Get()
                                                                                      , msgHub: _messageHub, configuration: configuration, time: 0, debug: _debugAgents
                                                                                      , streamTypes: CollectorAnalyticsStorage.GetStreamTypes()), name: "StorageCollector");
            ContractCollector = _simulation.ActorSystem.ActorOf(props: Collector.Props(actorPaths: ActorPaths, collectorBehaviour: CollectorAnalyticsContracts.Get()
                                                                                       , msgHub: _messageHub, configuration: configuration, time: 0, debug: _debugAgents
                                                                                       , streamTypes: CollectorAnalyticsContracts.GetStreamTypes()), name: "ContractCollector");
            JobCollector = _simulation.ActorSystem.ActorOf(props: Collector.Props(actorPaths: ActorPaths, collectorBehaviour: CollectorAnalyticJob.Get(resources: resourcelist)
                                                                                  , msgHub: _messageHub, configuration: configuration, time: 0, debug: _debugAgents
                                                                                  , streamTypes: CollectorAnalyticJob.GetStreamTypes()), name: "JobCollector");
            ResourceCollector = _simulation.ActorSystem.ActorOf(props: Collector.Props(actorPaths: ActorPaths, collectorBehaviour: CollectorAnalyticResource.Get(resources: resourcelist)
                                                                                       , msgHub: _messageHub, configuration: configuration, time: 0, debug: _debugAgents
                                                                                       , streamTypes: CollectorAnalyticResource.GetStreamTypes()), name: "ResourceCollector");
        }
Exemplo n.º 3
0
        private void CreateCollectorAgents(Configuration configuration)
        {
            var resourcelist = new ResourceList();

            resourcelist.AddRange(collection: _dBContext.Resources.Where(x => x.IsPhysical)
                                  .Select(selector: x => x.Name.Replace(" ", "")));

            StorageCollector = _simulation.ActorSystem.ActorOf(props: Collector.Props(actorPaths: ActorPaths, collectorBehaviour: CollectorAnalyticsStorage.Get()
                                                                                      , msgHub: _messageHub, configuration: configuration, time: 0, debug: _debugAgents
                                                                                      , streamTypes: CollectorAnalyticsStorage.GetStreamTypes()), name: "StorageCollector");
            ContractCollector = _simulation.ActorSystem.ActorOf(props: Collector.Props(actorPaths: ActorPaths, collectorBehaviour: CollectorAnalyticsContracts.Get()
                                                                                       , msgHub: _messageHub, configuration: configuration, time: 0, debug: _debugAgents
                                                                                       , streamTypes: CollectorAnalyticsContracts.GetStreamTypes()), name: "ContractCollector");
            JobCollector = _simulation.ActorSystem.ActorOf(props: Collector.Props(actorPaths: ActorPaths, collectorBehaviour: CollectorAnalyticJob.Get(resources: resourcelist)
                                                                                  , msgHub: _messageHub, configuration: configuration, time: 0, debug: _debugAgents
                                                                                  , streamTypes: CollectorAnalyticJob.GetStreamTypes()), name: "JobCollector");
            ResourceCollector = _simulation.ActorSystem.ActorOf(props: Collector.Props(actorPaths: ActorPaths, collectorBehaviour: CollectorAnalyticResource.Get(resources: resourcelist)
                                                                                       , msgHub: _messageHub, configuration: configuration, time: 0, debug: _debugAgents
                                                                                       , streamTypes: CollectorAnalyticResource.GetStreamTypes()), name: "ResourceCollector");
        }