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