Package org.powertac.common
Class RegulationAccumulator
- java.lang.Object
- 
- org.powertac.common.RegulationAccumulator
 
- 
 public class RegulationAccumulator extends Object Accumulates available regulation capacity for a given TariffSubscription. This is basically a data structure that holds two numbers: an amount of up-regulation capacity (non-negative), and an amount of down-regulation capacity (non-positive). The subscription is also included to simplify log analysis; in cases where no subscription is involved, this value should be null.- Author:
- John Collins
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static org.apache.logging.log4j.Loggerlog
 - 
Constructor SummaryConstructors Constructor Description RegulationAccumulator(double upRegulationCapacity, double downRegulationCapacity)Creates a new RegulationAccumulator instance specifying the amounts of regulating capacity available for up-regulation and down-regulation.RegulationAccumulator(RegulationCapacity rc)Creates a new RegulationAccumulator from an immutable RegulationCapacity instance.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(RegulationAccumulator rc)Adds the capacities in the given RegulationAccumulator instance to this instance.voidaddDownRegulation(double amount)Adds the given amount of down-regulation capacity.voidaddUpRegulation(double amount)Adds the given amount of up-regulation capacity.doublegetDownRegulationCapacity()Returns the available down-regulation capacity in kWh.longgetId()doublegetUpRegulationCapacity()Returns the available up-regulation capacity in kWh.voidsetDownRegulationCapacity(double value)Sets the down-regulation value.voidsetUpRegulationCapacity(double value)Sets the up-regulation value.
 
- 
- 
- 
Constructor Detail- 
RegulationAccumulatorpublic RegulationAccumulator(double upRegulationCapacity, double downRegulationCapacity)Creates a new RegulationAccumulator instance specifying the amounts of regulating capacity available for up-regulation and down-regulation. Values are expressed with respect to the balancing market; a negative value means power is delivered to the customer (down-regulation), and a positive value means power is delivered to the balancing market (up-regulation).
 - 
RegulationAccumulatorpublic RegulationAccumulator(RegulationCapacity rc) Creates a new RegulationAccumulator from an immutable RegulationCapacity instance.
 
- 
 - 
Method Detail- 
getIdpublic long getId() 
 - 
getUpRegulationCapacitypublic double getUpRegulationCapacity() Returns the available up-regulation capacity in kWh. Value is non-negative.
 - 
setUpRegulationCapacitypublic void setUpRegulationCapacity(double value) Sets the up-regulation value. Argument must be non-negative.
 - 
getDownRegulationCapacitypublic double getDownRegulationCapacity() Returns the available down-regulation capacity in kWh. Value is non-positive.
 - 
setDownRegulationCapacitypublic void setDownRegulationCapacity(double value) Sets the down-regulation value. Argument must be non-negative.
 - 
addpublic void add(RegulationAccumulator rc) Adds the capacities in the given RegulationAccumulator instance to this instance.
 - 
addUpRegulationpublic void addUpRegulation(double amount) Adds the given amount of up-regulation capacity. Amount must be non-negative.
 - 
addDownRegulationpublic void addDownRegulation(double amount) Adds the given amount of down-regulation capacity. Amount must be non-positive.
 
- 
 
-