scml.std.common =============== .. py:module:: scml.std.common Attributes ---------- .. autoapisummary:: scml.std.common.INFINITE_COST scml.std.common.QUANTITY scml.std.common.SYSTEM_BUYER_ID scml.std.common.SYSTEM_SELLER_ID scml.std.common.TIME scml.std.common.UNIT_PRICE Classes ------- .. autoapisummary:: scml.std.common.FinancialReport scml.std.common.StdState scml.std.common.StdExogenousContract scml.std.common.StdProfile Functions --------- .. autoapisummary:: scml.std.common.is_system_agent Module Contents --------------- .. py:data:: INFINITE_COST :value: 4611686018427387903 A constant indicating an invalid cost for lines incapable of running some process .. py:data:: QUANTITY :value: 0 Index of quantity in negotiation issues .. py:data:: SYSTEM_BUYER_ID :value: 'BUYER' ID of the system buyer agent .. py:data:: SYSTEM_SELLER_ID :value: 'SELLER' ID of the system seller agent .. py:data:: TIME :value: 1 Index of time in negotiation issues .. py:data:: UNIT_PRICE :value: 2 Index of unit price in negotiation issues .. py:class:: FinancialReport A report published periodically by the system showing the financial standing of an agent .. py:attribute:: __slots__ :value: ['agent_id', 'step', 'cash', 'assets', 'breach_prob', 'breach_level', 'is_bankrupt', 'agent_name'] .. py:attribute:: agent_id :type: str Agent ID .. py:attribute:: step :type: int Simulation step at the beginning of which the report was published. .. py:attribute:: cash :type: int Cash in the agent's wallet. Negative numbers indicate liabilities. .. py:attribute:: assets :type: int Value of the products in the agent's inventory @ catalog prices. .. py:attribute:: breach_prob :type: float Number of times the agent breached a contract over the total number of contracts it signed. .. py:attribute:: breach_level :type: float Sum of the agent's breach levels so far divided by the number of contracts it signed. .. py:attribute:: is_bankrupt :type: bool Whether the agent is already bankrupt (i.e. incapable of doing any more transactions). .. py:attribute:: agent_name :type: str Agent name for printing purposes .. py:method:: __str__() .. py:function:: is_system_agent(aid: str) -> bool Checks whether an agent is a system agent or not :param aid: Agent ID :returns: True if the ID is for a system agent. .. py:class:: StdState Bases: :py:obj:`scml.oneshot.common.OneShotState` State of a one-shot agent .. py:class:: StdExogenousContract Bases: :py:obj:`scml.oneshot.common.OneShotExogenousContract` Exogenous contract information .. py:class:: StdProfile Bases: :py:obj:`scml.oneshot.common.OneShotProfile` Defines all private information of a factory