public class Utility
extends java.lang.Object
Constructor and Description |
---|
Utility() |
Modifier and Type | Method and Description |
---|---|
static Action |
chooseRandomBidAction(Agent agent)
Wrapper for getRandomBid, for convenience.
|
static Bid |
getRandomBid(UtilitySpace utilityspace) |
static double |
Paccept(double u,
double t1)
This function determines the accept probability for an offer.
|
static double |
sq(double x) |
public static Action chooseRandomBidAction(Agent agent)
public static Bid getRandomBid(UtilitySpace utilityspace) throws java.lang.Exception
java.lang.Exception
- if we can't compute the utility (eg no evaluators have been set)
or when other evaluators than a DiscreteEvaluator are present in the util space.public static double Paccept(double u, double t1) throws java.lang.Exception
u
- is the utilityt
- is the time as fraction of the total available time
(t=0 at start, and t=1 at end time)java.lang.Exception
- if you use wrong values for u or t.public static double sq(double x)