net.sourceforge.jasa.market.auctioneer
Class ContinuousDoubleAuctioneer
java.lang.Object
net.sourceforge.jasa.market.auctioneer.AbstractAuctioneer
net.sourceforge.jasa.market.auctioneer.TransparentAuctioneer
net.sourceforge.jasa.market.auctioneer.ContinuousDoubleAuctioneer
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, MarketEventListener, Auctioneer, QuoteProvider
- Direct Known Subclasses:
- ContinuousDoubleAuctioneerEE
public class ContinuousDoubleAuctioneer
- extends TransparentAuctioneer
- implements java.io.Serializable
An auctioneer for a double-market with continuous clearing. The clearing
operation is performed every time a shout arrives. Shouts must beat the
current quote in order to be accepted.
- See Also:
- Serialized Form
-
-
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, initialise, newOrder, printState, protoClone, removeOrder, setClearingPolicy, setClearingQuote, setMarket, setOrderBook, setPricingPolicy, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
account
protected ZeroFundsAccount account
askException
protected static NotAnImprovementOverQuoteException askException
- Reusable exceptions for performance
bidException
protected static NotAnImprovementOverQuoteException bidException
DISCLAIMER
protected static final java.lang.String DISCLAIMER
- See Also:
- Constant Field Values
ContinuousDoubleAuctioneer
public ContinuousDoubleAuctioneer(Market auction)
ContinuousDoubleAuctioneer
public ContinuousDoubleAuctioneer()
generateQuote
public void generateQuote()
- Specified by:
generateQuote
in class AbstractAuctioneer
onRoundClosed
public void onRoundClosed()
- Overrides:
onRoundClosed
in class TransparentAuctioneer
onEndOfDay
public void onEndOfDay()
- Overrides:
onEndOfDay
in class AbstractAuctioneer
clone
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Overrides:
clone
in class java.lang.Object
- Throws:
java.lang.CloneNotSupportedException
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
newShoutInternal
public void newShoutInternal(Order shout)
throws DuplicateShoutException
- Overrides:
newShoutInternal
in class TransparentAuctioneer
- Throws:
DuplicateShoutException
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.
checkImprovement
protected void checkImprovement(Order shout)
throws IllegalOrderException
- Throws:
IllegalOrderException
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
askNotAnImprovementException
protected void askNotAnImprovementException()
throws NotAnImprovementOverQuoteException
- Throws:
NotAnImprovementOverQuoteException
bidNotAnImprovementException
protected void bidNotAnImprovementException()
throws NotAnImprovementOverQuoteException
- Throws:
NotAnImprovementOverQuoteException