Package org.powertac.common
Class TariffEvaluator
- java.lang.Object
- 
- org.powertac.common.TariffEvaluator
 
- 
 public class TariffEvaluator extends Object Tariff evaluation process intended to simplify customer models. There should be one of these created for each CustomerInfo instance within a customer model, since tariff cost values are cached, and are dependent on PowerType.- Author:
- John Collins
 
- 
- 
Constructor SummaryConstructors Constructor Description TariffEvaluator(CustomerModelAccessor cma)TariffEvaluator(CustomerModelAccessor cma, ServerConfiguration config)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description doublecomputeInconvenience(Tariff tariff)Computes composite per-tariff inconvenience of a tariff.voidevaluateTariffs()Evaluates tariffs and updates subscriptions for a single customer model with a single power type.doublegetInterruptibilityFactor()Returns inconvenience of interruptibility.doublegetTieredRateFactor()Returns inconvenience of tiered rate.doublegetTouFactor()Returns inconvenience of time-of-use rate.doublegetVariablePricingFactor()Returns inconvenience of variable pricing.voidinitializeCostFactors(double wtExpected, double wtMax, double wtRealized, double soldThreshold)Delegates profile cost factors to helper.voidinitializeInconvenienceFactors(double touFactor, double tieredRateFactor, double variablePricingFactor, double interruptibilityFactor)Initializes the per-tariff inconvenience factors.voidinitializeRegulationFactors(double expectedCurtailment, double expectedDischarge, double expectedDownRegulation)Initializes the per-timeslot regulation-capacity estimates.TariffEvaluatorwithChunkSize(int size)Sets the target size of allocation chunks.TariffEvaluatorwithEvaluateAllTariffs(boolean value)If true, then tariff evaluations are not saved; instead, all tariffs are evaluated each time.TariffEvaluatorwithInconvenienceWeight(double weight)Sets the weight given to inconvenience (as opposed to cost) in computing tariff utility.TariffEvaluatorwithInertia(double inertia)Sets the steady-state evaluation inertia for the customer.TariffEvaluatorwithPreferredContractDuration(double days)Sets the preferred maximum contract duration in days.TariffEvaluatorwithRationality(double rationality)Sets the level of rationality for this customer.TariffEvaluatorwithSignupBonusFactor(double factor)Sets the factor by which inertia is multiplied for the case where the current tariff had a positive signup bonus.TariffEvaluatorwithTariffEvalDepth(int depth)Sets the number of tariffs/broker of each applicable PowerType to consider.TariffEvaluatorwithTariffSwitchFactor(double factor)Sets the inconvenience of switching tariffs.
 
- 
- 
- 
Constructor Detail- 
TariffEvaluatorpublic TariffEvaluator(CustomerModelAccessor cma, ServerConfiguration config) 
 - 
TariffEvaluatorpublic TariffEvaluator(CustomerModelAccessor cma) 
 
- 
 - 
Method Detail- 
initializeCostFactorspublic void initializeCostFactors(double wtExpected, double wtMax, double wtRealized, double soldThreshold)Delegates profile cost factors to helper.
 - 
initializeInconvenienceFactorspublic void initializeInconvenienceFactors(double touFactor, double tieredRateFactor, double variablePricingFactor, double interruptibilityFactor)Initializes the per-tariff inconvenience factors. These are not normalized; it is up to the customer model to normalize the per-tariff and cross-tariff factors as appropriate
 - 
initializeRegulationFactorspublic void initializeRegulationFactors(double expectedCurtailment, double expectedDischarge, double expectedDownRegulation)Initializes the per-timeslot regulation-capacity estimates. All three represent per-timeslot estimates of exercised regulation capacity, and are applicable only for tariffs with regulation rates. Note that the expectedDischarge parameter only applies to storage devices that can be discharged (batteries, pumped storage). Values are from the customer's viewpoint, so curtailment and discharge are negative (less energy for the customer) and down-regulation is positive. Default value for each of these factors is zero.
 - 
withChunkSizepublic TariffEvaluator withChunkSize(int size) Sets the target size of allocation chunks. Default is 1. Actual chunk size will be at least 0.5% of the population size.
 - 
withTariffEvalDepthpublic TariffEvaluator withTariffEvalDepth(int depth) Sets the number of tariffs/broker of each applicable PowerType to consider. Default is 5, which means that only the 5 most recent tariffs of each applicable PowerType from each broker are considered. So if there are 10 brokers, and the PowerType is ELECTRIC_VEHICLE, the applicable PowerTypes would be CONSUMPTION, INTERRUPTIBLE_CONSUMPTION, and ELECTRIC_VEHICLE. If each broker has published at least five tariffs for each of these types, the default value of 5 would result in evaluating up to 150 alternative tariffs in addition to the currently subscribed tariff(s).
 - 
withEvaluateAllTariffspublic TariffEvaluator withEvaluateAllTariffs(boolean value) If true, then tariff evaluations are not saved; instead, all tariffs are evaluated each time. This is needed for customers that generate usage profiles that are sensitive to current conditions or state.
 - 
withInertiapublic TariffEvaluator withInertia(double inertia) Sets the steady-state evaluation inertia for the customer. This is a value in [0,1], where 0 is no inertia (always evaluates), and 1 is total couch-potato inertia (never bothers to evaluate). The instantaneous value starts at zero, so customers will have a chance to switch away from the default tariff at the beginning of a sim, and is temporarily set to zero when a tariff is revoked. Default value is 0.8.
 - 
withSignupBonusFactorpublic TariffEvaluator withSignupBonusFactor(double factor) Sets the factor by which inertia is multiplied for the case where the current tariff had a positive signup bonus. Should be 0 \le sbf \le 1. Default value is zero.
 - 
withRationalitypublic TariffEvaluator withRationality(double rationality) Sets the level of rationality for this customer. Household customers are expected to have lower rationality than business/industrial/institutional customers. 1.0 is fully rational, 0.5 is quite irrational. A value of zero will result in random choices. Default value is 0.9.
 - 
withInconvenienceWeightpublic TariffEvaluator withInconvenienceWeight(double weight) Sets the weight given to inconvenience (as opposed to cost) in computing tariff utility. Must be in the range [0,1]. Default value is 0.2.
 - 
withTariffSwitchFactorpublic TariffEvaluator withTariffSwitchFactor(double factor) Sets the inconvenience of switching tariffs. Default value is 0.04.
 - 
withPreferredContractDurationpublic TariffEvaluator withPreferredContractDuration(double days) Sets the preferred maximum contract duration in days. For tariffs having a non-zero early-withdrawal fee, this is the period after which the cost of withdrawal is discounted. It is also the standard period over which usage cost is compared against signup/withdrawal payments. Default value is 6 days.
 - 
evaluateTariffspublic void evaluateTariffs() Evaluates tariffs and updates subscriptions for a single customer model with a single power type. Also handles tariff revoke/supersede. This requires that each Customer model call this method once on each tariff publication cycle.
 - 
getTouFactorpublic double getTouFactor() Returns inconvenience of time-of-use rate.
 - 
getTieredRateFactorpublic double getTieredRateFactor() Returns inconvenience of tiered rate.
 - 
getVariablePricingFactorpublic double getVariablePricingFactor() Returns inconvenience of variable pricing.
 - 
getInterruptibilityFactorpublic double getInterruptibilityFactor() Returns inconvenience of interruptibility.
 - 
computeInconveniencepublic double computeInconvenience(Tariff tariff) Computes composite per-tariff inconvenience of a tariff.
 
- 
 
-