public override ReactiveAgent Clone() { var clone = new MessageBasedScenario(Environment) { NumberOfMessages = NumberOfMessages }; return(clone); }
/// <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); }