Package agents.markets.meritOrder
Class MarketClearing
- java.lang.Object
-
- agents.markets.meritOrder.MarketClearing
-
public class MarketClearing extends Object
Performs market clearing of day-ahead market based on provided Bid-messages- Author:
- Farzad Sarfarazi, Christoph Schimeczek
-
-
Field Summary
Fields Modifier and Type Field Description static ClearingDetails
EMPTY_MARKET_RESULT
Market clearing result if a market is empty: TradedEnergy: 0 MWh, MarketPrice = NaNprotected static org.slf4j.Logger
logger
Logs errors ofMarketClearing
static de.dlr.gitlab.fame.agent.input.Tree
parameters
Input parameters ofMarketClearing
-
Constructor Summary
Constructors Constructor Description MarketClearing(de.dlr.gitlab.fame.agent.input.ParameterData input)
Creates aMarketClearing
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MarketClearingResult
clear(SupplyOrderBook supplyBook, DemandOrderBook demandBook, String clearingEventId)
Clears the market based on a SupplyOrderBook and a DemandOrderBookMarketClearingResult
clear(ArrayList<de.dlr.gitlab.fame.communication.message.Message> input, String clearingEventId)
Clears the market based on all the bids provided in form of messagesvoid
fillOrderBooksWithTraderBids(ArrayList<de.dlr.gitlab.fame.communication.message.Message> input, SupplyOrderBook supplyBook, DemandOrderBook demandBook)
Fills received Bids into provided demand or supply OrderBook
-
-
-
Field Detail
-
EMPTY_MARKET_RESULT
public static final ClearingDetails EMPTY_MARKET_RESULT
Market clearing result if a market is empty: TradedEnergy: 0 MWh, MarketPrice = NaN
-
parameters
public static final de.dlr.gitlab.fame.agent.input.Tree parameters
Input parameters ofMarketClearing
-
logger
protected static org.slf4j.Logger logger
Logs errors ofMarketClearing
-
-
Constructor Detail
-
MarketClearing
public MarketClearing(de.dlr.gitlab.fame.agent.input.ParameterData input) throws de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException
Creates aMarketClearing
- Parameters:
input
- group holding all parameters- Throws:
de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException
- if any required parameters are missing
-
-
Method Detail
-
clear
public MarketClearingResult clear(ArrayList<de.dlr.gitlab.fame.communication.message.Message> input, String clearingEventId)
Clears the market based on all the bids provided in form of messages- Parameters:
input
- unsorted messages containing demand and supply bidsclearingEventId
- string identifying the clearing event- Returns:
result
of market clearing- Throws:
RuntimeException
- if the market clearing failed
-
fillOrderBooksWithTraderBids
public void fillOrderBooksWithTraderBids(ArrayList<de.dlr.gitlab.fame.communication.message.Message> input, SupplyOrderBook supplyBook, DemandOrderBook demandBook)
Fills received Bids into provided demand or supply OrderBook- Parameters:
input
- unsorted messages containing demand and supply bidssupplyBook
- to be filled with supply bidsdemandBook
- to be filled with demand bids
-
clear
public MarketClearingResult clear(SupplyOrderBook supplyBook, DemandOrderBook demandBook, String clearingEventId)
Clears the market based on a SupplyOrderBook and a DemandOrderBook- Parameters:
supplyBook
- book of all supply bidsdemandBook
- book of all demand bidsclearingEventId
- string identifying the clearing event- Returns:
result
of market clearing- Throws:
RuntimeException
- if the market clearing failed
-
-