예제 #1
0
        public override ReactiveAgent Clone()
        {
            var clone = new MessageBasedScenario(Environment)
            {
                NumberOfMessages = NumberOfMessages
            };

            return(clone);
        }
예제 #2
0
        /// <summary>
        ///     Factory method to create an agent
        ///     Call the Initialize method
        /// </summary>
        /// <returns></returns>
        public static MessageBasedScenario CreateInstance(SymuEnvironment environment)
        {
            if (environment == null)
            {
                throw new ArgumentNullException(nameof(environment));
            }

            var agent = new MessageBasedScenario(environment);

            agent.Initialize();
            return(agent);
        }