OneShotState¶
- class scml.oneshot.OneShotState(exogenous_input_quantity, exogenous_input_price, exogenous_output_quantity, exogenous_output_price, disposal_cost, shortfall_penalty, current_balance, total_sales, total_supplies, n_products, n_processes, n_competitors, all_suppliers, all_consumers, bankrupt_agents, catalog_prices, price_multiplier, is_exogenous_forced, current_step, n_steps, relative_simulation_time, profile, n_lines, is_first_level, is_last_level, is_middle_level, my_input_product, my_output_product, level, my_suppliers, my_consumers, penalties_scale, n_input_negotiations, n_output_negotiations, trading_prices, exogenous_contract_summary, reports_of_agents, current_input_outcome_space, current_output_outcome_space, current_negotiation_details, sales, supplies, needed_sales, needed_supplies, running_negotiations)[source]¶
Bases:
object
State of a one-shot agent
Attributes Summary
A list of all consumers by product.
A list of all suppliers by product.
list of bankrupt agents
A list of the catalog prices (by product).
Current balance of the agent.
The current issues for all negotiations to buy the input product of the agent.
Details on all current negotiations separated into "buy" and "sell" dictionaries.
The current issues for all negotiations to buy the output product of the agent.
Current simulation step (inherited from
negmas.situated.AgentWorldInterface
).Current unit disposal cost
A list of n_products lists each giving the total quantity and average price of exogenous contracts for a product.
Exogenous input unit price for the current step
Exogenous input quantity for the current step
Exogenous output unit price for the current step
Exogenous output quantity for the current step
exogenous contracts always forced or can the agent decide not to sign them.
Is the agent in the first production level (i.e.
Is the agent in the last production level (i.e.
Is the agent neither a first level nor a last level agent
The production level which is numerically the same as the input product.
A list of IDs for all consumers to the agent (i.e.
The input product to the factory controlled by the agent.
The output product from the factory controlled by the agent.
A list of IDs for all suppliers to the agent (i.e.
Number of other factories on the same production level.
Number of negotiations with suppliers.
The number of production lines in the factory (private information).
Number of negotiations with consumers.
Number of processes in the production chain.
Number of products in the production chain.
Number of simulation steps (inherited from
negmas.situated.AgentWorldInterface
).Today's needed sales as of now (exogenous input - exogenous output - total sales so far).
Today's needed supplies as of now (exogenous output - exogenous input - total supplies).
The scale at which to calculate disposal cost/delivery penalties.
The multiplier multiplied by the trading/catalog price when the negotiation agendas are created to decide the maximum and lower quantities.
Gives the agent profile including its production cost, number of production lines, input product index, mean of its delivery penalties, mean of its disposal costs, standard deviation of its shortfall penalties and standard deviation of its disposal costs.
Fraction of the simulation completed (inherited from
negmas.situated.AgentWorldInterface
).Gives all past financial reports of a given agent.
Maps partner ID to the state of the running negotiation with it (if any)
Today's sales per customer so far.
Current unit shortfall penalty
Today's supplies per supplier so far.
Total quantity registered as sales using
awi.register_sale
.Total quantity registered as supplies using
awi.register_supply
.The trading prices of all products.
Attributes Documentation
- current_input_outcome_space: DiscreteCartesianOutcomeSpace¶
The current issues for all negotiations to buy the input product of the agent. If the agent is at level zero, this will be empty. This is exactly the same as current_input_outcome_space.issues
- current_negotiation_details: dict[str, dict[str, scml.oneshot.common.NegotiationDetails]]¶
Details on all current negotiations separated into “buy” and “sell” dictionaries.
- current_output_outcome_space: DiscreteCartesianOutcomeSpace¶
The current issues for all negotiations to buy the output product of the agent. If the agent is at level n_products - 1, this will be empty. This is exactly the same as current_output_outcome_space.issues
- exogenous_contract_summary: list[tuple[int, int]]¶
A list of n_products lists each giving the total quantity and average price of exogenous contracts for a product. This information is only available if
publish_exogenous_summary
is set in the world.
- is_exogenous_forced: bool¶
exogenous contracts always forced or can the agent decide not to sign them.
- is_first_level: bool¶
Is the agent in the first production level (i.e. it is an input agent that buys the raw material).
- is_last_level: bool¶
Is the agent in the last production level (i.e. it is an output agent that sells the final product).
- my_consumers: list[str]¶
A list of IDs for all consumers to the agent (i.e. agents that can buy the output product of the agent).
- my_suppliers: list[str]¶
A list of IDs for all suppliers to the agent (i.e. agents that can sell the input product of the agent).
- needed_sales: int¶
Today’s needed sales as of now (exogenous input - exogenous output - total sales so far).
- needed_supplies: int¶
Today’s needed supplies as of now (exogenous output - exogenous input - total supplies).
- penalties_scale: Literal['trading', 'catalog', 'unit', 'none']¶
The scale at which to calculate disposal cost/delivery penalties. “trading” and “catalog” mean trading and catalog prices. “unit” means the contract’s unit price while “none” means that disposal cost/shortfall penalty are absolute.
- price_multiplier: float¶
The multiplier multiplied by the trading/catalog price when the negotiation agendas are created to decide the maximum and lower quantities.
- profile: OneShotProfile¶
Gives the agent profile including its production cost, number of production lines, input product index, mean of its delivery penalties, mean of its disposal costs, standard deviation of its shortfall penalties and standard deviation of its disposal costs. See
OneShotProfile
for full description. This information is private information and no other agent knows it.
- relative_simulation_time: float¶
Fraction of the simulation completed (inherited from
negmas.situated.AgentWorldInterface
).
- reports_of_agents: dict[str, dict[int, scml.scml2019.common.FinancialReport]]¶
Gives all past financial reports of a given agent. See
FinancialReport
for details.