MultiChainNegotiator

class negmas.concurrent.chain.MultiChainNegotiator(*args, **kwargs)[source]

Bases: negmas.negotiators.Negotiator, abc.ABC

Base class for all nested negotiations negotiator

Methods Summary

confirm(left)

Called to confirm a offer to either the left or the right

join(ami, state, *[, ufun, role])

Called by the mechanism when the agent is about to enter a negotiation.

on_acceptance(state, offer)

Called when one of the negotiator’s proposals gets accepted

propose(state)

Called to allow the agent to propose to either its left or its right in the chain

respond(state, outcome, from_left, temp, source)

Called to respond to an offer

Methods Documentation

confirm(left: bool)bool[source]

Called to confirm a offer to either the left or the right

Parameters

left – If true confirm the offer sent to the left (otherwise the right)

Returns:

join(ami: negmas.common.AgentMechanismInterface, state: negmas.common.MechanismState, *, ufun: Optional[negmas.utilities.UtilityFunction] = None, role: str = 'agent')bool[source]

Called by the mechanism when the agent is about to enter a negotiation. It can prevent the agent from entering

Parameters
Returns

bool indicating whether or not the agent accepts to enter. If False is returned it will not enter the negotiation

abstract on_acceptance(state: negmas.common.MechanismState, offer: negmas.concurrent.chain.Offer)negmas.concurrent.chain.Offer[source]

Called when one of the negotiator’s proposals gets accepted

Parameters
  • state – mechanism state

  • offer – The offer accepted

Returns

A new offer (possibly to another negotiator)

abstract propose(state: negmas.common.MechanismState)negmas.concurrent.chain.Offer[source]

Called to allow the agent to propose to either its left or its right in the chain

Parameters

state – Mechanism state

Returns

The offer

abstract respond(state: negmas.common.MechanismState, outcome: Union[negmas.outcomes.OutcomeType, Tuple[Union[int, float, str, list]], Dict[Union[int, str], Union[int, float, str, list]]], from_left: bool, temp: bool, source: str)negmas.outcomes.ResponseType[source]

Called to respond to an offer

Parameters
  • state – Mechanism state

  • outcome – The offer to respond to

  • from_left – Whether the offer is coming from the left

  • temp – Whether the offer is a temporary offer

  • source – The ID of the source agent

Returns

A response type which can only be ACCEPT_OFFER, REJECT_OFFER, or END_NEGOTIATION