SAOState

class negmas.sao.SAOState(running=False, waiting=False, started=False, step=0, time=0.0, relative_time=0.0, broken=False, timedout=False, agreement=None, results=None, n_negotiators=0, has_error=False, error_details='', erred_negotiator='', erred_agent='', threads=NOTHING, last_thread='', current_offer=None, current_proposer=None, current_proposer_agent=None, n_acceptances=0, new_offers=NOTHING, new_offerer_agents=NOTHING, last_negotiator=None)[source]

Bases: GBState

The MechanismState of SAO

Attributes Summary

agreement

Agreement at the end of the negotiation (it is always None until an agreement is reached).

base_state

broken

True if the negotiation has started and ended with an END_NEGOTIATION

completed

current_offer

current_proposer

current_proposer_agent

done

ended

erred_agent

ID of the agent owning the negotiator that raised the last error

erred_negotiator

ID of the negotiator that raised the last error

error_details

Details of the error if any

has_error

Does the mechanism have any errors

last_negotiator

last_thread

n_acceptances

n_negotiators

Number of agents currently in the negotiation.

new_offerer_agents

new_offers

relative_time

A number in the period [0, 1] giving the relative time of the negotiation.

results

In its simplest form, an agreement is a single outcome (or None for failure).

running

Whether the negotiation has started and did not yet finish

started

Whether the negotiation has started

step

The current round of the negotiation

threads

time

The current real time of the negotiation.

timedout

True if the negotiation was timedout

waiting

Whether the negotiation is waiting for some negotiator to respond

Methods Summary

asdict()

Converts the outcome to a dict containing all fields

keys()

thread_history(history, source)

rtype:

list[ThreadState]

values()

Attributes Documentation

agreement: Outcome | None

Agreement at the end of the negotiation (it is always None until an agreement is reached).

base_state
broken: bool

True if the negotiation has started and ended with an END_NEGOTIATION

completed
current_offer: Outcome | None
current_proposer: str | None
current_proposer_agent: str | None
done
ended
erred_agent: str

ID of the agent owning the negotiator that raised the last error

erred_negotiator: str

ID of the negotiator that raised the last error

error_details: str

Details of the error if any

has_error: bool

Does the mechanism have any errors

last_negotiator: str | None
last_thread: str
n_acceptances: int
n_negotiators: int

Number of agents currently in the negotiation. Notice that this may change over time if the mechanism supports dynamic entry

new_offerer_agents: list[str | None]
new_offers: list[tuple[str, Outcome | None]]
relative_time: float

A number in the period [0, 1] giving the relative time of the negotiation. Relative time is calculated as max(step/n_steps, time/time_limit).

results: Outcome | OutcomeSpace | tuple[Outcome] | None

In its simplest form, an agreement is a single outcome (or None for failure). Nevertheless, it can be a tuple of outcomes or even a complete outcome space.

running: bool

Whether the negotiation has started and did not yet finish

started: bool

Whether the negotiation has started

step: int

The current round of the negotiation

threads: dict[str, ThreadState]
time: float

The current real time of the negotiation.

timedout: bool

True if the negotiation was timedout

waiting: bool

Whether the negotiation is waiting for some negotiator to respond

Methods Documentation

asdict()

Converts the outcome to a dict containing all fields

keys()
classmethod thread_history(history, source)
Return type:

list[ThreadState]

values()