Class OrderBookItem

  • All Implemented Interfaces:
    de.dlr.gitlab.fame.communication.transfer.Portable

    public class OrderBookItem
    extends Object
    implements de.dlr.gitlab.fame.communication.transfer.Portable
    An item of an OrderBook, either bid or ask
    Author:
    Christoph Schimeczek, Martin Klein , Evelyn Sperber, Farzad Sarfarazi, A. Achraf El Ghazi
    • Constructor Detail

      • OrderBookItem

        public OrderBookItem()
        required for Portables
      • OrderBookItem

        public OrderBookItem​(Bid bid,
                             long traderUuid)
        Creates an OrderBookItem based in given Bid
        Parameters:
        bid - associated with this order book item
        traderUuid - id of the trader associated with the bids
    • Method Detail

      • getBid

        public Bid getBid()
        Returns:
        the bid of the OrderBookItem
      • getAwardedPower

        public double getAwardedPower()
        Returns:
        actual awarded power; call only after market clearing
      • getNotAwardedPower

        public double getNotAwardedPower()
        Returns:
        left over power which hasn't been awarded; call only after market clearing
      • setAwardedPower

        public void setAwardedPower​(double awardedPower)
        Sets the actual awarded power in the context of the containing OrderBook
        Parameters:
        awardedPower - of this bid; any value between 0 and getBlockPower()
      • getCumulatedPowerUpperValue

        public double getCumulatedPowerUpperValue()
        Returns:
        sum of all previous bids in the merit-order plus the amount of power in this item's Bid
      • setCumulatedPowerUpperValue

        public void setCumulatedPowerUpperValue​(double cumulatedPower)
        Sets the cumulated power upper value in the context of the containing OrderBook
        Parameters:
        cumulatedPower - sum of all previous bids in the merit-order plus the amount of power in this item's Bid
      • getCumulatedPowerLowerValue

        public double getCumulatedPowerLowerValue()
        Returns:
        sum of all previous bids in the merit-order without the amount of power in this item's Bid
      • getBlockPower

        public double getBlockPower()
        Returns:
        the amount of power of the associated Bid
      • getOfferPrice

        public double getOfferPrice()
        Returns:
        maximum / minimum offered price associated with this Bid, depending on its type
      • getMarginalCost

        public double getMarginalCost()
        Returns:
        actual marginal cost - if provided with the associated Bid
      • getTraderUuid

        public long getTraderUuid()
        Returns:
        ID of the traded that issued the associated 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