Пример #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);
        }