uk.ac.liv.auction.core
Class KContinuousDoubleAuctioneer

java.lang.Object
  extended byuk.ac.liv.auction.core.AbstractAuctioneer
      extended byuk.ac.liv.auction.core.KAuctioneer
          extended byuk.ac.liv.auction.core.KContinuousDoubleAuctioneer
All Implemented Interfaces:
Auctioneer, java.lang.Cloneable, Parameterizable, ParameterizablePricing, Prototypeable, QuoteProvider, Resetable, java.io.Serializable
Direct Known Subclasses:
KContinuousDoubleAuctioneerNoQueue

public class KContinuousDoubleAuctioneer
extends KAuctioneer
implements java.io.Serializable

An auctioneer for a k-double-auction with continuous clearing. The clearing operation is performed every time a shout arrives. Shouts must beat the current quote in order to be accepted.

Version:
$Revision: 1.19 $
Author:
Steve Phelps
See Also:
Serialized Form

Field Summary
 
Fields inherited from class uk.ac.liv.auction.core.KAuctioneer
clearingQuote, P_PRICING, pricingPolicy
 
Fields inherited from class uk.ac.liv.auction.core.AbstractAuctioneer
auction, currentQuote, shoutEngine
 
Constructor Summary
KContinuousDoubleAuctioneer()
           
KContinuousDoubleAuctioneer(Auction auction)
           
KContinuousDoubleAuctioneer(Auction auction, double k)
           
KContinuousDoubleAuctioneer(Auction auction, KPricingPolicy policy)
           
KContinuousDoubleAuctioneer(double k)
           
 
Method Summary
 void checkImprovement(Shout shout)
           
 void endOfAuctionProcessing()
           
 void endOfRoundProcessing()
           
 void generateQuote()
           
protected  void initialise()
           
 void newShout(Shout shout)
          Code for handling a new shout in the auction.
 boolean shoutsVisible()
          Return true if the shouts of others are visible.
 
Methods inherited from class uk.ac.liv.auction.core.KAuctioneer
askQuote, bidQuote, clear, determineClearingPrice, getK, setK, setPricingPolicy, setup
 
Methods inherited from class uk.ac.liv.auction.core.AbstractAuctioneer
askIterator, bidIterator, endOfDayProcessing, getAuction, getQuote, newAsk, newBid, printState, protoClone, removeShout, reset, setAuction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KContinuousDoubleAuctioneer

public KContinuousDoubleAuctioneer()

KContinuousDoubleAuctioneer

public KContinuousDoubleAuctioneer(double k)

KContinuousDoubleAuctioneer

public KContinuousDoubleAuctioneer(Auction auction,
                                   double k)

KContinuousDoubleAuctioneer

public KContinuousDoubleAuctioneer(Auction auction,
                                   KPricingPolicy policy)

KContinuousDoubleAuctioneer

public KContinuousDoubleAuctioneer(Auction auction)
Method Detail

generateQuote

public void generateQuote()
Specified by:
generateQuote in class AbstractAuctioneer

endOfRoundProcessing

public void endOfRoundProcessing()
Specified by:
endOfRoundProcessing in interface Auctioneer

endOfAuctionProcessing

public void endOfAuctionProcessing()
Specified by:
endOfAuctionProcessing in interface Auctioneer

shoutsVisible

public boolean shoutsVisible()
Description copied from interface: Auctioneer
Return true if the shouts of others are visible.

Specified by:
shoutsVisible in interface Auctioneer

newShout

public void newShout(Shout shout)
              throws IllegalShoutException
Description copied from class: AbstractAuctioneer
Code for handling a new shout in the auction. Subclasses should override this method if they wish to provide different handling for different auction rules.

Specified by:
newShout in interface Auctioneer
Overrides:
newShout in class AbstractAuctioneer
Parameters:
shout - The new shout to be processed
Throws:
IllegalShoutException - Thrown if the shout is invalid in some way.

checkImprovement

public void checkImprovement(Shout shout)
                      throws IllegalShoutException
Throws:
IllegalShoutException

initialise

protected void initialise()
Overrides:
initialise in class AbstractAuctioneer