ChainNegotiationsMechanism

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

Bases: negmas.mechanisms.Mechanism

Methods Summary

add(negotiator, *[, ufun, role])

Add an agent to the negotiation.

on_confirm(level, left)

Called by negotiators to confirm their temporary accepted agreements

round()

Implements a single step of the mechanism.

Methods Documentation

add(negotiator: negmas.negotiators.Negotiator, *, ufun: Optional[negmas.utilities.UtilityFunction] = None, role: Optional[str] = None, **kwargs)Optional[bool][source]

Add an agent to the negotiation.

Parameters
  • negotiator – The agent to be added.

  • ufun – The utility function to use. If None, then the agent must already have a stored utility function otherwise it will fail to enter the negotiation.

  • role – The role the agent plays in the negotiation mechanism. It is expected that mechanisms inheriting from this class will check this parameter to ensure that the role is a valid role and is still possible for negotiators to join on that role. Roles may include things like moderator, representative etc based on the mechanism

Returns

  • True if the agent was added.

  • False if the agent was already in the negotiation.

  • None if the agent cannot be added.

on_confirm(level: int, left: bool)None[source]

Called by negotiators to confirm their temporary accepted agreements

Parameters
  • level – The caller level

  • left – Whether to confirm its left or right temporary accepted agreement

round()negmas.mechanisms.MechanismRoundResult[source]

Implements a single step of the mechanism. Override this!

Returns

MechanismRoundResult giving whether the negotiation was broken or timedout and the agreement if any.