Package agents.markets.meritOrder.books
Class SupplyOrderBook
- java.lang.Object
-
- agents.markets.meritOrder.books.OrderBook
-
- agents.markets.meritOrder.books.SupplyOrderBook
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class agents.markets.meritOrder.books.OrderBook
OrderBook.DistributionMethod
-
-
Field Summary
-
Fields inherited from class agents.markets.meritOrder.books.OrderBook
awardedCumulativePower, awardedPrice, isSorted, orderBookItems
-
-
Constructor Summary
Constructors Constructor Description SupplyOrderBook()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SupplyOrderBook
clone()
OrderBookItem
getHighestItem()
OrderBookItem
getLastAwardedItem()
Can only be called once the book is updated after market clearingprotected Bid
getLastBid()
protected Comparator<OrderBookItem>
getSortComparator()
-
Methods inherited from class agents.markets.meritOrder.books.OrderBook
addBid, addBids, addComponentsTo, clear, ensureNotYetSortedOrThrow, ensurePositiveBidPower, ensureSortedOrThrow, filterForBidsByTrader, getCumulatePowerOfItems, getOrderBookItems, getTradersSumOfPower, hasNoValidBids, populate, toString, updateAwardedPowerInBids
-
-
-
-
Method Detail
-
getLastBid
protected Bid getLastBid()
- Specified by:
getLastBid
in classOrderBook
- Returns:
- the last virtual
Bid
depending on the type of order book
-
getSortComparator
protected Comparator<OrderBookItem> getSortComparator()
- Specified by:
getSortComparator
in classOrderBook
- Returns:
Comparator
to sortOrderBook.orderBookItems
with
-
getHighestItem
public OrderBookItem getHighestItem()
- Returns:
- most expensive (real) bid (i.e. with block power is larger than 0); may only be called after sorting
-
getLastAwardedItem
public OrderBookItem getLastAwardedItem()
Can only be called once the book is updated after market clearing- Returns:
- one of possibly many
OrderBookItem
s that were price setting
may only be called after sorting and awarding
-
clone
public SupplyOrderBook clone()
-
-