scml.scml2020.agents.do_nothing =============================== .. py:module:: scml.scml2020.agents.do_nothing .. autoapi-nested-parse:: Implements an agent that does nothing Classes ------- .. autoapisummary:: scml.scml2020.agents.do_nothing.DoNothingAgent Module Contents --------------- .. py:class:: DoNothingAgent(name: str | None = None, type_postfix: str = '', preferences: negmas.preferences.Preferences | None = None, ufun: negmas.preferences.UtilityFunction | None = None) Bases: :py:obj:`scml.scml2020.agent.SCML2020Agent` An agent that does nothing for the whole length of the simulation .. py:method:: respond_to_negotiation_request(initiator: str, issues: List[negmas.Issue], annotation: Dict[str, Any], mechanism: negmas.NegotiatorMechanismInterface) -> Optional[negmas.Negotiator] Called whenever another agent requests a negotiation with this agent. :param initiator: The ID of the agent that requested this negotiation :param issues: Negotiation issues :param annotation: Annotation attached with this negotiation :param mechanism: The `NegotiatorMechanismInterface` interface to the mechanism to be used for this negotiation. :returns: None to reject the negotiation, otherwise a negotiator .. py:method:: sign_all_contracts(contracts: List[negmas.Contract]) -> List[Optional[str]] Signs all contracts .. py:method:: on_contracts_finalized(signed: List[negmas.Contract], cancelled: List[negmas.Contract], rejectors: List[List[str]]) -> None Called for all contracts in a single step to inform the agent about which were finally signed and which were rejected by any agents (including itself) :param signed: A list of signed contracts. These are binding :param cancelled: A list of cancelled contracts. These are not binding :param rejectors: A list of lists where each of the internal lists gives the rejectors of one of the cancelled contracts. Notice that it is possible that this list is empty which means that the contract other than being rejected by any agents (if that was possible in the specific world). Remarks: The default implementation is to call `on_contract_signed` for singed contracts and `on_contract_cancelled` for cancelled contracts .. py:method:: step() Called by the simulator at every simulation step .. py:method:: init() Called to initialize the agent **after** the world is initialized. the AWI is accessible at this point. .. py:method:: on_agent_bankrupt(agent: str, contracts: List[negmas.Contract], quantities: List[int], compensation_money: int) -> None Called whenever a contract is nullified (because the partner is bankrupt) :param agent: The ID of the agent that went bankrupt. :param contracts: All future contracts between this agent and the bankrupt agent. :param quantities: The actual quantities that these contracts will be executed at. :param compensation_money: The compensation money that is already added to the agent's wallet (if ANY). Remarks: - compensation_money will be nonzero iff immediate_compensation is enabled for this world .. py:method:: on_failures(failures: List[scml.scml2020.common.Failure]) -> None Called whenever there are failures either in production or in execution of guaranteed transactions :param failures: A list of `Failure` s. .. py:method:: on_negotiation_failure(partners: List[str], annotation: Dict[str, Any], mechanism: negmas.NegotiatorMechanismInterface, state: negmas.MechanismState) -> None Called whenever a negotiation ends without agreement .. py:method:: on_negotiation_success(contract: negmas.Contract, mechanism: negmas.NegotiatorMechanismInterface) -> None Called whenever a negotiation ends with agreement .. py:method:: on_contract_cancelled(contract: negmas.Contract, rejectors: List[str]) -> None Called whenever at least a partner did not sign the contract .. py:method:: on_contract_executed(contract: negmas.Contract) -> None Called after successful contract execution for which the agent is one of the partners. .. py:method:: on_contract_breached(contract: negmas.Contract, breaches: List[negmas.Breach], resolution: Optional[negmas.Contract]) -> None Called after complete processing of a contract that involved a breach. :param contract: The contract :param breaches: All breaches committed (even if they were resolved) :param resolution: The resolution contract if re-negotiation was successful. None if not.