public class UtilitySpaceTools
extends java.lang.Object
UtilitySpace
. Some utility functions that work on
a utility space. Works as an add-on on a given UtilitySpace
. Does not
extend it, so that receivers of an abstract UtilitySpace
can connect
it with these tools too.
This is a class, not a set of static functions, to allow caching of results (not yet used).
Constructor and Description |
---|
UtilitySpaceTools(UtilitySpace space) |
Modifier and Type | Method and Description |
---|---|
void |
checkReadyForNegotiation(Domain dom)
Check if this utility space is ready for negotiation.
|
Bid |
getMaxUtilityBid()
Returns the maximum bid in the utility space.
|
Bid |
getMinUtilityBid()
Returns the worst bid in the utility space.
|
public UtilitySpaceTools(UtilitySpace space)
public final Bid getMaxUtilityBid() throws java.lang.Exception
java.lang.Exception
- if there is no bid at all in this util space.public Bid getMinUtilityBid() throws java.lang.Exception
java.lang.Exception
- if there is no bid at all in the util spacepublic void checkReadyForNegotiation(Domain dom) throws java.lang.Exception
dom
- is the domain in which nego is taking placejava.lang.Exception
- if utility space is incomplete (@see isComplete())