org.powertac.distributionutility
Class DistributionUtilityService

java.lang.Object
  extended by org.powertac.common.interfaces.TimeslotPhaseProcessor
      extended by org.powertac.distributionutility.DistributionUtilityService

@Service
public class DistributionUtilityService
extends org.powertac.common.interfaces.TimeslotPhaseProcessor


Nested Class Summary
 class DistributionUtilityService.ChargeInfo
           
 
Constructor Summary
DistributionUtilityService()
           
 
Method Summary
 void activate(org.joda.time.Instant time, int phaseNumber)
           
 List<DistributionUtilityService.ChargeInfo> balanceTimeslot(org.powertac.common.Timeslot currentTimeslot, List<org.powertac.common.Broker> brokerList)
          Generates a list of Transactions that balance the overall market.
 double getMarketBalance(org.powertac.common.Broker broker)
          Returns the difference between a broker's current market position and its net load.
 double getPMax()
          Returns the maximum price for energy in the current timeslot
 double getPMin()
          Returns the minimum price for energy in the current timeslot
 double getSpotPrice()
          Returns the spot market price - the clearing price for the current timeslot in the most recent trading period.
 void init(org.powertac.common.PluginConfig config)
          Computes actual distribution and balancing costs by random selection
 
Methods inherited from class org.powertac.common.interfaces.TimeslotPhaseProcessor
init, setTimeslotPhase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributionUtilityService

public DistributionUtilityService()
Method Detail

init

public void init(org.powertac.common.PluginConfig config)
Computes actual distribution and balancing costs by random selection


activate

public void activate(org.joda.time.Instant time,
                     int phaseNumber)
Specified by:
activate in class org.powertac.common.interfaces.TimeslotPhaseProcessor

getMarketBalance

public double getMarketBalance(org.powertac.common.Broker broker)
Returns the difference between a broker's current market position and its net load. Note: market position is computed in MWh and net load is computed in kWh, conversion is needed to compute the difference.

Returns:
a broker's current energy balance within its market. Pos for over-production, neg for under-production

getSpotPrice

public double getSpotPrice()
Returns the spot market price - the clearing price for the current timeslot in the most recent trading period.


getPMax

public double getPMax()
Returns the maximum price for energy in the current timeslot


getPMin

public double getPMin()
Returns the minimum price for energy in the current timeslot


balanceTimeslot

public List<DistributionUtilityService.ChargeInfo> balanceTimeslot(org.powertac.common.Timeslot currentTimeslot,
                                                                   List<org.powertac.common.Broker> brokerList)
Generates a list of Transactions that balance the overall market. Transactions are generated on a per-broker basis depending on the broker's balance within its own market.

Returns:
List of MarketTransactions


Copyright © 2011 Power TAC. All Rights Reserved.