Magentix2  2.1.1
es.upv.dsic.gti_ia.cAgents.protocols.FIPA_CONTRACTNET_Initiator.RECEIVE_PROPOSE_Method Class Reference
Inheritance diagram for es.upv.dsic.gti_ia.cAgents.protocols.FIPA_CONTRACTNET_Initiator.RECEIVE_PROPOSE_Method:
Collaboration diagram for es.upv.dsic.gti_ia.cAgents.protocols.FIPA_CONTRACTNET_Initiator.RECEIVE_PROPOSE_Method:

List of all members.

Public Member Functions

String run (CProcessor myProcessor, ACLMessage messageReceived)

Detailed Description

Definition at line 146 of file FIPA_CONTRACTNET_Initiator.java.


Member Function Documentation

The method to be executed by the receive state

Parameters:
myProcessorThe CProcessor of the conversation
Returns:
The name of the next state of the conversation

Implements es.upv.dsic.gti_ia.cAgents.ReceiveStateMethod.

Definition at line 147 of file FIPA_CONTRACTNET_Initiator.java.

                                                                                      {
                        int participants = (Integer) myProcessor.getInternalData().get(
                                        "participants");
                        int receivedResponses = (Integer) myProcessor.getInternalData()
                                        .get("receivedResponses");
                        doReceiveProposal(myProcessor, messageReceived);
                        receivedResponses++;
                        myProcessor.getInternalData().put("receivedResponses",
                                        receivedResponses);
                        if (receivedResponses >= participants)
                                return "EVALUATE_PROPOSALS";
                        else
                                return "WAIT_FOR_PROPOSALS";
                }

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables