org.powertac.common
Class TariffTransaction
java.lang.Object
org.powertac.common.BrokerTransaction
org.powertac.common.TariffTransaction
public class TariffTransaction
- extends BrokerTransaction
A TariffTransaction instance represents the kWh of energy consumed
(kWh < 0) or produced kWh > 0 by 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
TariffTransaction
public TariffTransaction(Broker broker,
org.joda.time.Instant when,
TariffTransaction.Type txType,
TariffSpecification spec,
CustomerInfo customer,
int customerCount,
double kWh,
double charge)
- 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.
getTxType
public TariffTransaction.Type getTxType()
getCustomerInfo
public CustomerInfo getCustomerInfo()
getCustomerCount
public 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.
getKWh
public double getKWh()
- Returns the debit (negative) or credit (positive) to the broker's
energy account in the current timeslot represented by this transaction.
getCharge
public double getCharge()
- Returns the debit (negative) or credit (positive) to the broker's
money account represented by this transaction.
getTariffSpec
public TariffSpecification getTariffSpec()
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2012. All Rights Reserved.