scml.oneshot.helper

Module Contents

Classes

AWIHelper

The Agent SCML2020World Interface for SCML2020 world allowing a single process per agent

class scml.oneshot.helper.AWIHelper(owner: scml.oneshot.adapter.OneShotSCML2020Adapter)[source]

The Agent SCML2020World Interface for SCML2020 world allowing a single process per agent

property trading_prices: numpy.ndarray | None[source]

Returns the current trading prices of all products

property current_balance: float[source]
property exogenous_contract_summary[source]
property inputs: numpy.ndarray[source]

Returns the number of inputs to every production process

property outputs: numpy.ndarray[source]

Returns the number of outputs to every production process

property my_input_products: numpy.ndarray[source]

Returns a list of products that are inputs to at least one process the agent can run

property my_output_products: numpy.ndarray[source]

Returns a list of products that are outputs to at least one process the agent can run

property state: scml.scml2020.common.FactoryState[source]

Receives the factory state

property profile: scml.scml2020.common.FactoryProfile[source]

Gets the profile (static private information) associated with the agent

property allow_zero_quantity: bool[source]

Does negotiations allow zero quantity?

request_negotiations(is_buy: bool, product: int, quantity: int | tuple[int, int], unit_price: int | tuple[int, int], time: int | tuple[int, int], controller: negmas.sao.SAOController | None = None, negotiators: list[negmas.sao.SAONegotiator] | None = None, partners: list[str] | None = None, extra: dict[str, Any] | None = None, copy_partner_id=True) bool[source]
request_negotiation(is_buy: bool, product: int, quantity: int | tuple[int, int], unit_price: int | tuple[int, int], time: int | tuple[int, int], partner: str, negotiator: negmas.sao.SAONegotiator, extra: dict[str, Any] | None = None) bool[source]
schedule_production(process: int, repeats: int, step: int | tuple[int, int] = ANY_STEP, line: int = ANY_LINE, override: bool = True, method: str = 'latest', partial_ok: bool = False) tuple[numpy.ndarray, numpy.ndarray][source]
order_production(process: int, steps: numpy.ndarray, lines: numpy.ndarray) None[source]
available_for_production(repeats: int, step: int | tuple[int, int] = ANY_STEP, line: int = ANY_LINE, override: bool = True, method: str = 'latest') tuple[numpy.ndarray, numpy.ndarray][source]
set_commands(commands: numpy.ndarray, step: int = -1) None[source]
cancel_production(step: int, line: int) bool[source]
__getattr__(attr)[source]
is_system(aid: str) bool[source]

Checks whether an agent is a system agent or not

Parameters:

aid – Agent ID