net.sourceforge.jasa.market.auctioneer
Class AscendingAuctioneer

java.lang.Object
  extended by net.sourceforge.jasa.market.auctioneer.AbstractAuctioneer
      extended by net.sourceforge.jasa.market.auctioneer.TransparentAuctioneer
          extended by net.sourceforge.jasa.market.auctioneer.AscendingAuctioneer
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, MarketEventListener, Auctioneer, QuoteProvider

public class AscendingAuctioneer
extends TransparentAuctioneer
implements java.io.Serializable

Auctioneer for standard multi-unit english ascending market.

See Also:
Serialized Form
 

Field Summary
protected  Account account
           
static java.lang.String P_QUANTITY
           
static java.lang.String P_RESERVEPRICE
           
static java.lang.String P_SELLER
           
protected  double reservePrice
          The reservation price.
protected  TradingAgent seller
          The seller.
 
Fields inherited from class net.sourceforge.jasa.market.auctioneer.TransparentAuctioneer
acceptedShouts, lastAsk, lastBid, lastShout
 
Fields inherited from class net.sourceforge.jasa.market.auctioneer.AbstractAuctioneer
clearingPolicy, clearingQuote, currentQuote, market, orderBook, pricingPolicy
 
Constructor Summary
AscendingAuctioneer(Market auction, TradingAgent seller, int quantity, double reservePrice)
           
 
Method Summary
protected  void checkShoutValidity(Order shout)
           
 void generateQuote()
           
 Account getAccount()
          Get the account which holds any budget surplus or deficit for the auctioneer.
 void initialise()
           
 void onRoundClosed()
           
 boolean shoutsVisible()
          Return true if the shouts of others are visible.
 
Methods inherited from class net.sourceforge.jasa.market.auctioneer.TransparentAuctioneer
getLastAsk, getLastBid, getLastShout, newShoutInternal, orderFilled, recordMatch, reset, transactionsOccurred
 
Methods inherited from class net.sourceforge.jasa.market.auctioneer.AbstractAuctioneer
askIterator, askQuote, bidIterator, bidQuote, clear, clear, clear, determineClearingPrice, eventOccurred, getClearingPolicy, getClearingQuote, getMarket, getOrderBook, getPricingPolicy, getQuote, getUnmatchedAsks, getUnmatchedBids, newOrder, onEndOfDay, printState, protoClone, removeOrder, setClearingPolicy, setClearingQuote, setMarket, setOrderBook, setPricingPolicy, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

reservePrice

protected double reservePrice
The reservation price.


seller

protected TradingAgent seller
The seller.


account

protected Account account

P_RESERVEPRICE

public static final java.lang.String P_RESERVEPRICE
See Also:
Constant Field Values

P_QUANTITY

public static final java.lang.String P_QUANTITY
See Also:
Constant Field Values

P_SELLER

public static final java.lang.String P_SELLER
See Also:
Constant Field Values
Constructor Detail

AscendingAuctioneer

public AscendingAuctioneer(Market auction,
                           TradingAgent seller,
                           int quantity,
                           double reservePrice)
Method Detail

initialise

public void initialise()
Overrides:
initialise in class AbstractAuctioneer

onRoundClosed

public void onRoundClosed()
Overrides:
onRoundClosed in class TransparentAuctioneer

generateQuote

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

checkShoutValidity

protected void checkShoutValidity(Order shout)
                           throws IllegalOrderException
Overrides:
checkShoutValidity in class AbstractAuctioneer
Parameters:
shout - The new shout to be processed
Throws:
IllegalOrderException - Thrown if the shout is invalid in some way.

shoutsVisible

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

Specified by:
shoutsVisible in interface Auctioneer
Overrides:
shoutsVisible in class TransparentAuctioneer

getAccount

public Account getAccount()
Description copied from interface: Auctioneer
Get the account which holds any budget surplus or deficit for the auctioneer. This is useful when implementing non-budget-balanced mechanisms.

Specified by:
getAccount in interface Auctioneer