/// <summary> /// Handles the request for a potential supplier for the manufacturer. /// </summary> /// <param name="author">Controller agent which sent the reply</param> /// <param name="content">A Supplier task with a potential supplier agent provided.</param> private void HandleInformMessage(Controller author, SupplierTask content) { coordinationNode.AddEdge(content.Agent.CoordinationNode); communicationNode.AddEdge(content.Agent.CommunicationNode); // Update the coordination information ((ManufacturerTask)assignedTask).Supplier = content.Agent; }
private void HandleInformMessage(Agent destination, ManufacturerTask task) { if (task.RegisteredAgents.Count > 0) { // Generate a Supplier task SupplierTask sTask = new SupplierTask((SupplierAgent)task.RegisteredAgents[0].TaskAgent, (ManufacturerAgent)task.Agent, task.Demand); tree.AddChild(task, sTask); InformMessage i = new InformMessage(this, sTask); // Send the message first to the client messageQueue.SendPost(task.Agent, i); // Send the message also to the manufacturer messageQueue.SendPost(task.RegisteredAgents[0].TaskAgent, i); } }
/// <summary> /// Informs the supplier agent that it is now part of the coordination group /// </summary> /// <param name="author">Controller agent of the system</param> /// <param name="content">Supplier Task</param> protected void HandleInformMessage(Agent author, SupplierTask content) { coordinationNode.AddEdge(content.Manufacturer.CoordinationNode); communicationNode.AddEdge(content.Manufacturer.CommunicationNode); // Update the coordination information assignedTask = content; manager = author; }