MechanismStepResult

class negmas.mechanisms.MechanismStepResult(state, completed=True, broken=False, timedout=False, agreement=None, error=False, error_details='', waiting=False, exceptions=None, times=None)[source]

Bases: Generic[TState]

Represents the results of a negotiation step.

This is what round() should return.

Attributes Summary

agreement

The agreement if any.

broken

True only if END_NEGOTIATION was selected by one negotiator.

completed

Whether the current round is completed or not.

error

True if an error occurred in the mechanism.

error_details

Error message.

exceptions

A mapping from negotiator ID to a list of exceptions raised by that negotiator in this round.

state

The returned state.

timedout

True if a timeout occurred.

times

A mapping from negotiator ID to the time it consumed during this round.

waiting

Whether to consider that the round is still running and call the round method again without increasing the step number.

Attributes Documentation

agreement: tuple | None

The agreement if any. Allows for a single outcome or a collection of outcomes.

broken: bool

True only if END_NEGOTIATION was selected by one negotiator.

completed: bool

Whether the current round is completed or not.

error: bool

True if an error occurred in the mechanism.

error_details: str

Error message.

exceptions: dict[str, list[str]] | None

A mapping from negotiator ID to a list of exceptions raised by that negotiator in this round.

state: TypeVar(TState, bound= MechanismState)

The returned state.

timedout: bool

True if a timeout occurred.

times: dict[str, float] | None

A mapping from negotiator ID to the time it consumed during this round.

waiting: bool

Whether to consider that the round is still running and call the round method again without increasing the step number.