Esempio n. 1
0
        public override ReactiveAgent Clone()
        {
            var clone = new TaskBasedScenario(Environment)
            {
                NumberOfTasks = NumberOfTasks
            };

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

            var agent = new TaskBasedScenario(environment);

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