org.powertac.distributionutility
Class DistributionUtilityService

java.lang.Object
  extended by org.powertac.common.interfaces.TimeslotPhaseProcessor
      extended by org.powertac.distributionutility.DistributionUtilityService
All Implemented Interfaces:
org.powertac.common.interfaces.InitializationService, SettlementContext

@Service
public class DistributionUtilityService
extends org.powertac.common.interfaces.TimeslotPhaseProcessor
implements SettlementContext, org.powertac.common.interfaces.InitializationService


Constructor Summary
DistributionUtilityService()
           
 
Method Summary
 void activate(org.joda.time.Instant time, int phaseNumber)
           
 HashMap<org.powertac.common.Broker,org.powertac.distributionutility.ChargeInfo> balanceTimeslot(org.powertac.common.Timeslot currentTimeslot, List<org.powertac.common.Broker> brokerList)
          Generates a list of Transactions that balance the overall market.
 Double getBalancingCost()
          Returns the DU charge for running the balancing market
 double getMarketBalance(org.powertac.common.Broker broker)
          Returns the difference between a broker's current market position and its net load.
 double getPMinus()
          Returns the minimum price for energy in the current timeslot
 double getPMinusPrime()
          Returns the slope of cost curve for down-regulation.
 double getPPlus()
          Returns the maximum price for energy in the current timeslot
 double getPPlusPrime()
          Returns the slope of cost curve for up-regulation.
 String initialize(org.powertac.common.Competition competition, List<String> completedInits)
          Computes actual distribution and balancing costs by random selection
 void setDefaults()
           
 
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

setDefaults

public void setDefaults()
Specified by:
setDefaults in interface org.powertac.common.interfaces.InitializationService

initialize

public String initialize(org.powertac.common.Competition competition,
                         List<String> completedInits)
Computes actual distribution and balancing costs by random selection

Specified by:
initialize in interface org.powertac.common.interfaces.InitializationService

activate

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

balanceTimeslot

public HashMap<org.powertac.common.Broker,org.powertac.distributionutility.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 ChargeInfo instances

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

getPPlus

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

Specified by:
getPPlus in interface SettlementContext

getPMinus

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

Specified by:
getPMinus in interface SettlementContext

getPPlusPrime

public double getPPlusPrime()
Description copied from interface: SettlementContext
Returns the slope of cost curve for up-regulation. Total cost for up-regulation by x kwh is pPlus + x * pPlusPrime. Note that x is positive for up-regulation.

Specified by:
getPPlusPrime in interface SettlementContext

getPMinusPrime

public double getPMinusPrime()
Description copied from interface: SettlementContext
Returns the slope of cost curve for down-regulation. Total cost for down-regulation by x kwh is pMinus + x * pMinusPrime. Note that x is negative for down-regulation.

Specified by:
getPMinusPrime in interface SettlementContext

getBalancingCost

public Double getBalancingCost()
Description copied from interface: SettlementContext
Returns the DU charge for running the balancing market

Specified by:
getBalancingCost in interface SettlementContext


Copyright © 2013 Power TAC. All Rights Reserved.