SAONMI

class negmas.sao.SAONMI(id, n_outcomes, outcome_space, time_limit, pend, pend_per_second, step_time_limit, negotiator_time_limit, n_steps, dynamic_entry, max_n_negotiators, _mechanism, annotation=<class 'dict'>, end_on_no_response=True, one_offer_per_step=False)[source]

Bases: NegotiatorMechanismInterface

The NegotiatorMechanismInterface of SAO

Attributes Summary

agent_ids

Gets the IDs of all agents owning all negotiators

agent_names

Gets the names of all agents owning all negotiators

annotation

An arbitrary annotation as a dict[str, Any] that is always available for all negotiators

cartesian_outcome_space

Returns the outcome_space as a CartesianOutcomeSpace or raises a ValueError if that was not possible.

dynamic_entry

Whether it is allowed for negotiators to enter/leave the negotiation after it starts

end_on_no_response

End the negotiation if any agent responded with None

genius_negotiator_ids

Gets the Java IDs of all negotiators (if the negotiator is not a GeniusNegotiator, its normal ID is returned)

id

Mechanism session ID.

issues

max_n_negotiators

Maximum allowed number of negotiators in the session.

mechanism_id

Gets the ID of the mechanism

n_negotiators

Syntactic sugar for state.n_negotiators

n_outcomes

Number of outcomes which may be float('inf') indicating infinity

n_steps

The allowed number of steps for this negotiation.

negotiator_ids

Gets the IDs of all negotiators

negotiator_time_limit

The time limit in seconds to wait for negotiator responses of this negotiation session.

one_offer_per_step

If true, a step should be atomic with only one action from one negotiator

outcome_space

Negotiation agenda as as an OutcomeSpace object.

outcomes

All outcomes for discrete outcome spaces or None for continuous outcome spaces.

params

Returns the parameters used to initialize the mechanism.

participants

pend

The probability that the negotiation times out at every step.

pend_per_second

The probability that the negotiation times out every second.

requirements

The protocol requirements

state

Access the current state of the mechanism.

step_time_limit

The time limit in seconds for each step of ;this negotiation session.

time_limit

The time limit in seconds for this negotiation session.

Methods Summary

asdict()

Converts the object to a dict containing all fields

discrete_outcome_space([levels, max_cardinality])

Returns a stable discrete version of the given outcome-space

discrete_outcomes([max_cardinality])

A discrete set of outcomes that spans the outcome space

genius_id(id)

Gets the Genius ID corresponding to the given negotiator if known otherwise its normal ID

keys()

log_critical(nid, data)

Logs at critical level

log_debug(nid, data)

Logs at debug level

log_error(nid, data)

Logs at error level

log_info(nid, data)

Logs at info level

log_warning(nid, data)

Logs at warning level

negotiator_index(source)

Returns the negotiator index for the given negotiator.

random_outcome()

A single random outcome.

random_outcomes([n])

A set of random outcomes from the outcome-space of this negotiation

values()

Attributes Documentation

agent_ids

Gets the IDs of all agents owning all negotiators

agent_names

Gets the names of all agents owning all negotiators

annotation: dict[str, Any]

An arbitrary annotation as a dict[str, Any] that is always available for all negotiators

cartesian_outcome_space

Returns the outcome_space as a CartesianOutcomeSpace or raises a ValueError if that was not possible.

Remarks:

dynamic_entry: bool

Whether it is allowed for negotiators to enter/leave the negotiation after it starts

end_on_no_response: bool

End the negotiation if any agent responded with None

genius_negotiator_ids

Gets the Java IDs of all negotiators (if the negotiator is not a GeniusNegotiator, its normal ID is returned)

id: str

Mechanism session ID. That is unique for all mechanisms

issues
max_n_negotiators: int | None

Maximum allowed number of negotiators in the session. None indicates no limit

mechanism_id

Gets the ID of the mechanism

n_negotiators

Syntactic sugar for state.n_negotiators

n_outcomes: int | float

Number of outcomes which may be float('inf') indicating infinity

n_steps: int | None

The allowed number of steps for this negotiation. None indicates infinity

negotiator_ids

Gets the IDs of all negotiators

negotiator_time_limit: float

The time limit in seconds to wait for negotiator responses of this negotiation session. None indicates infinity

one_offer_per_step: bool

If true, a step should be atomic with only one action from one negotiator

outcome_space: OutcomeSpace

Negotiation agenda as as an OutcomeSpace object. The most common type is CartesianOutcomeSpace which represents the cartesian product of a list of issues

outcomes

All outcomes for discrete outcome spaces or None for continuous outcome spaces. See discrete_outcomes

params

Returns the parameters used to initialize the mechanism.

participants
pend: float

The probability that the negotiation times out at every step. Must be less than one. If <= 0, it is ignored

pend_per_second: float

The probability that the negotiation times out every second. Must be less than one. If <= 0, it is ignored

requirements

The protocol requirements

Returns:

  • A dict of str/Any pairs giving the requirements

state
step_time_limit: float

The time limit in seconds for each step of ;this negotiation session. None indicates infinity

time_limit: float

The time limit in seconds for this negotiation session. None indicates infinity

Methods Documentation

asdict()

Converts the object to a dict containing all fields

discrete_outcome_space(levels=5, max_cardinality=10000000000)

Returns a stable discrete version of the given outcome-space

Return type:

DiscreteOutcomeSpace

discrete_outcomes(max_cardinality=inf)

A discrete set of outcomes that spans the outcome space

Parameters:

max_cardinality (int | float) – The maximum number of outcomes to return. If None, all outcomes will be returned for discrete outcome-spaces

Returns:

list of n or less outcomes

Return type:

list[Outcome]

genius_id(id)

Gets the Genius ID corresponding to the given negotiator if known otherwise its normal ID

Return type:

str | None

keys()
log_critical(nid, data)

Logs at critical level

Return type:

None

log_debug(nid, data)

Logs at debug level

Return type:

None

log_error(nid, data)

Logs at error level

Return type:

None

log_info(nid, data)

Logs at info level

Return type:

None

log_warning(nid, data)

Logs at warning level

Return type:

None

negotiator_index(source)

Returns the negotiator index for the given negotiator. Raises an exception if not found

Return type:

int

random_outcome()

A single random outcome.

Return type:

tuple

random_outcomes(n=1)

A set of random outcomes from the outcome-space of this negotiation

Parameters:

n (int) – number of outcomes requested

Returns:

list of n or less outcomes

Return type:

list[Outcome]

values()