Exemple #1
0
        public void CreateStorageAgents(FCentralStockDefinition stock)
        {
            var storage = Agent.Context.ActorOf(props: Storage.Props(actorPaths: Agent.ActorPaths
                                                                     , time: Agent.CurrentTime
                                                                     , debug: Agent.DebugThis
                                                                     , principal: Agent.Context.Self)
                                                , name: ("Storage(" + stock.StockId + " " + stock.MaterialName + ")").ToActorName());

            StorageManager.AddOrCreateRelation(storage, stock.StockId.ToString());
            Agent.Send(instruction: BasicInstruction.Initialize.Create(target: storage, message: StorageAgent.Behaviour.Factory.Central(stockDefinition: stock, simType: SimulationType)));
        }