[519] | 1 | package geniusweb.profile;
|
---|
| 2 |
|
---|
[804] | 3 | import org.eclipse.jdt.annotation.NonNull;
|
---|
| 4 |
|
---|
[519] | 5 | import com.fasterxml.jackson.annotation.JsonSubTypes;
|
---|
| 6 | import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
---|
| 7 |
|
---|
| 8 | import geniusweb.issuevalue.Bid;
|
---|
| 9 | import geniusweb.issuevalue.Domain;
|
---|
| 10 | import geniusweb.profile.utilityspace.LinearAdditiveUtilitySpace;
|
---|
| 11 | import geniusweb.profile.utilityspace.SumOfGroupsUtilitySpace;
|
---|
| 12 |
|
---|
| 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 | @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.WRAPPER_OBJECT)
|
---|
| 21 | @JsonSubTypes({ @JsonSubTypes.Type(value = LinearAdditiveUtilitySpace.class),
|
---|
| 22 | @JsonSubTypes.Type(value = DefaultPartialOrdering.class),
|
---|
| 23 | @JsonSubTypes.Type(value = SumOfGroupsUtilitySpace.class) })
|
---|
| 24 | public interface Profile {
|
---|
| 25 |
|
---|
| 26 | /**
|
---|
| 27 | *
|
---|
| 28 | * @return the name of this profile. Must be simple name (a-Z, 0-9)
|
---|
| 29 | */
|
---|
[804] | 30 | @NonNull
|
---|
[519] | 31 | String getName();
|
---|
| 32 |
|
---|
| 33 | /**
|
---|
| 34 | * @return the domain in which this profile is defined.
|
---|
| 35 | */
|
---|
[804] | 36 | @NonNull
|
---|
[519] | 37 | Domain getDomain();
|
---|
| 38 |
|
---|
| 39 | /**
|
---|
| 40 | *
|
---|
| 41 | * @return a (hypothetical) bid that is the best alternative to a
|
---|
| 42 | * non-agreement. Only bids that are equal or better should be
|
---|
| 43 | * accepted. If a negotiation does not reach an agreement, the party
|
---|
| 44 | * can get this offer somewhere else. This replaces the older notion
|
---|
| 45 | * of a "reservation value" and is more general. If null, there is
|
---|
| 46 | * no reservation bid and any agreement is better than no agreement.
|
---|
| 47 | * This bid can be partial.
|
---|
| 48 | *
|
---|
| 49 | */
|
---|
| 50 | Bid getReservationBid();
|
---|
| 51 | }
|
---|