org.powertac.common.msg
Class BalancingOrder

java.lang.Object
  extended by org.powertac.common.state.XStreamStateLoggable
      extended by org.powertac.common.TariffMessage
          extended by org.powertac.common.msg.TariffUpdate
              extended by org.powertac.common.msg.BalancingOrder
All Implemented Interfaces:
ValidatableMessage

public class BalancingOrder
extends TariffUpdate

Represents an offer of balancing capacity from a broker to the DU. Applicable only to tariffs that have a Rate with maxCurtailment > 0 for the current timeslot, and a non-empty set of customer subscriptions. The Broker specifies that proportion of the remaining curtailable capacity (remaining after possible application of an economic control) that can be curtailed for balancing purposes, but note that the actual curtailment is also constrained by the Rates in force during the timeslot. Once submitted, a BalancingOrder remains in effect until replaced with another BalancingOrder for the same Tariff. If the DU exercises a BalancingOrder, the broker is paid the specified price just to the extent that the balancing is for the benefit of some other broker. In other words, if the curtailment is used exclusively for the benefit of the issuing broker, it simply offsets the payment the broker would otherwise have had to make to the DU for the shortage or surplus. State log fields for readResolve():
new(double exerciseRatio, double price, long tariffId, long brokerId)

Author:
John Collins

Field Summary
 
Fields inherited from class org.powertac.common.TariffMessage
broker, id
 
Constructor Summary
protected BalancingOrder()
           
  BalancingOrder(Broker broker, TariffSpecification tariff, double exerciseRatio, double price)
           
 
Method Summary
 double getExerciseRatio()
           
 double getPrice()
           
 boolean isValid()
          Valid if exerciseRatio between 0 and 1
 
Methods inherited from class org.powertac.common.msg.TariffUpdate
getTariffId
 
Methods inherited from class org.powertac.common.TariffMessage
getBroker, getId
 
Methods inherited from class org.powertac.common.state.XStreamStateLoggable
readResolve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BalancingOrder

public BalancingOrder(Broker broker,
                      TariffSpecification tariff,
                      double exerciseRatio,
                      double price)

BalancingOrder

protected BalancingOrder()
Method Detail

getExerciseRatio

public double getExerciseRatio()

getPrice

public double getPrice()

isValid

public boolean isValid()
Valid if exerciseRatio between 0 and 1

Specified by:
isValid in interface ValidatableMessage
Overrides:
isValid in class TariffMessage


Copyright © 2013. All Rights Reserved.