Package agents.markets.meritOrder.books
Class DemandOrderBook
- java.lang.Object
-
- agents.markets.meritOrder.books.OrderBook
-
- agents.markets.meritOrder.books.DemandOrderBook
-
-
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 DemandOrderBook()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DemandOrderBook
clone()
double
getAmountOfPowerShortage(OrderBookItem highestSupplyItem)
Returns amount of power that the supply is short; can only be called once the book is updated after market clearingprotected Bid
getLastBid()
double
getOfferedPower()
protected Comparator<OrderBookItem>
getSortComparator()
sorts in descending orderdouble
getUnsheddableDemand()
-
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()
sorts in descending order- Specified by:
getSortComparator
in classOrderBook
- Returns:
Comparator
to sortOrderBook.orderBookItems
with
-
getOfferedPower
public double getOfferedPower()
- Returns:
- sum of all items' offered power
-
getUnsheddableDemand
public double getUnsheddableDemand()
- Returns:
- sum of all items' asked power, that is not sheddable, i.e. has a value of lost load greater or equal to the
Constants.SCARCITY_PRICE_IN_EUR_PER_MWH
-
getAmountOfPowerShortage
public double getAmountOfPowerShortage(OrderBookItem highestSupplyItem)
Returns amount of power that the supply is short; can only be called once the book is updated after market clearing- Parameters:
highestSupplyItem
- OrderBookItem with highest price and non-zero power from SupplyOrderBook- Returns:
- amount of power that the supply is short, i.e. the sum of all demand power not awarded with a higher price than the last supply offer
-
clone
public DemandOrderBook clone()
-
-