scml.scml2020.common
Attributes
ID of the system seller agent |
|
ID of the system buyer agent |
|
ID of the takeover agent |
|
Used to indicate any time-step |
|
Used to indicate any line |
|
A constant indicating no command is scheduled on a factory line |
|
A constant indicating an invalid cost for lines incapable of running some process |
|
Index of quantity in negotiation issues |
|
Index of time in negotiation issues |
|
Index of unit price in negotiation issues |
Classes
Represents a contract to be revealed at revelation_time to buyer and seller between them that is not agreed upon |
|
A report published periodically by the system showing the financial standing of an agent |
|
Defines all private information of a factory |
|
A production failure |
|
Functions
|
Checks whether an agent is a system agent or not |
Module Contents
- scml.scml2020.common.NO_COMMAND = -1[source]
A constant indicating no command is scheduled on a factory line
- scml.scml2020.common.INFINITE_COST = 4611686018427387903[source]
A constant indicating an invalid cost for lines incapable of running some process
- scml.scml2020.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.scml2020.common.ExogenousContract[source]
Represents a contract to be revealed at revelation_time to buyer and seller between them that is not agreed upon through negotiation but is endogenously given
- class scml.scml2020.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'][source]
- breach_prob: float[source]
Number of times the agent breached a contract over the total number of contracts it signed.
- breach_level: float[source]
Sum of the agent’s breach levels so far divided by the number of contracts it signed.
- class scml.scml2020.common.FactoryProfile[source]
Defines all private information of a factory
- costs: numpy.ndarray[source]
An n_lines * n_processes array giving the cost of executing any process (INVALID_COST indicates infinity)
- property processes: numpy.ndarray[source]
The processes that have valid costs
- property input_products: numpy.ndarray[source]
The input products to all processes runnable (See
processes
)
- property output_products: numpy.ndarray[source]
The output products to all processes runnable (See
processes
)
- class scml.scml2020.common.Failure[source]
A production failure
- class scml.scml2020.common.FactoryState[source]
- inventory: numpy.ndarray[source]
An n_products vector giving current quantity of every product in storage
- commands: numpy.ndarray[source]
n_steps * n_lines array giving the process scheduled on each line at every step for the whole simulation
- inventory_changes: numpy.ndarray[source]
Changes in the inventory in the last step