Class 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 a DayAheadMarket for a single time frame of trading.
    Author:
    A. Achraf El Ghazi, Felix Nitsch, Christoph Schimeczek
    • Constructor Detail

      • TransferOrderBook

        public TransferOrderBook()
        required for Portables
    • Method Detail

      • addBid

        public void addBid​(Bid bid,
                           long traderId)
        Adds given Bid to this TransferOrderBook
        Parameters:
        bid - to be added to TransferOrderBook
        traderId - associated with the bid
      • addComponentsTo

        public void addComponentsTo​(de.dlr.gitlab.fame.communication.transfer.ComponentCollector collector)
        Specified by:
        addComponentsTo in interface de.dlr.gitlab.fame.communication.transfer.Portable
      • populate

        public void populate​(de.dlr.gitlab.fame.communication.transfer.ComponentProvider provider)
        Specified by:
        populate in interface de.dlr.gitlab.fame.communication.transfer.Portable
      • 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 bids
        bids - 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