SAONMI
- class negmas.sao.SAONMI(id: str, n_outcomes: int | float, outcome_space: OutcomeSpace, time_limit: float, pend: float, pend_per_second: float, step_time_limit: float, negotiator_time_limit: float, n_steps: int | None, dynamic_entry: bool, max_n_negotiators: int | None, _mechanism: Mechanism, annotation: dict[str, Any] = <class 'dict'>, end_on_no_response: bool = True, one_offer_per_step: bool = False)[source]
Bases:
NegotiatorMechanismInterfaceThe
NegotiatorMechanismInterfaceof SAOAttributes Summary
Gets the IDs of all agents owning all negotiators
Gets the names of all agents owning all negotiators
An arbitrary annotation as a
dict[str, Any]that is always available for all negotiatorsReturns the
outcome_spaceas aCartesianOutcomeSpaceor raises aValueErrorif that was not possible.Whether it is allowed for negotiators to enter/leave the negotiation after it starts
End the negotiation if any agent responded with None
Return an estimate of the number of steps for this negotiation.
Return an estimate of the number of seconds for this negotiation.
Returns the negotiation history as a list of step, negotiator, offer tuples
Gets the Java IDs of all negotiators (if the negotiator is not a GeniusNegotiator, its normal ID is returned)
Mechanism session ID.
Maximum allowed number of negotiators in the session.
Gets the ID of the mechanism
Syntactic sugar for state.n_negotiators
Number of outcomes which may be
float('inf')indicating infinityThe allowed number of steps for this negotiation.
Gets the IDs of all negotiators
The time limit in seconds to wait for negotiator responses of this negotiation session.
Returns offers exchanged in order
If true, a step should be atomic with only one action from one negotiator
Negotiation agenda as as an
OutcomeSpaceobject.All outcomes for discrete outcome spaces or None for continuous outcome spaces.
Returns the parameters used to initialize the mechanism.
The probability that the negotiation times out at every step.
The probability that the negotiation times out every second.
The protocol requirements
Access the current state of the mechanism.
The time limit in seconds for each step of ;this negotiation session.
The time limit in seconds for this negotiation session.
Returns the negotiation history as a list of negotiator, offer tuples
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.
negotiator_offers(negotiator_id)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
- atomic_steps
- cartesian_outcome_space
Returns the
outcome_spaceas aCartesianOutcomeSpaceor raises aValueErrorif that was not possible.Remarks:
Useful for negotiators that only work with
CartesianOutcomeSpaces (i.e.GeniusNegotiator)
- dynamic_entry: bool
Whether it is allowed for negotiators to enter/leave the negotiation after it starts
- estimated_n_steps
Return an estimate of the number of steps for this negotiation.
- estimated_time_limit
Return an estimate of the number of seconds for this negotiation.
- extended_trace
Returns the negotiation history as a list of step, negotiator, offer tuples
- genius_negotiator_ids
Gets the Java IDs of all negotiators (if the negotiator is not a GeniusNegotiator, its normal ID is returned)
- history
- 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
- 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
- offers
Returns offers exchanged in order
- outcome_space: OutcomeSpace
Negotiation agenda as as an
OutcomeSpaceobject. The most common type isCartesianOutcomeSpacewhich 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
- trace
Returns the negotiation history as a list of negotiator, offer tuples
Methods Documentation
- asdict()
Converts the object to a dict containing all fields
- discrete_outcome_space(levels: int = 5, max_cardinality: int = 10000000000) DiscreteOutcomeSpace
Returns a stable discrete version of the given outcome-space
- discrete_outcomes(max_cardinality: int | float = inf) Iterable[tuple]
A discrete set of outcomes that spans the outcome space
- genius_id(id: str | None) str | None
Gets the Genius ID corresponding to the given negotiator if known otherwise its normal ID
- keys()
- negotiator_index(source: str) int
Returns the negotiator index for the given negotiator. Raises an exception if not found
- random_outcomes(n: int = 1) list[tuple]
A set of random outcomes from the outcome-space of this negotiation
- values()