source: geniuswebcore/geniusweb/profile/Profile.py@ 59

Last change on this file since 59 was 59, checked in by Wouter Pasman, 3 years ago

#44 manual commit of first public release, because this will cause the dist directory to move

File size: 1.5 KB
Line 
1from abc import ABC
2
3from pyson.JsonSubTypes import JsonSubTypes
4from pyson.JsonTypeInfo import Id, As
5from pyson.JsonTypeInfo import JsonTypeInfo
6from geniusweb.issuevalue.Bid import Bid
7from geniusweb.issuevalue.Domain import Domain
8
9
10@JsonTypeInfo(use=Id.NAME, include=As.WRAPPER_OBJECT)
11@JsonSubTypes(["geniusweb.profile.utilityspace.LinearAdditiveUtilitySpace.LinearAdditiveUtilitySpace"])
12class Profile(ABC):
13 '''
14 Profile is a very general object describing how much a {@link Bid} is
15 preferred. "is preferred" can be worked out in different ways, eg by a
16 function "isBetter" that says if bid1 is preferred over bid2, or by assigning
17 utility values to each bid that says how much I like that particular bid. All
18 profiles should be implemented immutable
19 '''
20
21 def getName(self)->str:
22 '''
23 @return the name of this profile. Must be simple name (a-Z, 0-9)
24 '''
25
26 def getDomain(self)->Domain :
27 '''
28 @return the domain in which this profile is defined.
29 '''
30
31 def getReservationBid(self) -> Bid :
32 '''
33 @return a (hypothetical) bid that is the best alternative to a
34 non-agreement. Only bids that are equal or better should be
35 accepted. If a negotiation does not reach an agreement, the party
36 can get this offer somewhere else. This replaces the older notion
37 of a "reservation value" and is more general. If null, there is
38 no reservation bid and any agreement is better than no agreement.
39 This bid can be partial.
40 '''
41
Note: See TracBrowser for help on using the repository browser.