org.powertac.common
Class MarketPosition

java.lang.Object
  extended by org.powertac.common.MarketPosition

public class MarketPosition
extends Object

A MarketPosition domain instance represents the current position of a single broker for wholesale power in a given timeslot. The evolution of this position over time is represented by the sequence of MarketTransaction instances for this broker and timeslot. These are created by the AccountingService and communicated to individual brokers after the market clears in each timeslot.

Author:
Carsten Block, David Dauer, John Collins

Field Summary
protected  long id
           
 
Constructor Summary
MarketPosition(Broker broker, Timeslot timeslot, double balance)
           
 
Method Summary
 Broker getBroker()
           
 long getId()
           
 double getOverallBalance()
           
 Timeslot getTimeslot()
           
 String toString()
           
 double updateBalance(double mWh)
          Adds a quantity to the current balance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

@XStreamAsAttribute
protected long id
Constructor Detail

MarketPosition

public MarketPosition(Broker broker,
                      Timeslot timeslot,
                      double balance)
Method Detail

getId

public long getId()

getBroker

public Broker getBroker()

getTimeslot

public Timeslot getTimeslot()

getOverallBalance

public double getOverallBalance()

toString

public String toString()
Overrides:
toString in class Object

updateBalance

public double updateBalance(double mWh)
Adds a quantity to the current balance. Positive numbers signify purchased power, negative numbers signify sold power. Returns the resulting total balance



Copyright © 2012. All Rights Reserved.