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  ArrayList<org.powertac.common.CustomerInfo> customerInfos
          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  String name
          The name of the Abstract Customer
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(String name)
          Abstract Customer constructor.
AbstractCustomer(String name, ArrayList<org.powertac.common.CustomerInfo> customers)
          Overload of the above constructor
 
Method Summary
 void addCustomerInfo(org.powertac.common.CustomerInfo customer)
           
 void changeSubscription(org.powertac.common.Tariff tariff, org.powertac.common.Tariff newTariff, org.powertac.common.CustomerInfo customer)
          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 consumePower()
          The first implementation of the power consumption function.
 double getCarbonEmissionRate()
           
 long getCustId()
           
 ArrayList<org.powertac.common.CustomerInfo> getCustomerInfo()
           
 long getId()
          Synonym for getCustId()
 double getLowerPowerCap()
           
 String getName()
           
 int getPopulation(org.powertac.common.CustomerInfo customer)
           
 double getSunToPowerConversion()
           
 double getTempToPowerConversion()
           
 double getUpperPowerCap()
           
 double getWindToPowerConversion()
           
 void producePower()
          The first implementation of the power consumption function.
 void step()
           
 void subscribe(org.powertac.common.Tariff tariff, int customerCount, org.powertac.common.CustomerInfo customer)
          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


name

protected String name
The name of the Abstract Customer


customerInfos

protected ArrayList<org.powertac.common.CustomerInfo> customerInfos
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(String name)
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.


AbstractCustomer

public AbstractCustomer(String name,
                        ArrayList<org.powertac.common.CustomerInfo> customers)
Overload of the above constructor

Method Detail

toString

public String toString()
Overrides:
toString in class Object

getPopulation

public int getPopulation(org.powertac.common.CustomerInfo customer)

getCustId

public long getCustId()

getId

public long getId()
Synonym for getCustId()


getName

public String getName()

getCustomerInfo

public ArrayList<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()

addCustomerInfo

public void addCustomerInfo(org.powertac.common.CustomerInfo customer)

subscribeDefault

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


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


step

public void step()

changeSubscription

public void changeSubscription(org.powertac.common.Tariff tariff,
                               org.powertac.common.Tariff newTariff,
                               org.powertac.common.CustomerInfo customer)
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. NOTE: Used only for testing...

Parameters:
tariff -

subscribe

public void subscribe(org.powertac.common.Tariff tariff,
                      int customerCount,
                      org.powertac.common.CustomerInfo customer)
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



Copyright © 2013 Power TAC. All Rights Reserved.