OneShotAdapter

class scml.scml2020.OneShotAdapter(oneshot_type, oneshot_params, obj=None, name=None, type_postfix='', ufun=None)[source]

Bases: scml.SignAll, scml.DemandDrivenProductionStrategy, scml.MarketAwareTradePredictionStrategy, scml.SCML2020Agent, negmas.situated.situated.Adapter, scml.oneshot.mixins.OneShotUFunCreatorMixin

An adapter allowing agents developed for SCML-OneShot to run in SCML2020World simulations.

Attributes Summary

price_multiplier

Methods Summary

before_step()

get_current_balance()

get_disposal_cost()

rtype

float

get_disposal_cost_dev()

get_disposal_cost_mean()

get_exogenous_input()

rtype

Tuple[int, int]

get_exogenous_output()

rtype

Tuple[int, int]

get_profile()

get_shortfall_penalty()

get_shortfall_penalty_dev()

get_shortfall_penalty_mean()

init()

Override this method to modify initialization logic

make_ufun(add_exogenous)

respond_to_negotiation_request(initiator, …)

Called whenever another agent requests a negotiation with this agent.

step()

Override this method to modify stepping logic

to_dict()

Attributes Documentation

price_multiplier

Methods Documentation

before_step()[source]
get_current_balance()[source]
get_disposal_cost()[source]
Return type

float

get_disposal_cost_dev()[source]
get_disposal_cost_mean()[source]
get_exogenous_input()[source]
Return type

Tuple[int, int]

get_exogenous_output()[source]
Return type

Tuple[int, int]

get_profile()[source]
get_shortfall_penalty()[source]
get_shortfall_penalty_dev()[source]
get_shortfall_penalty_mean()[source]
init()[source]

Override this method to modify initialization logic

make_ufun(add_exogenous)[source]
respond_to_negotiation_request(initiator, issues, annotation, mechanism)[source]

Called whenever another agent requests a negotiation with this agent.

Parameters
  • initiator – The ID of the agent that requested this negotiation

  • issues – Negotiation issues

  • annotation – Annotation attached with this negotiation

  • mechanism – The AgentMechanismInterface interface to the mechanism to be used for this negotiation.

Returns

None to reject the negotiation, otherwise a negotiator

step()[source]

Override this method to modify stepping logic

to_dict()[source]