org.powertac.common
Class TariffEvaluator

java.lang.Object
  extended by 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 Summary
TariffEvaluator(CustomerModelAccessor cma)
           
 
Method Summary
 double computeInconvenience(org.powertac.common.Tariff tariff)
          Computes composite per-tariff inconvenience of a tariff.
 void evaluateTariffs()
          Evaluates tariffs and updates subscriptions for a single customer model with a single power type.
 double getInterruptibilityFactor()
          Returns inconvenience of interruptibility.
 double getTieredRateFactor()
          Returns inconvenience of tiered rate.
 double getTouFactor()
          Returns inconvenience of time-of-use rate.
 double getVariablePricingFactor()
          Returns inconvenience of variable pricing.
 void initializeCostFactors(double wtExpected, double wtMax, double wtRealized, double soldThreshold)
          Delegates profile cost factors to helper.
 void initializeInconvenienceFactors(double touFactor, double tieredRateFactor, double variablePricingFactor, double interruptibilityFactor)
          Initializes the per-tariff inconvenience factors.
 TariffEvaluator withChunkSize(int size)
          Sets the target size of allocation chunks.
 TariffEvaluator withInconvenienceWeight(double weight)
          Sets the weight given to inconvenience (as opposed to cost) in computing tariff utility.
 TariffEvaluator withInertia(double inertia)
          Sets the steady-state evaluation inertia for the customer.
 TariffEvaluator withPreferredContractDuration(double days)
          Sets the preferred maximum contract duration in days.
 TariffEvaluator withRationality(double rationality)
          Sets the level of rationality for this customer.
 TariffEvaluator withTariffEvalDepth(int depth)
          Sets the number of tariffs/broker of each applicable PowerType to consider.
 TariffEvaluator withTariffSwitchFactor(double factor)
          Sets the inconvenience of switching tariffs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TariffEvaluator

public TariffEvaluator(CustomerModelAccessor cma)
Method Detail

initializeCostFactors

public void initializeCostFactors(double wtExpected,
                                  double wtMax,
                                  double wtRealized,
                                  double soldThreshold)
Delegates profile cost factors to helper.


initializeInconvenienceFactors

public 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


withChunkSize

public 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.


withTariffEvalDepth

public 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).


withInertia

public 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.


withRationality

public 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.


withInconvenienceWeight

public 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.


withTariffSwitchFactor

public TariffEvaluator withTariffSwitchFactor(double factor)
Sets the inconvenience of switching tariffs. Default value is 0.04.


withPreferredContractDuration

public TariffEvaluator withPreferredContractDuration(double days)
Sets the preferred maximum contract duration in days. For tariffs having a non-zero early-withdraway 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.


evaluateTariffs

public 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.


getTouFactor

public double getTouFactor()
Returns inconvenience of time-of-use rate.


getTieredRateFactor

public double getTieredRateFactor()
Returns inconvenience of tiered rate.


getVariablePricingFactor

public double getVariablePricingFactor()
Returns inconvenience of variable pricing.


getInterruptibilityFactor

public double getInterruptibilityFactor()
Returns inconvenience of interruptibility.


computeInconvenience

public double computeInconvenience(org.powertac.common.Tariff tariff)
Computes composite per-tariff inconvenience of a tariff.



Copyright © 2013 Power TAC. All Rights Reserved.