@Domain public class Tariff extends Object
This is not a serializable type; The server and brokers are responsible for creating and maintaining their own Tariff entities if they have an interest in the transformation of TariffSpecification represented by a Tariff instance.
NOTE: When creating one of these for the first time, you must call the init() method to initialize the publication date. It does not work to call it inside the constructor for some reason.
Modifier and Type | Class and Description |
---|---|
static class |
Tariff.State |
Constructor and Description |
---|
Tariff(TariffSpecification spec)
Creates a new Tariff from the given TariffSpecification.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addHourlyCharge(HourlyCharge newCharge,
long rateId)
Adds a new HourlyCharge to its Rate.
|
Broker |
getBroker() |
double |
getEarlyWithdrawPayment()
Payment from customer to broker for canceling subscription before
minDuration has elapsed.
|
org.joda.time.Instant |
getExpiration() |
long |
getId()
make id a synonym for specId
|
Tariff |
getIsSupersededBy() |
double |
getMaxUpRegulation(double kwh,
double cumulativeUsage)
Returns the maximum interruptible quantity in kwh for this tariff in
the current timeslot, for the specified proposed and cumulative usage.
|
double |
getMeanConsumptionPrice() |
long |
getMinDuration()
Delegation for TariffSpecification.minDuration
|
org.joda.time.Instant |
getOfferDate() |
double |
getPeriodicPayment()
Flat payment per period for two-part tariffs, typically negative.
|
PowerType |
getPowerType()
Type of power covered by this tariff
|
double |
getRealizedPrice()
Returns the actual realized price, or 0.0 if information unavailable.
|
double |
getRegulationCharge(double kwh,
double cumulativeUsage,
boolean recordUsage)
Returns the usage charge for regulation usage/or production.
|
double |
getSignupPayment()
One-time payment for subscribing to tariff, negative for payment
from customer, positive for payment to customer.
|
long |
getSpecId() |
Tariff.State |
getState() |
TariffSpecification |
getTariffSpec() |
TariffSpecification |
getTariffSpecification() |
double |
getTotalCost() |
double |
getTotalUsage() |
double |
getUsageCharge(double kwh,
double cumulativeUsage,
boolean recordUsage)
Returns the usage charge for a single customer in the current timeslot.
|
double |
getUsageCharge(org.joda.time.Instant when,
double kwh,
double cumulativeUsage)
Returns the usage charge for a single customer using an amount of
energy at some time in the past or future.
|
double |
getUsageCharge(org.joda.time.Instant when,
double kwh,
double cumulativeUsage,
TariffEvaluationHelper helper)
Returns a risk-adjusted usage charge, with prices for variable rates
adjusted by the given TariffEvaluationHelper.
|
boolean |
hasRegulationRate()
Wrapper for TariffSpecification.hasRegulationRate()
|
boolean |
init()
Initializes tariff by building the rate map.
|
boolean |
isActive()
True just in case this tariff is OFFERED or ACTIVE
|
boolean |
isAnalyzed()
Returns the analyzed flag.
|
boolean |
isCovered()
True just in case the set of Rates cover all the possible hour
and tier slots.
|
boolean |
isExpired()
True just in case the current time is past the expiration date
of this Tariff.
|
boolean |
isInterruptible()
True just in case this tariff could result in curtailment
|
boolean |
isRevoked()
True just in case this tariff has been revoked.
|
boolean |
isSubscribable()
True just in case this tariff can accept new subscriptions
|
boolean |
isTiered()
True just in case this tariff has at least one tiered rate
|
boolean |
isTimeOfUse()
True just in case this tariff has at least one Time-of-Use rate
|
boolean |
isVariableRate()
True just in case this tariff has at least one dynamic rate
|
boolean |
isWeekly() |
double |
overpricedDownRegulationRatio() |
double |
overpricedUpRegulationRatio()
Applies price constraint to down-regulation quantity.
|
void |
setExpiration(org.joda.time.Instant newDate) |
void |
setState(Tariff.State newState)
Updates the state of this tariff.
|
public Tariff(TariffSpecification spec)
public boolean init()
public TariffSpecification getTariffSpecification()
public long getSpecId()
public long getId()
@StateChange public boolean addHourlyCharge(HourlyCharge newCharge, long rateId)
public double getRealizedPrice()
public long getMinDuration()
public PowerType getPowerType()
public double getSignupPayment()
public double getEarlyWithdrawPayment()
public double getPeriodicPayment()
public double getMaxUpRegulation(double kwh, double cumulativeUsage)
public double getUsageCharge(double kwh, double cumulativeUsage, boolean recordUsage)
If the recordUsage parameter is true, then the usage and price will be recorded to update the realizedPrice.
public double getRegulationCharge(double kwh, double cumulativeUsage, boolean recordUsage)
public double overpricedUpRegulationRatio()
public double overpricedDownRegulationRatio()
public double getUsageCharge(org.joda.time.Instant when, double kwh, double cumulativeUsage)
public double getUsageCharge(org.joda.time.Instant when, double kwh, double cumulativeUsage, TariffEvaluationHelper helper)
public org.joda.time.Instant getExpiration()
public boolean isExpired()
@StateChange public void setExpiration(org.joda.time.Instant newDate)
public org.joda.time.Instant getOfferDate()
public boolean isCovered()
public TariffSpecification getTariffSpec()
public Broker getBroker()
public Tariff.State getState()
@StateChange public void setState(Tariff.State newState)
public boolean isActive()
public Tariff getIsSupersededBy()
public double getTotalCost()
public double getTotalUsage()
public double getMeanConsumptionPrice()
public boolean isWeekly()
public boolean isRevoked()
public boolean isSubscribable()
public boolean isTimeOfUse()
public boolean isTiered()
public boolean isVariableRate()
public boolean isInterruptible()
public boolean hasRegulationRate()
public boolean isAnalyzed()
Copyright © 2019 Power TAC. All rights reserved.