コード例 #1
0
        /// <summary>
        /// Startup with Creating Dispo Agent for current Item.
        /// </summary>
        /// <param name="agent"></param>
        /// <param name="orderItem"></param>
        public void StartOrder(T_CustomerOrderPart orderItem)
        {
            // create Request Item
            _fArticle = orderItem.ToRequestItem(requester: Agent.Context.Self, currentTime: Agent.CurrentTime);
            // Tell Guardian to create Dispo Agent
            var agentSetup  = AgentSetup.Create(agent: Agent, behaviour: DispoAgent.Behaviour.Factory.Get(simType: Agent.Behaviour.SimulationType));
            var instruction = Guardian.Instruction.CreateChild.Create(setup: agentSetup, target: ((IAgent)Agent).Guardian, source: Agent.Context.Self);

            Agent.Send(instruction: instruction);
            // init end
        }
コード例 #2
0
        /// <summary>
        /// Startup with Creating Dispo Agent for current Item.
        /// </summary>
        /// <param name="agent"></param>
        /// <param name="orderItem"></param>
        public void StartOrder(T_CustomerOrderPart orderItem)
        {
            // create Request Item
            _fArticle = orderItem.ToRequestItem(requester: Agent.Context.Self
                                                , customerDue: orderItem.CustomerOrder.DueTime
                                                , remainingDuration: 0
                                                , currentTime: Agent.CurrentTime);


            Agent.DebugMessage(msg: $"Start Order");
            Agent.Send(DirectoryAgent.Directory.Instruction.Central.ForwardAddOrder.Create(_fArticle,
                                                                                           Agent.ActorPaths.StorageDirectory.Ref));
        }