|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.powertac.common.state.XStreamStateLoggable
org.powertac.common.TariffMessage
org.powertac.common.TariffSpecification
public class TariffSpecification
Represents a Tariff offered by a Broker to customers. A Tariff specifies prices for energy in various circumstances, along with upfront and periodic payments and basic constraints. This class is a value type -- a serializable, immutable data structure. You need to initialize a Tariff from it to make serious use of it. New tariffs and their Rates are communicated to Customers and to Brokers when tariffs are published.
TariffSpecifications and their associated Rates and HourlyCharges are specified from the Customer's viewpoint in terms of quantities and charges. In other words, a positive charge means the broker pays the customer, while a positive energy quantity means the broker sends energy to the customer.
Note: Must be serialized "deep" to gather up the Rates and associated HourlyCharge instances.
| Field Summary |
|---|
| Fields inherited from class org.powertac.common.TariffMessage |
|---|
broker, id |
| Constructor Summary | |
|---|---|
TariffSpecification(Broker broker,
PowerType powerType)
Creates a new TariffSpecification for a broker and a specific powerType. |
|
| Method Summary | |
|---|---|
TariffSpecification |
addRate(Rate rate)
Adds a new Rate to this tariff. |
TariffSpecification |
addSupersedes(long specId)
Indicates that this tariff supersedes the tariff specified by the specId, the id of the superseded tariff. |
Broker |
getBroker()
|
double |
getEarlyWithdrawPayment()
|
org.joda.time.Instant |
getExpiration()
|
long |
getId()
|
long |
getMinDuration()
|
double |
getPeriodicPayment()
|
PowerType |
getPowerType()
|
List<Rate> |
getRates()
|
double |
getSignupPayment()
|
List<Long> |
getSupersedes()
|
String |
toString()
Returns a String giving the id, broker username, and powertype |
TariffSpecification |
withEarlyWithdrawPayment(double earlyWithdrawPayment)
Sets the payment for a customer who withdraws from a subscription to this tariff before the minimumDuration has expired. |
TariffSpecification |
withExpiration(org.joda.time.Instant expiration)
Sets the expiration date for this tariff. |
TariffSpecification |
withMinDuration(long minDuration)
Sets the minimum duration of a subscription for this tariff. |
TariffSpecification |
withPeriodicPayment(double periodicPayment)
Sets the daily payment per customer for subscriptions to this tariff. |
TariffSpecification |
withSignupPayment(double signupPayment)
Sets the signup payment for new subscriptions. |
| Methods inherited from class org.powertac.common.state.XStreamStateLoggable |
|---|
readResolve |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TariffSpecification(Broker broker,
PowerType powerType)
withX() methods.
| Method Detail |
|---|
public PowerType getPowerType()
public org.joda.time.Instant getExpiration()
public TariffSpecification withExpiration(org.joda.time.Instant expiration)
public long getMinDuration()
public TariffSpecification withMinDuration(long minDuration)
public double getSignupPayment()
public TariffSpecification withSignupPayment(double signupPayment)
public double getEarlyWithdrawPayment()
public TariffSpecification withEarlyWithdrawPayment(double earlyWithdrawPayment)
public double getPeriodicPayment()
public TariffSpecification withPeriodicPayment(double periodicPayment)
public long getId()
getId in class TariffMessagepublic Broker getBroker()
getBroker in class TariffMessagepublic List<Rate> getRates()
public TariffSpecification addRate(Rate rate)
public List<Long> getSupersedes()
public TariffSpecification addSupersedes(long specId)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||