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

issues

Returns the set of issues associated with this CFP.

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

If not None then it is the minimum unit of money (e.g.

outcomes

penalty

penalty per missing item in case the seller cannot provide the required quantity.

signing_delay

The grace period after which the agents are asked to confirm signing the contract

Methods Summary

from_java(idict[, class_name])

rtype

CFP

satisfies(query)

Tests whether the CFP satisfies the conditions set by the query

to_java()

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: Optional[float] = None

If not None then it is the minimum unit of money (e.g. 1 for dollar, 0.01 for cent, etc)

outcomes
penalty: Optional[Union[float, Tuple[float, float], List[float]]] = None

penalty per missing item in case the seller cannot provide the required quantity. May be negotiable.

signing_delay: Optional[Union[int, Tuple[int, int], List[int]]] = None

The grace period after which the agents are asked to confirm signing the contract

Methods Documentation

classmethod from_java(idict, class_name=None)[source]
Return type

CFP

satisfies(query)[source]

Tests whether the CFP satisfies the conditions set by the query

Parameters

query (Dict[str, Any]) – A dictionary given the conditions. See Remarks 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 SCML2019Agent 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

to_java()[source]