@Domain public class TariffSubscription extends Object
| Constructor and Description |
|---|
TariffSubscription(org.powertac.common.CustomerInfo customer,
long tariffId)
Alternate constructor for logtool analyzers in which Tariffs cannot
be reconstructed.
|
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()
Returns the regulation in kwh, aggregated across the subscribed population,
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 |
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() |
long |
getTariffId() |
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 generates 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 TariffSubscription(org.powertac.common.CustomerInfo customer,
long tariffId)
public long getId()
public org.powertac.common.CustomerInfo getCustomer()
public org.powertac.common.Tariff getTariff()
public long getTariffId()
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)
public double getCurtailment()
public double getRegulation()
public void setRegulation(double newValue)
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 © 2019 Power TAC. All rights reserved.