uk.ac.liv.auction.electricity
Class ElectricityStats

java.lang.Object
  extended byuk.ac.liv.auction.stats.AbstractAuctionReport
      extended byuk.ac.liv.auction.stats.AbstractMarketStatsReport
          extended byuk.ac.liv.auction.stats.DirectRevelationReport
              extended byuk.ac.liv.auction.stats.EquilibriumReport
                  extended byuk.ac.liv.auction.stats.SurplusReport
                      extended byuk.ac.liv.auction.electricity.ElectricityStats
All Implemented Interfaces:
AuctionEventListener, AuctionReport, java.lang.Cloneable, Parameterizable, Resetable, java.io.Serializable
Direct Known Subclasses:
FinalRoundElectricityStats, ParameterizedElectricityStats

public class ElectricityStats
extends SurplusReport
implements java.lang.Cloneable

Calculate the NPT market-power and efficiency variables. These are described in detail in the following paper.

"Market Power and Efficiency in a Computational Electricity Market with Discriminatory Double-Auction Pricing" Nicolaisen, J.; Petrov, V.; and Tesfatsion, L. in IEEE Transactions on Evolutionary Computation, Vol. 5, No. 5. 2001

Version:
$Revision: 1.60 $
Author:
Steve Phelps
See Also:
Serialized Form

Field Summary
protected  int auctionAge
          The age of the auction in rounds.
protected  int buyerCap
          The total generating-capacity of buyers.
protected  double equilibPrice
          The approximated equilibrium price.
protected  int numBuyers
          The number of buyers.
protected  int numSellers
          The number of sellers.
protected  double pBT
          Profits of the buyers in truthful bidding.
protected  double pST
          Profits of the sellers in truthful bidding.
protected  double rCap
          The relative generating-capacity of buyers to sellers.
protected  double rCon
          The relative concentration of sellers to buyers.
protected  int sellerCap
          The total generating-capacity of sellers.
protected  double sMPB
          Strategic market-power for buyers.
protected  double sMPS
          Strategic market-power for sellers.
static ReportVariable VAR_RCAP
           
static ReportVariable VAR_RCON
           
 
Fields inherited from class uk.ac.liv.auction.stats.SurplusReport
eA, mPB, mPS, pBA, pBCE, pSA, pSCE, VAR_EA, VAR_MPB, VAR_MPS, VAR_PBA, VAR_PBCE, VAR_PSA, VAR_PSCE
 
Fields inherited from class uk.ac.liv.auction.stats.EquilibriumReport
equilibriaFound, matchedShouts, maxPrice, minPrice, quantity, VAR_EXISTS, VAR_MAXPRICE, VAR_MINPRICE, VAR_QUANTITY
 
Fields inherited from class uk.ac.liv.auction.stats.DirectRevelationReport
auction, shoutEngine, shouts
 
Constructor Summary
ElectricityStats()
           
ElectricityStats(RoundRobinAuction auction)
           
 
Method Summary
 void calculate()
           
protected  int calculateAuctionAge()
           
protected  double calculateEquilibriumPrice()
           
 void calculateStrategicMarketPower()
           
 java.lang.Object clone()
           
 double equilibQuant(AbstractTradingAgent t, double price)
           
protected  double getCapacity(AbstractTradingAgent trader)
           
 double getEA()
          Get the market-efficiency calculation.
 double getPBT()
          Get the truthful buyer profits calculation.
protected  double getProfits(AbstractTradingAgent trader)
           
 double getPST()
          Get the truthful seller profits calculation.
 double getRCAP()
           
 double getRCON()
           
 double getSMPB()
          Get the strategic buyer market-power calculation.
 double getSMPS()
          Get the strategic seller market-power calculation.
 java.util.Map getVariables()
          Returns a Map of all of the variables that are produced in the report.
 void initialise()
           
 ElectricityStats newCopy()
           
 void produceUserOutput()
          Produce the final report for the user.
 void setup(ec.util.ParameterDatabase parameters, ec.util.Parameter base)
          Initialise this object from a parameter database.
protected  void simulateTruthfulBidding()
           
 java.lang.String toString()
           
