GreedyFactoryManager

class scml.scml2019.GreedyFactoryManager(name=None, simulator_type=<class 'scml.scml2019.simulators.FastFactorySimulator'>, scheduler_type=<class 'scml.scml2019.schedulers.GreedyScheduler'>, scheduler_params=None, optimism=0.0, negotiator_type='negmas.sao.AspirationNegotiator', negotiator_params=None, n_retrials=5, use_consumer=True, reactive=True, sign_only_guaranteed_contracts=False, riskiness=0.0, max_insurance_premium=0.1, reserved_value=-inf)[source]

Bases: scml.scml2019.DoNothingFactoryManager

The default factory manager that will be implemented by the committee of ANAC-SCML 2019

Methods Summary

can_produce(cfp[, …])

Whether or not we can produce the required item in time

can_secure_needs(schedule, step)

Finds if it is possible in principle to arrange these needs at the given time.

confirm_contract_execution(contract)

Called before executing any agreement

confirm_loan(loan, bankrupt_if_rejected)

called by the world manager to confirm a loan if needed by the buyer of a contract that is about to be breached

init()

Called to initialize the agent after the world is initialized.

on_contract_signed(contract)

Called whenever a contract is signed by all partners

on_negotiation_failure(partners, annotation, …)

Called whenever a negotiation ends without agreement

on_negotiation_success(contract, mechanism)

Called whenever a negotiation ends with agreement

on_new_cfp(cfp)

Called when a new CFP for a product for which the agent registered interest is published

on_production_failure(failures)

Called with a list of ProductionFailure records on production failure.

on_production_success(reports)

Called with a list of ProductionReport records on production success

respond_to_negotiation_request(cfp, partner)

Called when a prospective partner requests a negotiation to start

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

sign_contract(contract)

Called after the signing delay from contract conclusion to sign the contract.

step()

Called by the simulator at every simulation step

total_utility([contracts])

Calculates the total utility for the agent of a collection of contracts

Methods Documentation

can_produce(cfp, assume_no_further_negotiations=False)[source]

Whether or not we can produce the required item in time

Return type

bool

can_secure_needs(schedule, step)[source]

Finds if it is possible in principle to arrange these needs at the given time.

Parameters

Returns:

confirm_contract_execution(contract)[source]

Called before executing any agreement

Return type

bool

confirm_loan(loan, bankrupt_if_rejected)[source]

called by the world manager to confirm a loan if needed by the buyer of a contract that is about to be breached

Return type

bool

init()[source]

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

on_contract_signed(contract)[source]

Called whenever a contract is signed by all partners

on_negotiation_failure(partners, annotation, mechanism, state)[source]

Called whenever a negotiation ends without agreement

Return type

None

on_negotiation_success(contract, mechanism)[source]

Called whenever a negotiation ends with agreement

on_new_cfp(cfp)[source]

Called when a new CFP for a product for which the agent registered interest is published

Return type

None

on_production_failure(failures)[source]

Called with a list of ProductionFailure records on production failure.

Return type

None

on_production_success(reports)[source]

Called with a list of ProductionReport records on production success

Return type

None

respond_to_negotiation_request(cfp, partner)[source]

Called when a prospective partner requests a negotiation to start

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).

sign_contract(contract)[source]

Called after the signing delay from contract conclusion to sign the contract. Contracts become binding only after they are signed.

step()[source]

Called by the simulator at every simulation step

total_utility(contracts=())[source]

Calculates the total utility for the agent of a collection of contracts

Return type

float