Source code for scml.scml2020.agents.do_nothing

"""Implements an agent that does nothing"""
from typing import Any, Dict, List, Optional

from negmas import (
    Breach,
    Contract,
    Issue,
    MechanismState,
    Negotiator,
    NegotiatorMechanismInterface,
)

from scml.scml2020.agent import SCML2020Agent
from scml.scml2020.common import Failure

__all__ = ["DoNothingAgent"]


[docs] class DoNothingAgent(SCML2020Agent): """An agent that does nothing for the whole length of the simulation"""
[docs] def respond_to_negotiation_request( self, initiator: str, issues: List[Issue], annotation: Dict[str, Any], mechanism: NegotiatorMechanismInterface, ) -> Optional[Negotiator]: return None
[docs] def sign_all_contracts(self, contracts: List[Contract]) -> List[Optional[str]]: return [None] * len(contracts)
[docs] def on_contracts_finalized( self, signed: List[Contract], cancelled: List[Contract], rejectors: List[List[str]], ) -> None: pass
[docs] def step(self): pass
[docs] def init(self): pass
[docs] def on_agent_bankrupt( self, agent: str, contracts: List[Contract], quantities: List[int], compensation_money: int, ) -> None: pass
[docs] def on_failures(self, failures: List[Failure]) -> None: pass
[docs] def on_negotiation_failure( self, partners: List[str], annotation: Dict[str, Any], mechanism: NegotiatorMechanismInterface, state: MechanismState, ) -> None: pass
[docs] def on_negotiation_success( self, contract: Contract, mechanism: NegotiatorMechanismInterface ) -> None: pass
[docs] def on_contract_cancelled(self, contract: Contract, rejectors: List[str]) -> None: pass
[docs] def on_contract_executed(self, contract: Contract) -> None: pass
[docs] def on_contract_breached( self, contract: Contract, breaches: List[Breach], resolution: Optional[Contract] ) -> None: pass