|
Jadex 0.96-beta1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjadex.planlib.ExponentialPriceCalculator
public class ExponentialPriceCalculator
A sample implementation of the IPriceCalculator. Calculates the price for the next round of an english auction.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
Comparable |
getCurrentOffer()
Get the price for the current round of this auction. |
Comparable |
getLimitOffer()
Get the min price. |
int |
getRound()
Get the round. |
Comparable |
getStartOffer()
Get the start price. |
static void |
main(String[] args)
Main for testing. |
void |
setNextRound()
Increase the round. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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).Method Detail |
---|
public Comparable getCurrentOffer()
getCurrentOffer
in interface IOfferGenerator
public Comparable getLimitOffer()
getLimitOffer
in interface IOfferGenerator
public Comparable getStartOffer()
getStartOffer
in interface IOfferGenerator
public int getRound()
getRound
in interface IOfferGenerator
public void setNextRound()
setNextRound
in interface IOfferGenerator
public static void main(String[] args)
|
Jadex 0.96-beta1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.