NegotiationManager¶
-
class
scml.scml2020.
NegotiationManager
(*args, horizon=5, negotiate_on_signing=True, **kwargs)[source]¶ Bases:
object
A negotiation manager is a component that provides negotiation control functionality to an agent
- Parameters
horizon – The number of steps in the future to consider for selling outputs.
- Provides:
start_negotiations
An easy to use method to start a set of buy/sell negotiations
- Requires:
- Abstract:
- Hooks Into:
- Remarks:
Attributes
section describes the attributes that can be used to construct the component (passed to its__init__
method).Provides
section describes the attributes (methods, properties, data-members) made available by this component directly. Note that everything provided by the bases of this components are also available to the agent (Check theBases
section above for all the bases of this component).Requires
section describes any requirements from the agent using this component. It defines a set of methods or properties/data-members that must exist in the agent that uses this component. These requirement are usually implemented as abstract methods in the componentAbstract
section describes abstract methods that MUST be implemented by any descendant of this component.Hooks Into
section describes the methods this component overrides callingsuper
() which allows other components to hook into the same method (by overriding it). Usually callbacks starting withon_
are hooked into this way.Overrides
section describes the methods this component overrides without callingsuper
effectively disallowing any other components after it in the MRO to call this method. Usually methods that do some action (i.e. not starting withon_
) are overridden this way.
Methods Summary
acceptable_unit_price
(step, sell)Returns the maximum/minimum acceptable unit price for buying/selling at the given time-step
init
()on_contracts_finalized
(signed, cancelled, …)- rtype
None
respond_to_negotiation_request
(initiator, …)- rtype
Optional
[Negotiator
]
start_negotiations
(product, quantity, …[, …])Starts a set of negotiations to by/sell the product with the given limits
step
()target_quantities
(steps, sell)Returns the target quantity to negotiate about for each step in the range given (beginning included and ending excluded) for buying/selling
target_quantity
(step, sell)Returns the target quantity to sell/buy at a given time-step
Methods Documentation
-
abstract
acceptable_unit_price
(step, sell)[source]¶ Returns the maximum/minimum acceptable unit price for buying/selling at the given time-step
-
abstract
respond_to_negotiation_request
(initiator, issues, annotation, mechanism)[source]¶ - Return type
Optional
[Negotiator
]
-
start_negotiations
(product, quantity, unit_price, step, partners=None)[source]¶ Starts a set of negotiations to by/sell the product with the given limits
- Parameters
product (
int
) – product type. If it is an input product, negotiations to buy it will be started otherweise to sell.quantity (
int
) – The maximum quantity to negotiate aboutunit_price (
int
) – The maximum/minimum unit price for buy/sellstep (
int
) – The maximum/minimum time for buy/sellpartners (
Optional
[List
[str
]]) – A list of partners to negotiate with
Remarks:
This method assumes that product is either my_input_product or my_output_product
- Return type
None