Component

class negmas.negotiators.Component(negotiator: Negotiator)[source]

Bases: object

A component that can be added to a ModularNegotiator

Attributes Summary

negotiator

Methods Summary

after_join(nmi)

A call back called after joining a negotiation to confirm wwe joined.

can_join(nmi, state, *[, preferences, ufun, ...])

A call back called before joining a negotiation to confirm that we can join it.

on_leave(state)

A call back called after leaving a negotiation.

on_mechanism_error(state)

A call back called whenever an error happens in the mechanism.

on_negotiation_end(state)

A call back called at each negotiation end

on_negotiation_start(state)

A call back called at each negotiation start

on_preferences_changed(changes)

Called to inform the component that the ufun has changed and the kinds of change that happened.

on_round_end(state)

A call back called at each negotiation round end

on_round_start(state)

A call back called at each negotiation round start

set_negotiator(negotiator)

Sets the negotiator of which this component is a part.

Attributes Documentation

negotiator

Methods Documentation

after_join(nmi: NegotiatorMechanismInterface) None[source]

A call back called after joining a negotiation to confirm wwe joined.

can_join(nmi: NegotiatorMechanismInterface, state: MechanismState, *, preferences: Preferences | None = None, ufun: BaseUtilityFunction | None = None, role: str = 'negotiator') bool[source]

A call back called before joining a negotiation to confirm that we can join it.

on_leave(state: MechanismState) None[source]

A call back called after leaving a negotiation.

on_mechanism_error(state: MechanismState) None[source]

A call back called whenever an error happens in the mechanism. The error and its explanation are accessible in state

on_negotiation_end(state: MechanismState) None[source]

A call back called at each negotiation end

on_negotiation_start(state: MechanismState) None[source]

A call back called at each negotiation start

on_preferences_changed(changes: list[PreferencesChange])[source]

Called to inform the component that the ufun has changed and the kinds of change that happened.

on_round_end(state: MechanismState) None[source]

A call back called at each negotiation round end

on_round_start(state: MechanismState) None[source]

A call back called at each negotiation round start

set_negotiator(negotiator: Negotiator) None[source]

Sets the negotiator of which this component is a part.