Class AggregatorTrader

    • Field Detail

      • submittedBidsByTime

        protected final TreeMap<de.dlr.gitlab.fame.time.TimeStamp,​List<agents.trader.renewable.AggregatorTrader.ProducerBid>> submittedBidsByTime
        Submitted Bids
      • powerPrices

        protected final TreeMap<de.dlr.gitlab.fame.time.TimeStamp,​Double> powerPrices
        Stores the power prices from DayAheadMarket
      • errorGenerator

        protected PowerForecastError errorGenerator
        Adds random errors (normally distributed) to the amount of offered power
    • Constructor Detail

      • AggregatorTrader

        public AggregatorTrader​(de.dlr.gitlab.fame.agent.input.DataProvider dataProvider)
        Creates an AggregatorTrader
        Parameters:
        dataProvider - provides input from config
    • Method Detail

      • getClientDataForSetType

        protected List<ClientData> getClientDataForSetType​(RenewablePlantOperator.SetType setType)
        Return all data of clients that match the given setType
        Parameters:
        setType - to search for
        Returns:
        client data for given set type
      • submitHourlyBids

        protected List<agents.trader.renewable.AggregatorTrader.ProducerBid> submitHourlyBids​(de.dlr.gitlab.fame.communication.Contract contract,
                                                                                              ArrayList<MarginalsAtTime> allMarginals,
                                                                                              boolean hasErrors)
        Prepares hourly bids based on given marginals and sends them to the contracted partner
        Parameters:
        contract - to fulfil
        allMarginals - to be used for bid calculation
        hasErrors - if true errors will be added to the power of the bid
        Returns:
        submitted bids associated with producer UUID
      • calcBids

        protected abstract Bid calcBids​(Marginal marginal,
                                        de.dlr.gitlab.fame.time.TimeStamp targetTime,
                                        long producerUuid,
                                        boolean hasErrors)
        Creates a Bid from given Marginal
        Parameters:
        marginal - pair of true cost and power potential
        targetTime - associated with the marginal and bid
        producerUuid - id of plant operator associated with marginal
        hasErrors - if true errors will be added to the power of the bid
        Returns:
        created bid
      • getPowerWithError

        protected double getPowerWithError​(double truePowerPotential,
                                           boolean hasPowerError)
        Calculate a power with errors from forecast
        Parameters:
        truePowerPotential - perfect foresight power potential without any errors
        hasPowerError - if true, an error is added to the power
        Returns:
        power potential modified by power forecast error, if applicable - otherwise the original true potential without errors
      • logClientDispatchAndRevenues

        protected void logClientDispatchAndRevenues​(double dispatchedEnergy,
                                                    double powerPrice,
                                                    long clientId,
                                                    de.dlr.gitlab.fame.time.TimeStamp deliveryTime)
        Logs actual dispatch and revenue for client at given delivery time
        Parameters:
        dispatchedEnergy - assigned to this bid
        powerPrice - awarded price
        clientId - ID of the power plant to be dispatched
        deliveryTime - at which the electricity is produced by the associated producer
      • applyPayoutStrategy

        protected abstract double applyPayoutStrategy​(long plantOperatorId,
                                                      de.dlr.gitlab.fame.time.TimePeriod accountingPeriod,
                                                      double marketRevenue)
        Define a pay-out strategy for the contractual pay-out (in child classes)
        Parameters:
        plantOperatorId - the operator to pay
        accountingPeriod - to be considered
        marketRevenue - earned with bids associated with that operator
        Returns:
        value to pay out to that plant operator