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"); }
private void CreateCollectorAgents(Configuration configuration) { var resourcelist = new ResourceList(); resourcelist.AddRange(collection: _dBContext.Resources.Select(selector: x => "Resources(" + 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"); WorkCollector = _simulation.ActorSystem.ActorOf(props: Collector.Props(actorPaths: ActorPaths, collectorBehaviour: CollectorAnalyticsWorkSchedule.Get(resources: resourcelist) , msgHub: _messageHub, configuration: configuration, time: 0, debug: _debugAgents , streamTypes: CollectorAnalyticsWorkSchedule.GetStreamTypes()), name: "WorkScheduleCollector"); }
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"); }