|
||||||||||
| 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 | |
|---|---|
void |
deferredUnsubscribe(int customerCount)
Handles the actual unsubscribe operation. |
double |
getCurtailment()
Returns the curtailment in kwh for the previous timeslot. |
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()
|
double |
getMaxRemainingCurtailment()
Returns the maximum curtailment possible after the customer model has run and possibly applied economic controls. |
org.powertac.common.Tariff |
getTariff()
|
double |
getTotalUsage()
|
void |
handleRevokedTariff()
Handles the subscription switch in case the underlying Tariff has been revoked. |
void |
postBalancingControl(double kwh)
Posts a BalancingControlEvent to the subscription. |
void |
postRatioControl(double ratio)
Posts the ratio for an EconomicControlEvent to the subscription for the current timeslot. |
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 void deferredUnsubscribe(int customerCount)
public void handleRevokedTariff()
public void usePower(double kwh)
public void postRatioControl(double ratio)
public void postBalancingControl(double kwh)
public double getCurtailment()
public double getMaxRemainingCurtailment()
public int getExpiredCustomerCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||