Package org.powertac.common
Class TariffTransaction
- java.lang.Object
- 
- org.powertac.common.state.XStreamStateLoggable
- 
- org.powertac.common.BrokerTransaction
- 
- org.powertac.common.TariffTransaction
 
 
 
- 
 @Domain(fields={"postedTimeslot","txType","customerInfo","customerCount","KWh","charge","regulation"}) public class TariffTransaction extends BrokerTransaction ATariffTransactioninstance represents the kWh of energy consumed (kWh < 0) or producedkWh > 0by some members of a specific customer model, in a specific timeslot, under a particular tariff. Note that this is an immutable type, and therefore is not auditable. Instances are created by the TariffMarket and communicated to brokers to represent customer interactions with tariffs (subscribe, consume, etc.).- Author:
- Carsten Block, John Collins
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classTariffTransaction.Type
 - 
Field Summary- 
Fields inherited from class org.powertac.common.BrokerTransactionbroker, id, postedTimeslot
 
- 
 - 
Constructor SummaryConstructors Constructor Description TariffTransaction(Broker broker, int when, TariffTransaction.Type txType, TariffSpecification spec, CustomerInfo customer, int customerCount, double kWh, double charge)Deprecated.TariffTransaction(Broker broker, int when, TariffTransaction.Type txType, TariffSpecification spec, CustomerInfo customer, int customerCount, double kWh, double charge, boolean regulation)Creates a new TariffTransaction for broker of type txType against a particular tariff spec and customer.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetCharge()Returns the debit (negative) or credit (positive) to the broker's money account represented by this transaction.intgetCustomerCount()Number of individual customers within the customer model represented by this transaction.CustomerInfogetCustomerInfo()doublegetKWh()Returns the debit (negative) or credit (positive) to the broker's energy account in the current timeslot represented by this transaction.TariffSpecificationgetTariffSpec()Returns the TariffSpecification instance to which this transaction applies.TariffTransaction.TypegetTxType()booleanisRegulation()True just in case this is transaction reports exercise of regulation capacity.StringtoString()- 
Methods inherited from class org.powertac.common.BrokerTransactiongetBroker, getId, getPostedTime, getPostedTimeslot, getPostedTimeslotIndex
 - 
Methods inherited from class org.powertac.common.state.XStreamStateLoggablereadResolve
 
- 
 
- 
- 
- 
Constructor Detail- 
TariffTransaction@ChainedConstructor @Deprecated public TariffTransaction(Broker broker, int when, TariffTransaction.Type txType, TariffSpecification spec, CustomerInfo customer, int customerCount, double kWh, double charge) Deprecated.Creates a new TariffTransaction that is not a regulation transaction.
 - 
TariffTransactionpublic TariffTransaction(Broker broker, int when, TariffTransaction.Type txType, TariffSpecification spec, CustomerInfo customer, int customerCount, double kWh, double charge, boolean regulation) Creates a new TariffTransaction for broker of type txType against a particular tariff spec and customer. Energy quantity and charge is specified from the Broker's viewpoint, so a consumption transaction would have kwh < 0 and charge > 0.
 
- 
 - 
Method Detail- 
getTxTypepublic TariffTransaction.Type getTxType() 
 - 
getCustomerInfopublic CustomerInfo getCustomerInfo() 
 - 
getCustomerCountpublic int getCustomerCount() Number of individual customers within the customer model represented by this transaction. The value will always be less than or equal to the population represented by the customerInfo.
 - 
getKWhpublic double getKWh() Returns the debit (negative) or credit (positive) to the broker's energy account in the current timeslot represented by this transaction.
 - 
getChargepublic double getCharge() Returns the debit (negative) or credit (positive) to the broker's money account represented by this transaction.
 - 
isRegulationpublic boolean isRegulation() True just in case this is transaction reports exercise of regulation capacity.
 - 
getTariffSpecpublic TariffSpecification getTariffSpec() Returns the TariffSpecification instance to which this transaction applies.
 
- 
 
-