def buyInsurance(self, contract: Dict[str, Any]) -> bool: """Buys insurance for the contract by the premium calculated by the insurance company. Remarks: The agent can call `evaluate_insurance` to find the premium that will be used. """ return self.shadow.buy_insurance(from_java(contract))
def requestNegotiation(self, cfp, req_id: str, roles=None, mechanism_name=None, mechanism_params=None): return self.shadow.request_negotiation(from_java(cfp), req_id, roles, mechanism_name, mechanism_params)
def evaluateInsurance( self, contract: Dict[str, Any], t: int = None ) -> Optional[float]: """Can be called to evaluate the premium for insuring the given contract against breaches committed by others Args: contract: hypothetical contract t: time at which the policy is to be bought. If None, it means current step """ result = self.shadow.evaluate_insurance(from_java(contract), t) if result < 0: return None return result
def unregisterInterest(self, products: List[int]) -> None: """registers interest in receiving callbacks about CFPs related to these products""" self.shadow.unregister_interest(from_java(products))
def removeCFP(self, cfp: Dict[str, Any]) -> bool: """Removes a CFP""" return self.shadow.remove_cfp(from_java(cfp))
def registerCFP(self, cfp: Dict[str, Any]) -> None: """Registers a CFP""" self.shadow.register_cfp(from_java(cfp))