public class ExponentialPriceCalculator extends java.lang.Object implements IOfferGenerator
| Modifier and Type | Field and Description | 
|---|---|
| protected double | baseThe base (base^round). | 
| protected boolean | increasingFlag indicating if increasing or decreasing prices are calculated. | 
| protected double | limitpriceThe limit price. | 
| protected double | minstepwidthThe minimum step width. | 
| protected java.util.List | pricesThe prices. | 
| protected int | roundThe negotiation round. | 
| protected double | startpriceThe start price. | 
| protected double | variationThe variation. | 
| Constructor and Description | 
|---|
| ExponentialPriceCalculator(double startprice,
                          double limitprice,
                          double base)Create a new exponential price calculator. | 
| ExponentialPriceCalculator(double startprice,
                          double limitprice,
                          double base,
                          double variation,
                          double minstepwidth)Create a new exponential price calculator. | 
| Modifier and Type | Method and Description | 
|---|---|
| java.lang.Comparable | getCurrentOffer()Get the price for the current round of this auction. | 
| java.lang.Comparable | getLastOffer()Returns the offer for the last round. | 
| java.lang.Comparable | getLimitOffer()Get the min price. | 
| int | getRound()Get the round. | 
| java.lang.Comparable | getStartOffer()Get the start price. | 
| static void | main(java.lang.String[] args)Main for testing. | 
| void | setNextRound()Increase the round. | 
protected int round
protected double startprice
protected double limitprice
protected java.util.List prices
protected double variation
protected double base
protected double minstepwidth
protected boolean increasing
public ExponentialPriceCalculator(double startprice,
                                  double limitprice,
                                  double base)
startprice - The start price.limitprice - The limit price (min or max) for a auction.base - The base for the exponential function.public ExponentialPriceCalculator(double startprice,
                                  double limitprice,
                                  double base,
                                  double variation,
                                  double minstepwidth)
startprice - the start pricelimitprice - the minimal price for a successful auctionbase - The base for the exponential function.variation - The variation in percentage (0->1) for the increment.
           The increment will be used to adapt the increment by multiplying
           it with (+/-) a random value that has maximal the variation
           percentage influence, e.g. setting 0.1 will cause the increment
           being maximally +/-10% changed.minstepwidth - The minimum step width (a positive value that describes
           the minimum price change in each round).public java.lang.Comparable getCurrentOffer()
getCurrentOffer in interface IOfferGeneratorpublic java.lang.Comparable getLastOffer()
getLastOffer in interface IOfferGeneratorpublic java.lang.Comparable getLimitOffer()
getLimitOffer in interface IOfferGeneratorpublic java.lang.Comparable getStartOffer()
getStartOffer in interface IOfferGeneratorpublic int getRound()
getRound in interface IOfferGeneratorpublic void setNextRound()
setNextRound in interface IOfferGeneratorpublic static void main(java.lang.String[] args)