org.powertac.common
Class AbstractCustomer

java.lang.Object
  extended by org.powertac.common.AbstractCustomer

public class AbstractCustomer
extends Object

Abstract customer implementation

Author:
Antonios Chrysopoulos

Field Summary
protected  double carbonEmissionRate
          >=0 - gram CO2 per kW/h
protected  long custId
          The id of the Abstract Customer
protected  org.powertac.common.CustomerInfo customerInfo
          The Customer specifications
protected  org.powertac.common.repo.CustomerRepo customerRepo
           
protected static org.apache.log4j.Logger log
           
protected  double lowerPowerCap
          >0: min power consumption (think refrigerator); <0: max power production (think power plant with max capacity)
protected  RandomSeedRepo randomSeedRepo
           
protected  RandomSeed rs1
          Random Number Generator
protected  double sunToPowerConversion
          measures how sun intensity changes translate into load /generation changes of the customer
protected  TariffMarket tariffMarketService
           
protected  TariffSubscriptionRepo tariffSubscriptionRepo
           
protected  double tempToPowerConversion
          measures how temperature changes translate into load / generation changes of the customer
protected  double upperPowerCap
          >0: max power consumption (think consumer with fuse limit); <0: min power production (think nuclear power plant with min output)
protected  double windToPowerConversion
          measures how wind changes translate into load / generation changes of the customer
 
Constructor Summary
AbstractCustomer(org.powertac.common.CustomerInfo customer)
          Abstract Customer constructor.
 
Method Summary
 void changeSubscription(org.powertac.common.Tariff tariff)
          The first implementation of the changing subscription function.
 void changeSubscription(org.powertac.common.Tariff tariff, org.powertac.common.Tariff newTariff)
          In this overloaded implementation of the changing subscription function, Here we just put the tariff we want to change and the whole population is moved to another random tariff.
 void changeSubscription(org.powertac.common.Tariff tariff, org.powertac.common.Tariff newTariff, int populationCount)
          In this overloaded implementation of the changing subscription function, Here we just put the tariff we want to change and amount of the population we want to move to the new tariff.
 void checkRevokedSubscriptions()
          The first implementation of the checking for revoked subscriptions function.
 void consumePower()
          The first implementation of the power consumption function.
 double getCarbonEmissionRate()
           
 long getCustId()
           
 org.powertac.common.CustomerInfo getCustomerInfo()
           
 long getId()
          Synonym for getCustId()
 double getLowerPowerCap()
           
 int getPopulation()
           
 double getSunToPowerConversion()
           
 double getTempToPowerConversion()
           
 double getUpperPowerCap()
           
 double getWindToPowerConversion()
           
 void producePower()
          The first implementation of the power consumption function.
 org.powertac.common.Tariff selectTariff(org.powertac.common.enumerations.PowerType powerType)
          The first implementation of the tariff selection function.
 void step()
           
 void subscribe(org.powertac.common.Tariff tariff, int customerCount)
          Subscribing a certain population amount to a certain subscription
 void subscribeDefault()
          Function utilized at the beginning in order to subscribe to the default tariff
 String toString()
           
 void unsubscribe(TariffSubscription subscription, int customerCount)
          Unsubscribing a certain population amount from a certain subscription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log

tariffMarketService

protected TariffMarket tariffMarketService

tariffSubscriptionRepo

protected TariffSubscriptionRepo tariffSubscriptionRepo

customerRepo

protected org.powertac.common.repo.CustomerRepo customerRepo

randomSeedRepo

protected RandomSeedRepo randomSeedRepo

custId

protected long custId
The id of the Abstract Customer


customerInfo

protected org.powertac.common.CustomerInfo customerInfo
The Customer specifications


upperPowerCap

protected double upperPowerCap
>0: max power consumption (think consumer with fuse limit); <0: min power production (think nuclear power plant with min output)


lowerPowerCap

protected double lowerPowerCap
>0: min power consumption (think refrigerator); <0: max power production (think power plant with max capacity)


carbonEmissionRate

protected double carbonEmissionRate
>=0 - gram CO2 per kW/h


windToPowerConversion

protected double windToPowerConversion
measures how wind changes translate into load / generation changes of the customer


tempToPowerConversion

protected double tempToPowerConversion
measures how temperature changes translate into load / generation changes of the customer


sunToPowerConversion

protected double sunToPowerConversion
measures how sun intensity changes translate into load /generation changes of the customer


rs1

protected RandomSeed rs1
Random Number Generator

Constructor Detail

AbstractCustomer

public AbstractCustomer(org.powertac.common.CustomerInfo customer)
Abstract Customer constructor. It takes the customerInfo as an input. It creates the autowiring required using the Spring Application Context, it creates the new Abstract Customer based on the customerInfo given, creates a new random number generator and adds the newly created customer in the CustomerRepo.

Method Detail

toString

public String toString()
Overrides:
toString in class Object

getPopulation

public int getPopulation()

getCustId

public long getCustId()

getId

public long getId()
Synonym for getCustId()


getCustomerInfo

public org.powertac.common.CustomerInfo getCustomerInfo()

getUpperPowerCap

public double getUpperPowerCap()

getLowerPowerCap

public double getLowerPowerCap()

getCarbonEmissionRate

public double getCarbonEmissionRate()

getWindToPowerConversion

public double getWindToPowerConversion()

getTempToPowerConversion

public double getTempToPowerConversion()

getSunToPowerConversion

public double getSunToPowerConversion()

subscribeDefault

public void subscribeDefault()
Function utilized at the beginning in order to subscribe to the default tariff


subscribe

public void subscribe(org.powertac.common.Tariff tariff,
                      int customerCount)
Subscribing a certain population amount to a certain subscription


unsubscribe

public void unsubscribe(TariffSubscription subscription,
                        int customerCount)
Unsubscribing a certain population amount from a certain subscription


consumePower

public void consumePower()
The first implementation of the power consumption function. I utilized the mean consumption of a neighborhood of households with a random variable


producePower

public void producePower()
The first implementation of the power consumption function. I utilized the mean consumption of a neighborhood of households with a random variable


changeSubscription

public void changeSubscription(org.powertac.common.Tariff tariff)
The first implementation of the changing subscription function. Here we just put the tariff we want to change and the whole population is moved to another random tariff.

Parameters:
tariff -

changeSubscription

public void changeSubscription(org.powertac.common.Tariff tariff,
                               org.powertac.common.Tariff newTariff)
In this overloaded implementation of the changing subscription function, Here we just put the tariff we want to change and the whole population is moved to another random tariff.

Parameters:
tariff -

changeSubscription

public void changeSubscription(org.powertac.common.Tariff tariff,
                               org.powertac.common.Tariff newTariff,
                               int populationCount)
In this overloaded implementation of the changing subscription function, Here we just put the tariff we want to change and amount of the population we want to move to the new tariff.

Parameters:
tariff -

selectTariff

public org.powertac.common.Tariff selectTariff(org.powertac.common.enumerations.PowerType powerType)
The first implementation of the tariff selection function. This is a random chooser of the available tariffs, totally insensitive.


checkRevokedSubscriptions

public void checkRevokedSubscriptions()
The first implementation of the checking for revoked subscriptions function.


step

public void step()


Copyright © 2011 Power TAC. All Rights Reserved.