1 | package geniusweb.profile;
|
---|
2 |
|
---|
3 | import com.fasterxml.jackson.annotation.JsonSubTypes;
|
---|
4 | import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
---|
5 |
|
---|
6 | import geniusweb.issuevalue.Bid;
|
---|
7 | import geniusweb.issuevalue.Domain;
|
---|
8 | import geniusweb.profile.utilityspace.LinearAdditiveUtilitySpace;
|
---|
9 | import geniusweb.profile.utilityspace.SumOfGroupsUtilitySpace;
|
---|
10 |
|
---|
11 | /**
|
---|
12 | * Profile is a very general object describing how much a {@link Bid} is
|
---|
13 | * preferred. "is preferred" can be worked out in different ways, eg by a
|
---|
14 | * function "isBetter" that says if bid1 is preferred over bid2, or by assigning
|
---|
15 | * utility values to each bid that says how much I like that particular bid. All
|
---|
16 | * profiles should be implemented immutable
|
---|
17 | */
|
---|
18 | @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.WRAPPER_OBJECT)
|
---|
19 | @JsonSubTypes({ @JsonSubTypes.Type(value = LinearAdditiveUtilitySpace.class),
|
---|
20 | @JsonSubTypes.Type(value = DefaultPartialOrdering.class),
|
---|
21 | @JsonSubTypes.Type(value = SumOfGroupsUtilitySpace.class) })
|
---|
22 | public interface Profile {
|
---|
23 |
|
---|
24 | /**
|
---|
25 | *
|
---|
26 | * @return the name of this profile. Must be simple name (a-Z, 0-9)
|
---|
27 | */
|
---|
28 | String getName();
|
---|
29 |
|
---|
30 | /**
|
---|
31 | * @return the domain in which this profile is defined.
|
---|
32 | */
|
---|
33 | Domain getDomain();
|
---|
34 |
|
---|
35 | /**
|
---|
36 | *
|
---|
37 | * @return a (hypothetical) bid that is the best alternative to a
|
---|
38 | * non-agreement. Only bids that are equal or better should be
|
---|
39 | * accepted. If a negotiation does not reach an agreement, the party
|
---|
40 | * can get this offer somewhere else. This replaces the older notion
|
---|
41 | * of a "reservation value" and is more general. If null, there is
|
---|
42 | * no reservation bid and any agreement is better than no agreement.
|
---|
43 | * This bid can be partial.
|
---|
44 | *
|
---|
45 | */
|
---|
46 | Bid getReservationBid();
|
---|
47 | }
|
---|