net.sourceforge.jasa.report
Class SurplusReport

java.lang.Object
  extended by AbstractReportVariables
      extended by net.sourceforge.jasa.report.DirectRevelationReportVariables
          extended by net.sourceforge.jasa.report.EquilibriumReportVariables
              extended by net.sourceforge.jasa.report.SurplusReport
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ElectricityStats

public class SurplusReport
extends EquilibriumReportVariables

A historicalDataReport that calculates the actual surplus of buyers and sellers in the market verses the theoretical surplus when trades occur at the equilibrium price. Note that this historicalDataReport assumes that the equilibrium price is constant. To calculate theoretical surplus with dynamic supply and demand you should configure a DynamicSurplusReport.

See Also:
DynamicSurplusReport
 

Field Summary
protected  double eA
          Global market efficiency.
protected  double mPB
           
protected  double mPS
           
protected  double pBA
          The actual profits of the buyers.
protected  double pBCE
          The profits of the buyers in theoretical equilibrium.
protected  double pSA
          The actual profits of the sellers.
protected  double pSCE
          The profits of the sellers in theoretical equilibrium.
static ReportVariable VAR_EA
           
static ReportVariable VAR_MPB
           
static ReportVariable VAR_MPS
           
static ReportVariable VAR_PBA
           
static ReportVariable VAR_PBCE
           
static ReportVariable VAR_PSA
           
static ReportVariable VAR_PSCE
           
 
Fields inherited from class net.sourceforge.jasa.report.EquilibriumReportVariables
equilibriaFound, matchedShouts, maxPrice, minPrice, quantity, VAR_EXISTS, VAR_MAXPRICE, VAR_MINPRICE, VAR_QUANTITY
 
Fields inherited from class net.sourceforge.jasa.report.DirectRevelationReportVariables
auction, shoutEngine, shouts
 
Constructor Summary
SurplusReport()
           
SurplusReport(Market auction)
           
 
Method Summary
 void calculate()
           
protected  void calculateActualProfits()
           
 double equilibriumProfits(int quantity, AbstractTradingAgent trader)
           
 double getEA()
           
 double getMPB()
          Get the buyer market-power calculation.
 double getMPS()
          Get the seller market-power calculation.
 double getPBA()
           
 double getPBCE()
           
 double getPSA()
           
 double getPSCE()
           
 java.util.Map<java.lang.Object,java.lang.Number> getVariableBindings()
           
 void initialise()
           
 void produceUserOutput()
           
 java.lang.String toString()
           
 
Methods inherited from class net.sourceforge.jasa.report.EquilibriumReportVariables
afterPropertiesSet, calculateEquilibriaPriceRange, calculateEquilibriaQuantity, calculateMidEquilibriumPrice, compute, equilibriaExists, eventOccurred, getMaxPrice, getMinPrice, getQuantity
 
Methods inherited from class net.sourceforge.jasa.report.DirectRevelationReportVariables
dispose, enumerateTruthfulShout, initialise, setAuction, simulateDirectRevelation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pBCE

protected double pBCE
The profits of the buyers in theoretical equilibrium.


pSCE

protected double pSCE
The profits of the sellers in theoretical equilibrium.


pBA

protected double pBA
The actual profits of the buyers.


pSA

protected double pSA
The actual profits of the sellers.


eA

protected double eA
Global market efficiency.


mPB

protected double mPB

mPS

protected double mPS

VAR_MPB

public static final ReportVariable VAR_MPB

VAR_MPS

public static final ReportVariable VAR_MPS

VAR_EA

public static final ReportVariable VAR_EA

VAR_PBA

public static final ReportVariable VAR_PBA

VAR_PSA

public static final ReportVariable VAR_PSA

VAR_PBCE

public static final ReportVariable VAR_PBCE

VAR_PSCE

public static final ReportVariable VAR_PSCE
Constructor Detail

SurplusReport

public SurplusReport(Market auction)

SurplusReport

public SurplusReport()
Method Detail

calculate

public void calculate()
Overrides:
calculate in class EquilibriumReportVariables

calculateActualProfits

protected void calculateActualProfits()

equilibriumProfits

public double equilibriumProfits(int quantity,
                                 AbstractTradingAgent trader)

initialise

public void initialise()
Overrides:
initialise in class EquilibriumReportVariables

getPBCE

public double getPBCE()
Returns:
The theoretical surplus available to buyers in competitive equilibrium.

getPSCE

public double getPSCE()
Returns:
The theoretical surplus available to sellers in competitive equilibrium.

getPBA

public double getPBA()
Returns:
The actual surplus of all buyers in the market.

getPSA

public double getPSA()
Returns:
The actual surplus of all sellers in the market.

getMPB

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


getMPS

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


getEA

public double getEA()

toString

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

produceUserOutput

public void produceUserOutput()
Overrides:
produceUserOutput in class EquilibriumReportVariables

getVariableBindings

public java.util.Map<java.lang.Object,java.lang.Number> getVariableBindings()
Overrides:
getVariableBindings in class EquilibriumReportVariables