Package agents.trader.renewable
Class AggregatorTrader
- java.lang.Object
-
- de.dlr.gitlab.fame.agent.Agent
-
- agents.trader.Trader
-
- agents.trader.TraderWithClients
-
- agents.trader.renewable.AggregatorTrader
-
- All Implemented Interfaces:
DayAheadMarketTrader
,PowerPlantScheduler
,de.dlr.gitlab.fame.agent.AgentAbility
- Direct Known Subclasses:
NoSupportTrader
,RenewableTrader
,SystemOperatorTrader
public abstract class AggregatorTrader extends TraderWithClients implements PowerPlantScheduler
Aggregates supply capacity and administers support payments to plant operators- Author:
- Johannes Kochems, Christoph Schimeczek, Felix Nitsch, Farzad Sarfarazi, Kristina Nienhaus
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AggregatorTrader.OutputColumns
Columns of the output filestatic class
AggregatorTrader.Products
Products of this Agent
-
Field Summary
Fields Modifier and Type Field Description protected HashMap<Long,ClientData>
clientMap
Map to store all client, i.e.protected PowerForecastError
errorGenerator
Adds random errors (normally distributed) to the amount of offered powerprotected TreeMap<de.dlr.gitlab.fame.time.TimeStamp,Double>
powerPrices
Stores the power prices fromDayAheadMarket
protected TreeMap<de.dlr.gitlab.fame.time.TimeStamp,List<agents.trader.renewable.AggregatorTrader.ProducerBid>>
submittedBidsByTime
Submitted Bids-
Fields inherited from interface agents.markets.DayAheadMarketTrader
ERR_CLEARING_TIMES_AMBIGUOUS, ERR_CLEARING_TIMES_MISSING
-
-
Constructor Summary
Constructors Constructor Description AggregatorTrader(de.dlr.gitlab.fame.agent.input.DataProvider dataProvider)
Creates anAggregatorTrader
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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)protected abstract Bid
calcBids(Marginal marginal, de.dlr.gitlab.fame.time.TimeStamp targetTime, long producerUuid, boolean hasErrors)
Creates aBid
from given Marginalprotected List<ClientData>
getClientDataForSetType(RenewablePlantOperator.SetType setType)
Return all data of clients that match the given setTypeprotected double
getPowerWithError(double truePowerPotential, boolean hasPowerError)
Calculate a power with errors from forecastprotected 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 timeprotected 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-
Methods inherited from class agents.trader.Trader
extractMarginalsAtTime, getMatchingContract, getSortedMarginalList, sortMarginalsByTimeStamp
-
Methods inherited from class de.dlr.gitlab.fame.agent.Agent
addContract, call, closeChannel, executeActions, executeWarmUp, fulfilNext, fulfilNext, getId, getNextRandomNumberGenerator, getPostOffice, handleMessage, initialiseActions, now, openChannel, publish, receive, sendMessageTo, sendMessageTo, store, store, toString, warmUp
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.dlr.gitlab.fame.agent.AgentAbility
call, fulfilNext, fulfilNext, getId, getNextRandomNumberGenerator, now, store, store
-
Methods inherited from interface agents.markets.DayAheadMarketTrader
extractTimesFromGateClosureInfoMessages, readGateClosureInfoMessage
-
-
-
-
Field Detail
-
submittedBidsByTime
protected final TreeMap<de.dlr.gitlab.fame.time.TimeStamp,List<agents.trader.renewable.AggregatorTrader.ProducerBid>> submittedBidsByTime
Submitted Bids
-
clientMap
protected final HashMap<Long,ClientData> clientMap
Map to store all client, i.e.RenewablePlantOperator
, specific data
-
powerPrices
protected final TreeMap<de.dlr.gitlab.fame.time.TimeStamp,Double> powerPrices
Stores the power prices fromDayAheadMarket
-
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 anAggregatorTrader
- 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 fulfilallMarginals
- to be used for bid calculationhasErrors
- 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 aBid
from given Marginal- Parameters:
marginal
- pair of true cost and power potentialtargetTime
- associated with the marginal and bidproducerUuid
- id of plant operator associated with marginalhasErrors
- 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 errorshasPowerError
- 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 bidpowerPrice
- awarded priceclientId
- ID of the power plant to be dispatcheddeliveryTime
- 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 payaccountingPeriod
- to be consideredmarketRevenue
- earned with bids associated with that operator- Returns:
- value to pay out to that plant operator
-
-