scml.std.common

Module Contents

Classes

FinancialReport

A report published periodically by the system showing the financial standing of an agent

StdState

State of a one-shot agent

StdExogenousContract

Exogenous contract information

StdProfile

Defines all private information of a factory

Functions

is_system_agent(→ bool)

Checks whether an agent is a system agent or not

Attributes

INFINITE_COST

A constant indicating an invalid cost for lines incapable of running some process

QUANTITY

Index of quantity in negotiation issues

SYSTEM_BUYER_ID

ID of the system buyer agent

SYSTEM_SELLER_ID

ID of the system seller agent

TIME

Index of time in negotiation issues

UNIT_PRICE

Index of unit price in negotiation issues

scml.std.common.INFINITE_COST[source]

A constant indicating an invalid cost for lines incapable of running some process

scml.std.common.QUANTITY = 0[source]

Index of quantity in negotiation issues

scml.std.common.SYSTEM_BUYER_ID = 'BUYER'[source]

ID of the system buyer agent

scml.std.common.SYSTEM_SELLER_ID = 'SELLER'[source]

ID of the system seller agent

scml.std.common.TIME = 1[source]

Index of time in negotiation issues

scml.std.common.UNIT_PRICE = 2[source]

Index of unit price in negotiation issues

class scml.std.common.FinancialReport[source]

A report published periodically by the system showing the financial standing of an agent

__slots__ = ['agent_id', 'step', 'cash', 'assets', 'breach_prob', 'breach_level', 'is_bankrupt', 'agent_name']
agent_id: str

Agent ID

step: int

Simulation step at the beginning of which the report was published.

cash: int

Cash in the agent’s wallet. Negative numbers indicate liabilities.

assets: int

Value of the products in the agent’s inventory @ catalog prices.

breach_prob: float

Number of times the agent breached a contract over the total number of contracts it signed.

breach_level: float

Sum of the agent’s breach levels so far divided by the number of contracts it signed.

is_bankrupt: bool

Whether the agent is already bankrupt (i.e. incapable of doing any more transactions).

agent_name: str

Agent name for printing purposes

__str__()[source]

Return str(self).

scml.std.common.is_system_agent(aid: str) bool[source]

Checks whether an agent is a system agent or not

Parameters:

aid – Agent ID

Returns:

True if the ID is for a system agent.

class scml.std.common.StdState[source]

Bases: scml.oneshot.common.OneShotState

State of a one-shot agent

class scml.std.common.StdExogenousContract[source]

Bases: scml.oneshot.common.OneShotExogenousContract

Exogenous contract information

class scml.std.common.StdProfile[source]

Bases: scml.oneshot.common.OneShotProfile

Defines all private information of a factory