behaviours.HandleNegotiationBehaviour module¶
- class behaviours.HandleNegotiationBehaviour.HandleNegotiationBehaviour(agent_object, negotiation_info)[source]¶
Bases:
CyclicBehaviourThis class implements the behaviour that handle a particular negotiation.
- neg_value = None¶
value of the negotiation
- myagent = None¶
the SPADE agent object of the AAS Manager agent.
- thread = None¶
thread of the negotiation
- neg_requester_jid = None¶
JID of the SPADE agent that has requested the negotiation
- targets = None¶
targets of the negotiation
- neg_criteria = None¶
criteria of the negotiation
- targets_processed = {}¶
targets that their values have been processed
- neg_value_event = None¶
- async get_neg_value_with_criteria(criteria)[source]¶
This method gets the negotiation value based on a given criteria.
- Parameters:
criteria (str) – criteria of the negotiation
- Returns:
value of the negotiation
- Return type:
int
- async exit_negotiation(is_winner)[source]¶
This method is executed when the trade has ended, either as a winner or a loser. In any case, all the information of the negotiation is added to the global variable with all the information of all the negotiations
of the agent. The thread is used to differentiate the information of each negotiation, since this is the identifier of each one of them.
- Parameters:
is_winner (bool) – it determines whether the AAS Manager has been the winner of the negotiation.