CFP¶
-
class
scml.scml2019.
CFP
(is_buy, publisher, product, time, unit_price, quantity, penalty=None, signing_delay=None, money_resolution=None, id=<factory>)[source]¶ Bases:
negmas.outcomes.OutcomeType
A Call for proposal upon which a negotiation can start
Attributes Summary
Returns the set of issues associated with this CFP.
If not None then it is the minimum unit of money (e.g.
penalty per missing item in case the seller cannot provide the required quantity.
The grace period after which the agents are asked to confirm signing the contract
Methods Summary
asdict
()Converts the outcome to a dict containing all fields
astuple
()Converts the outcome to a tuple where the order of items is the same as they are defined as fields
from_java
(idict[, class_name])- rtype
get
(name[, default])Acts like dict.get
keys
()- rtype
List
[str
]
satisfies
(query)Tests whether the CFP satisfies the conditions set by the query
to_java
()values
()- rtype
List
[str
]
Attributes Documentation
-
issues
¶ Returns the set of issues associated with this CFP. Notice that some of the issues may have a single value
-
max_penalty
¶
-
max_quantity
¶
-
max_signing_delay
¶
-
max_time
¶
-
max_unit_price
¶
-
min_penalty
¶
-
min_quantity
¶
-
min_signing_delay
¶
-
min_time
¶
-
min_unit_price
¶
-
money_resolution
= None¶ If not None then it is the minimum unit of money (e.g. 1 for dollar, 0.01 for cent, etc)
-
outcomes
¶
-
penalty
= None¶ penalty per missing item in case the seller cannot provide the required quantity. May be negotiable.
-
signing_delay
= None¶ The grace period after which the agents are asked to confirm signing the contract
Methods Documentation
-
asdict
()¶ Converts the outcome to a dict containing all fields
-
astuple
()¶ Converts the outcome to a tuple where the order of items is the same as they are defined as fields
-
get
(name, default=None)¶ Acts like dict.get
-
keys
()¶ - Return type
List
[str
]
-
satisfies
(query)[source]¶ Tests whether the CFP satisfies the conditions set by the query
- Parameters
query (
Dict
[str
,Any
]) – A dictionary given the conditions. SeeRemarks
for details
Remarks:
The query dictionary can be used to specify any conditions that are required in the CFP. Only CFPs that satisfy ALL the conditions specified in the query are considered satisfying the query. The following keys can be set with corresponding meanings:
- is_buy
True or False. If both are OK, just do not add this key
- publisher
A string or
SCMLAgent
specifying a specific publisher- publishers
A list of publishers (see publisher key)
- product
A string specifying a product name
- products
A list of products (see product key)
- time
A number, list or 2-items-tuple (range) specifying possible times to consider satisfactory
- unit_price
A number, list or 2-items-tuple (range) specifying possible prices to consider satisfactory
- quantity
A number, list or 2-items-tuple (range) specifying possible quantities to consider OK
- penalty
A number, list or 2-items-tuple (range) specifying possible penalties to consider satisfactory
- Return type
bool
-
values
()¶ - Return type
List
[str
]