Package agents.markets.meritOrder.books
Class OrderBookItem
- java.lang.Object
-
- agents.markets.meritOrder.books.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 anOrderBook
, either bid or ask- Author:
- Christoph Schimeczek, Martin Klein , Evelyn Sperber, Farzad Sarfarazi, A. Achraf El Ghazi
-
-
Constructor Summary
Constructors Constructor Description OrderBookItem()
required forPortable
sOrderBookItem(Bid bid, long traderUuid)
Creates anOrderBookItem
based in given Bid
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addComponentsTo(de.dlr.gitlab.fame.communication.transfer.ComponentCollector collector)
double
getAwardedPower()
Bid
getBid()
double
getBlockPower()
double
getCumulatedPowerLowerValue()
double
getCumulatedPowerUpperValue()
double
getMarginalCost()
double
getNotAwardedPower()
double
getOfferPrice()
long
getTraderUuid()
void
populate(de.dlr.gitlab.fame.communication.transfer.ComponentProvider provider)
void
setAwardedPower(double awardedPower)
Sets the actual awarded power in the context of the containingOrderBook
void
setCumulatedPowerUpperValue(double cumulatedPower)
Sets the cumulated power upper value in the context of the containingOrderBook
String
toString()
-
-
-
Constructor Detail
-
OrderBookItem
public OrderBookItem()
required forPortable
s
-
OrderBookItem
public OrderBookItem(Bid bid, long traderUuid)
Creates anOrderBookItem
based in given Bid- Parameters:
bid
- associated with this order book itemtraderUuid
- 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 containingOrderBook
- Parameters:
awardedPower
- of this bid; any value between 0 andgetBlockPower()
-
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 containingOrderBook
- Parameters:
cumulatedPower
- sum of all previous bids in the merit-order plus the amount of power in this item'sBid
-
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 interfacede.dlr.gitlab.fame.communication.transfer.Portable
-
populate
public void populate(de.dlr.gitlab.fame.communication.transfer.ComponentProvider provider)
- Specified by:
populate
in interfacede.dlr.gitlab.fame.communication.transfer.Portable
-
-