@Domain 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 regulationAccumulator 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.
|
RegulationAccumulator |
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 |
setCustomersCommitted(int value) |
void |
setRegulation(double newValue) |
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 posts 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()
@StateChange public void setCustomersCommitted(int value)
public double getTotalUsage()
@StateChange public void subscribe(int customerCount)
public void unsubscribe(int customerCount)
@StateChange public void deferredUnsubscribe(int customerCount)
public org.powertac.common.Tariff handleRevokedTariff()
public void usePower(double kwh)
@Deprecated public double getCurtailment()
public double getRegulation()
@StateChange public void setRegulation(double newValue)
@StateChange public void setRegulationCapacity(RegulationCapacity capacity)
public void ensureRegulationCapacity()
public boolean hasRegulationRate()
@StateChange public void postRatioControl(double ratio)
@StateChange public void postBalancingControl(double kwh)
public RegulationAccumulator getRemainingRegulationCapacity()
public int getExpiredCustomerCount()
Copyright © 2016 Power TAC. All Rights Reserved.