@Domain(fields={"postedTimeslot","txType","customerInfo","customerCount","KWh","charge","regulation"}) public class TariffTransaction extends BrokerTransaction
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.).Modifier and Type | Class and Description |
---|---|
static class |
TariffTransaction.Type |
broker, id, postedTimeslot
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
double |
getCharge()
Returns the debit (negative) or credit (positive) to the broker's
money account represented by this transaction.
|
int |
getCustomerCount()
Number of individual customers within the customer model represented
by this transaction.
|
CustomerInfo |
getCustomerInfo() |
double |
getKWh()
Returns the debit (negative) or credit (positive) to the broker's
energy account in the current timeslot represented by this transaction.
|
TariffSpecification |
getTariffSpec()
Returns the TariffSpecification instance to which this transaction applies.
|
TariffTransaction.Type |
getTxType() |
boolean |
isRegulation()
True just in case this is transaction reports exercise of regulation
capacity.
|
String |
toString() |
getBroker, getId, getPostedTime, getPostedTimeslot, getPostedTimeslotIndex
readResolve
@ChainedConstructor @Deprecated public TariffTransaction(Broker broker, int when, TariffTransaction.Type txType, TariffSpecification spec, CustomerInfo customer, int customerCount, double kWh, double charge)
public TariffTransaction(Broker broker, int when, TariffTransaction.Type txType, TariffSpecification spec, CustomerInfo customer, int customerCount, double kWh, double charge, boolean regulation)
public TariffTransaction.Type getTxType()
public CustomerInfo getCustomerInfo()
public int getCustomerCount()
public double getKWh()
public double getCharge()
public boolean isRegulation()
public TariffSpecification getTariffSpec()
Copyright © 2019 Power TAC. All rights reserved.