Source code for scml.scml2020.agents.do_nothing

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

from negmas import Breach
from negmas import Contract
from negmas import Issue
from negmas import MechanismState
from negmas import Negotiator
from negmas import NegotiatorMechanismInterface

from scml.scml2020 import Failure
from scml.scml2020 import SCML2020Agent

__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