protected  double truthProfits(double singleRoundProfits)
           
 
Methods inherited from class uk.ac.liv.auction.stats.SurplusReport
calculateActualProfits, equilibriumProfits, getMPB, getMPS, getPBA, getPBCE, getPSA, getPSCE
 
Methods inherited from class uk.ac.liv.auction.stats.EquilibriumReport
calculateEquilibriaPriceRange, calculateEquilibriaQuantity, calculateMidEquilibriumPrice, equilibriaExists, getMaxPrice, getMinPrice, getQuantity, recalculate
 
Methods inherited from class uk.ac.liv.auction.stats.DirectRevelationReport
enumerateTruthfulShout, reset, setAuction, simulateDirectRevelation
 
Methods inherited from class uk.ac.liv.auction.stats.AbstractMarketStatsReport
eventOccurred
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rCon

protected double rCon
The relative concentration of sellers to buyers.


rCap

protected double rCap
The relative generating-capacity of buyers to sellers.


sMPB

protected double sMPB
Strategic market-power for buyers.


sMPS

protected double sMPS
Strategic market-power for sellers.


pBT

protected double pBT
Profits of the buyers in truthful bidding.


pST

protected double pST
Profits of the sellers in truthful bidding.


numSellers

protected int numSellers
The number of sellers.


numBuyers

protected int numBuyers
The number of buyers.


buyerCap

protected int buyerCap
The total generating-capacity of buyers.


sellerCap

protected int sellerCap
The total generating-capacity of sellers.


equilibPrice

protected double equilibPrice
The approximated equilibrium price.


auctionAge

protected int auctionAge
The age of the auction in rounds.


VAR_RCAP

public static final ReportVariable VAR_RCAP

VAR_RCON

public static final ReportVariable VAR_RCON
Constructor Detail

ElectricityStats

public ElectricityStats(RoundRobinAuction auction)

ElectricityStats

public ElectricityStats()
Method Detail

setup

public void setup(ec.util.ParameterDatabase parameters,
                  ec.util.Parameter base)
Description copied from interface: Parameterizable
Initialise this object from a parameter database.

Specified by:
setup in interface Parameterizable
Overrides:
setup in class DirectRevelationReport

calculate

public void calculate()
Overrides:
calculate in class SurplusReport

calculateEquilibriumPrice

protected double calculateEquilibriumPrice()

initialise

public void initialise()
Overrides:
initialise in class SurplusReport

getProfits

protected double getProfits(AbstractTradingAgent trader)

getCapacity

protected double getCapacity(AbstractTradingAgent trader)

equilibQuant

public double equilibQuant(AbstractTradingAgent t,
                           double price)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException

newCopy

public ElectricityStats newCopy()

toString

public java.lang.String toString()
Overrides:
toString in class SurplusReport

simulateTruthfulBidding

protected void simulateTruthfulBidding()

calculateStrategicMarketPower

public void calculateStrategicMarketPower()

truthProfits

protected double truthProfits(double singleRoundProfits)

calculateAuctionAge

protected int calculateAuctionAge()

getEA

public double getEA()
Get the market-efficiency calculation.

Overrides:
getEA in class SurplusReport

getSMPB

public double getSMPB()
Get the strategic buyer market-power calculation.


getSMPS

public double getSMPS()
Get the strategic seller market-power calculation.


getPST

public double getPST()
Get the truthful seller profits calculation.


getPBT

public double getPBT()
Get the truthful buyer profits calculation.


getRCAP

public double getRCAP()

getRCON

public double getRCON()

produceUserOutput

public void produceUserOutput()
Description copied from interface: AuctionReport
Produce the final report for the user. Implementors can do whatever they see fit, for example by writing a report on stdout, or they may choose to do nothing.

Specified by:
produceUserOutput in interface AuctionReport
Overrides:
produceUserOutput in class SurplusReport

getVariables

public java.util.Map getVariables()
Description copied from interface: AuctionReport
Returns a Map of all of the variables that are produced in the report. The Map maps variables, represented by objects of type ReportVariable, onto values, which may be of any class. If no variables are produced by this report then an empty Map is returned.

Specified by:
getVariables in interface AuctionReport
Overrides:
getVariables in class SurplusReport