Package agents.markets.meritOrder.books
Class TransferOrderBook
- java.lang.Object
-
- agents.markets.meritOrder.books.TransferOrderBook
-
- All Implemented Interfaces:
de.dlr.gitlab.fame.communication.transfer.Portable
,Cloneable
public class TransferOrderBook extends Object implements de.dlr.gitlab.fame.communication.transfer.Portable, Cloneable
Handles a list of imported/exported Bids in aDayAheadMarket
for a single time frame of trading.- Author:
- A. Achraf El Ghazi, Felix Nitsch, Christoph Schimeczek
-
-
Constructor Summary
Constructors Constructor Description TransferOrderBook()
required forPortable
s
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBid(Bid bid, long traderId)
Adds givenBid
to thisTransferOrderBook
void
addComponentsTo(de.dlr.gitlab.fame.communication.transfer.ComponentCollector collector)
void
addTraderBids(long traderId, List<Bid> bids)
add the given bids to the specified trader's list of bidsTransferOrderBook
clone()
double
getAccumulatedEnergyInMWH()
Computes the total energy of all items of this TransferOrderBookList<Bid>
getBidsOf(long traderUuid)
Get all bids of a specific traderdouble
getEnergySumForTrader(long traderUuid)
Calculate offered energy total across all bids of this order book for given traderSet<Long>
getTraders()
void
populate(de.dlr.gitlab.fame.communication.transfer.ComponentProvider provider)
-
-
-
Method Detail
-
addBid
public void addBid(Bid bid, long traderId)
Adds givenBid
to thisTransferOrderBook
- Parameters:
bid
- to be added to TransferOrderBooktraderId
- associated with the bid
-
addComponentsTo
public void addComponentsTo(de.dlr.gitlab.fame.communication.transfer.ComponentCollector collector)
- Specified by:
addComponentsTo
in interfacede.dlr.gitlab.fame.communication.transfer.Portable
-
populate
public void populate(de.dlr.gitlab.fame.communication.transfer.ComponentProvider provider)
- Specified by:
populate
in interfacede.dlr.gitlab.fame.communication.transfer.Portable
-
clone
public TransferOrderBook clone()
-
addTraderBids
public void addTraderBids(long traderId, List<Bid> bids)
add the given bids to the specified trader's list of bids- Parameters:
traderId
- associated with the bidsbids
- to be added to the associated trader's list of bids
-
getTraders
public Set<Long> getTraders()
- Returns:
- traderIDs that have bids associated in this TransferOrderBook
-
getBidsOf
public List<Bid> getBidsOf(long traderUuid)
Get all bids of a specific trader- Parameters:
traderUuid
- of which the bids are requested- Returns:
- bids associated with the given traderUuid
-
getEnergySumForTrader
public double getEnergySumForTrader(long traderUuid)
Calculate offered energy total across all bids of this order book for given trader- Parameters:
traderUuid
- UUID of trader to calculate energy amount for- Returns:
- sum of total offered energy in MWH of given trader
-
getAccumulatedEnergyInMWH
public double getAccumulatedEnergyInMWH()
Computes the total energy of all items of this TransferOrderBook- Returns:
- the total energy of all bid block powers in MWh
-
-