/// <summary> /// Constructor with standard agent template /// and with an existing IAgentId /// </summary> /// <param name="agentId"></param> /// <param name="environment"></param> protected ReactiveAgent(IAgentId agentId, SymuEnvironment environment) { AgentId = agentId; Environment = environment ?? throw new ArgumentNullException(nameof(environment)); Environment.AgentNetwork.AddAgent(this); State = AgentState.NotStarted; Created = Schedule.Step; }
private void SetUp(SymuEnvironment environment, MainOrganization organization) { Engine.SetEnvironment(environment); SetUpOrganization(); Engine.Environment.SetOrganization(organization); //Intentionally after SetOrganization because Scenarii are Agents SetUpScenarii(); }
/// <summary> /// Constructor of the agent /// </summary> /// <remarks>Call the Initialize method after the constructor, or call the factory method</remarks> protected ScenarioAgent(object parent, SymuEnvironment environment) : base( environment?.AgentNetwork.NextAgentId(Class), environment) { if (environment is null) { throw new ArgumentNullException(nameof(environment)); } Parent = parent; }
/// <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); }
/// <summary> /// Initialize the engine, environment ready to launch the first step /// Used in unit tests /// </summary> /// <param name="environment"></param> public void Initialize(SymuEnvironment environment) { if (environment == null) { throw new ArgumentNullException(nameof(environment)); } SetEnvironment(environment); PreIteration(); environment.PreStep(); environment.Messages.WaitingToClearAllMessages(); }
/// <summary> /// Factory method to create an agent /// Call the Initialize method /// </summary> /// <returns></returns> public static ScenarioAgent CreateInstance(object parent, SymuEnvironment environment) { if (environment == null) { throw new ArgumentNullException(nameof(environment)); } var agent = new ScenarioAgent(parent, environment); agent.Initialize(); return(agent); }
/// <summary> /// Factory method to create an agent /// Call the Initialize method /// </summary> /// <returns></returns> public static LearnAgent CreateInstance(SymuEnvironment environment, CognitiveArchitectureTemplate template) { if (environment == null) { throw new ArgumentNullException(nameof(environment)); } var agent = new LearnAgent(environment, template); agent.Initialize(); return(agent); }
public static TestCognitiveAgent CreateInstance(byte classId, SymuEnvironment environment) { if (environment == null) { throw new ArgumentNullException(nameof(environment)); } var agent = new TestCognitiveAgent(environment.AgentNetwork.NextAgentId(classId), environment); agent.Initialize(); return(agent); }
/// <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); }
/// <summary> /// Factory method to create an agent /// Call the Initialize method /// </summary> /// <returns></returns> public static PersonAgent CreateInstance(SymuEnvironment environment, CognitiveArchitectureTemplate template) { if (environment == null) { throw new ArgumentNullException(nameof(environment)); } var entity = new ActorEntity(environment.MainOrganization.ArtifactNetwork); var agent = new PersonAgent(entity.EntityId, environment, template); agent.Initialize(); return(agent); }
/// <summary> /// </summary> /// <param name="environment"></param> /// <param name="organization"></param> protected void Start(SymuEnvironment environment, MainOrganization organization) { if (environment is null) { throw new ArgumentNullException(nameof(environment)); } Engine.State = AgentState.Starting; SetUp(environment, organization); PreProcess(); if (backgroundWorker1.IsBusy != true) // Start the asynchronous operation. { backgroundWorker1.RunWorkerAsync(); } }
public IterationResult(SymuEnvironment environment) { Environment = environment ?? throw new ArgumentNullException(nameof(environment)); OrganizationFlexibility = new OrganizationFlexibility(Environment); KnowledgeAndBeliefResults = new KnowledgeAndBeliefResults(Environment); Blockers = new BlockerResults(Environment); Tasks = new TaskResults(Environment); Messages = new MessageResults(Environment); Results.Add(OrganizationFlexibility); Results.Add(KnowledgeAndBeliefResults); Results.Add(Blockers); Results.Add(Tasks); Results.Add(Messages); Results.Add(KeyFrames); }
/// <summary> /// Constructor of the agent /// </summary> /// <remarks>Call the Initialize method after the constructor, or call the factory method</remarks> private InternetAccessAgent(SymuEnvironment environment, CognitiveArchitectureTemplate template) : base( ClassId, environment, template) { }
/// <summary> /// Constructor of the agent /// </summary> /// <remarks>Call the Initialize method after the constructor, or call the factory method</remarks> protected LearnAgent(SymuEnvironment environment, CognitiveArchitectureTemplate template) : base( ClassId, environment, template) { Wiki = MainOrganization.WikiEntity; Knowledge = GetKnowledge(); }
/// <summary> /// Constructor of the agent /// </summary> /// <remarks>Call the Initialize method after the constructor, or call the factory method</remarks> /// <summary> /// Constructor of the agent /// </summary> /// <remarks>Call the Initialize method after the constructor, or call the factory method</remarks> private MessageBasedScenario(SymuEnvironment environment) : base(null, environment) { }
public MessageResults(SymuEnvironment environment) : base(environment) { Frequency = TimeStepType.Daily; }
/// <summary> /// Add a new environment to the symu engine /// </summary> /// <param name="environment"></param> public void SetEnvironment(SymuEnvironment environment) { Environment = environment ?? throw new ArgumentNullException(nameof(environment)); }
/// <summary> /// Constructor of the agent /// </summary> /// <remarks>Call the Initialize method after the constructor, or call the factory method</remarks> private GroupAgent(SymuEnvironment environment) : base( ClassId, environment) { }
/// <summary> /// Constructor of the agent /// </summary> /// <remarks>Call the Initialize method after the constructor, or call the factory method</remarks> private PersonAgent(IAgentId entityId, SymuEnvironment environment, CognitiveArchitectureTemplate template) : base( entityId, environment, template) { }
/// <summary> /// Constructor with standard agent template /// and with an existing IAgentId /// </summary> /// <param name="agentId"></param> /// <param name="environment"></param> /// <remarks> Make constructor private and create a factory method to create an agent that call the Initialize method</remarks> protected CognitiveAgent(IAgentId agentId, SymuEnvironment environment) : base(agentId, environment) { _cognitiveTemplate = environment.MainOrganization.Templates.Standard; }
/// <summary> /// Constructor with specific agentTemplate /// </summary> /// <param name="agentId"></param> /// <param name="environment"></param> /// <param name="template"></param> /// <remarks> Make constructor private and create a factory method to create an agent that call the Initialize method</remarks> protected CognitiveAgent(IAgentId agentId, SymuEnvironment environment, CognitiveArchitectureTemplate template) : base(agentId, environment) { _cognitiveTemplate = template; }
/// <summary> /// Constructor of the agent /// </summary> /// <remarks>Call the Initialize method after the constructor, or call the factory method</remarks> private PersonAgent(SymuEnvironment environment, CognitiveArchitectureTemplate template) : base( ClassId, environment, template) { }
public TestSysDynAgent(IAgentId id, SymuEnvironment environment) : base(id, environment) { }
public SplitStep(SymuEnvironment environment, AgentId agentId) { _environment = environment; _agentId = agentId; }
/// <summary> /// Constructor of the agent /// </summary> /// <remarks>Call the Initialize method after the constructor, or call the factory method</remarks> private TaskBasedScenario(SymuEnvironment environment) : base(null, environment) { Environment.IterationResult.Tasks.On = true; }
protected Result(SymuEnvironment environment) { Environment = environment; }
/// <summary> /// Constructor of the agent /// </summary> /// <remarks>Call the Initialize method after the constructor, or call the factory method</remarks> private TestCognitiveAgent(IAgentId id, SymuEnvironment environment) : base(id, environment, environment.MainOrganization.Templates.Human) { }
public OrganizationFlexibility(SymuEnvironment environment) : base(environment) { }
/// <summary> /// Constructor with specific agentTemplate /// </summary> /// <param name="classId"></param> /// <param name="environment"></param> /// <param name="template"></param> /// <remarks> Make constructor private and create a factory method to create an agent that call the Initialize method</remarks> protected CognitiveAgent(IClassId classId, SymuEnvironment environment, CognitiveArchitectureTemplate template) : this(environment?.AgentNetwork.NextAgentId(classId), environment, template) { _cognitiveTemplate = template; }
/// <summary> /// Constructor of the agent /// </summary> /// <remarks>Call the Initialize method after the constructor, or call the factory method</remarks> private LearnByAskingAgent(SymuEnvironment environment, CognitiveArchitectureTemplate template) : base(environment, template) { }