DefaultBank

class scml.scml2019.DefaultBank(minimum_balance, interest_rate, interest_max, balance_at_max_interest, installment_interest, time_increment, a2f, disabled=False, name=None)[source]

Bases: scml.scml2019.Bank

Represents a bank in the world

Methods Summary

buy_loan(agent, amount, n_installments, …)

Gives a loan of amount to agent at the interest calculated using evaluate_loan

credit_rating(agent_id)

rtype

float

evaluate_loan(agent, amount, start_at, …)

Evaluates the interest that will be imposed on the agent to buy_loan that amount

init()

Called to initialize the agent after the world is initialized.

respond_to_negotiation_request(initiator, …)

rtype

Optional[Negotiator]

respond_to_renegotiation_request(contract, …)

Called to respond to a renegotiation request

set_renegotiation_agenda(contract, breaches)

Received by partners in ascending order of their total breach levels in order to set the renegotiation agenda when contract execution fails

step()

Takes payments from agents

Methods Documentation

buy_loan(agent, amount, n_installments, beneficiary, contract, force=False)[source]

Gives a loan of amount to agent at the interest calculated using evaluate_loan

Return type

Optional[Loan]

credit_rating(agent_id)[source]
Return type

float

evaluate_loan(agent, amount, start_at, n_installments)[source]

Evaluates the interest that will be imposed on the agent to buy_loan that amount

Return type

Optional[Loan]

init()[source]

Called to initialize the agent after the world is initialized. the AWI is accessible at this point.

respond_to_negotiation_request(initiator, partners, issues, annotation, mechanism, role, req_id)[source]
Return type

Optional[Negotiator]

respond_to_renegotiation_request(contract, breaches, agenda)[source]

Called to respond to a renegotiation request

Parameters
  • agenda (RenegotiationRequest) –

  • contract (Contract) –

  • breaches (List[Breach]) –

Returns:

Return type

Optional[Negotiator]

set_renegotiation_agenda(contract, breaches)[source]

Received by partners in ascending order of their total breach levels in order to set the renegotiation agenda when contract execution fails

Parameters
  • contract (Contract) – The contract being breached

  • breaches (List[Breach]) – All breaches on contract

Return type

Optional[RenegotiationRequest]

Returns

Renegotiation agenda (issues to negotiate about to avoid reporting the breaches).

step()[source]

Takes payments from agents