public override void SetAgents() { base.SetAgents(); var group = GroupAgent.CreateInstance(this); _groupId = group.AgentId; for (var j = 0; j < ExampleMainOrganization.WorkersCount; j++) { AddPersonAgent(); } }
/// <summary> /// Factory method to create an agent /// Call the Initialize method /// </summary> /// <returns></returns> public static GroupAgent CreateInstance(SymuEnvironment environment) { if (environment == null) { throw new ArgumentNullException(nameof(environment)); } var agent = new GroupAgent(environment); agent.Initialize(); return(agent); }