|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.powertac.common.TariffSubscription
public class TariffSubscription
A TariffSubscription is an entity representing an association between a Customer and a Tariff. Instances of this class are not intended to be serialized. You get one by calling the subscribe() method on Tariff. If there is no current subscription for that Customer (which in most cases is actually a population model), then a new TariffSubscription is created and returned from the Tariff.
| Constructor Summary | |
|---|---|
TariffSubscription(org.powertac.common.CustomerInfo customer,
org.powertac.common.Tariff tariff)
|
|
| Method Summary | |
|---|---|
org.powertac.common.CustomerInfo |
getCustomer()
|
int |
getCustomersCommitted()
|
int |
getExpiredCustomerCount()
Returns the number of individual customers who may withdraw from this subscription without penalty. |
long |
getId()
|
org.powertac.common.Tariff |
getTariff()
|
double |
getTotalUsage()
|
TariffSubscription |
handleRevokedTariff()
Handles the subscription switch in case the underlying Tariff has been revoked. |
void |
subscribe(int customerCount)
Subscribes some number of discrete customers. |
void |
unsubscribe(int customerCount)
Removes customerCount customers (at most) from this subscription, posts early-withdrawal fees if appropriate. |
void |
usePower(double kWh)
Generates and returns a TariffTransaction instance for the current timeslot that represents the amount of production (negative amount) or consumption (positive amount), along with the credit/debit that results. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TariffSubscription(org.powertac.common.CustomerInfo customer,
org.powertac.common.Tariff tariff)
| Method Detail |
|---|
public long getId()
public org.powertac.common.CustomerInfo getCustomer()
public org.powertac.common.Tariff getTariff()
public int getCustomersCommitted()
public double getTotalUsage()
public void subscribe(int customerCount)
public void unsubscribe(int customerCount)
public TariffSubscription handleRevokedTariff()
public void usePower(double kWh)
public int getExpiredCustomerCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||