public class TariffSubscription extends Object
| Constructor and Description |
|---|
TariffSubscription(org.powertac.common.CustomerInfo customer,
org.powertac.common.Tariff tariff)
You need a CustomerInfo and a Tariff to create one of these.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deferredUnsubscribe(int customerCount)
Handles the actual unsubscribe operation.
|
void |
ensureRegulationCapacity()
Ensures that regulationCapacity is non-null -
needed for non-regulatable customer models
|
double |
getCurtailment()
Deprecated.
Use getRegulation() instead, but remember that it returns
a per-member value, while this method returns an aggregate value.
|
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 |
getRegulation()
Returns the regulation quantity exercised per member
in the previous timeslot.
|
RegulationCapacity |
getRemainingRegulationCapacity()
Returns the maximum aggregate up-regulation possible after the
customer model has run and possibly applied economic controls.
|
org.powertac.common.Tariff |
getTariff() |
double |
getTotalUsage() |
org.powertac.common.Tariff |
handleRevokedTariff()
Handles the subscription switch in case the underlying Tariff has been
revoked.
|
boolean |
hasRegulationRate()
True just in case this subscription allows regulation.
|
void |
postBalancingControl(double kwh)
Posts a BalancingControlEvent to the subscription and generate the correct
TariffTransaction.
|
void |
postRatioControl(double ratio)
Posts the ratio for an EconomicControlEvent to the subscription for the
current timeslot.
|
void |
setRegulationCapacity(RegulationCapacity capacity)
Communicates the ability of the customer model to handle regulation
requests.
|
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.
|
public TariffSubscription(org.powertac.common.CustomerInfo customer,
org.powertac.common.Tariff tariff)
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 org.powertac.common.Tariff handleRevokedTariff()
public void usePower(double kwh)
@Deprecated public double getCurtailment()
public double getRegulation()
public void setRegulationCapacity(RegulationCapacity capacity)
public void ensureRegulationCapacity()
public boolean hasRegulationRate()
public void postRatioControl(double ratio)
public void postBalancingControl(double kwh)
public RegulationCapacity getRemainingRegulationCapacity()
public int getExpiredCustomerCount()
Copyright © 2014 Power TAC. All Rights Reserved.