org.powertac.householdcustomer.customers
Class Village

java.lang.Object
  extended by org.powertac.common.AbstractCustomer
      extended by org.powertac.householdcustomer.customers.Village

public class Village
extends org.powertac.common.AbstractCustomer

The village domain class is a set of households that comprise a small village that consumes aggregated energy by the appliances installed in each household.

Version:
1.5, Date: 2.25.12
Author:
Antonios Chrysopoulos

Nested Class Summary
 class Village.TariffEvaluationWrapper
           
 
Field Summary
protected static org.apache.log4j.Logger log
          logger for trace logging -- use log.info(), log.warn(), and log.error() appropriately.
protected  org.powertac.common.TariffEvaluationHelper tariffEvalHelper
           
 
Fields inherited from class org.powertac.common.AbstractCustomer
carbonEmissionRate, custId, customerInfos, customerRepo, lowerPowerCap, name, randomSeedRepo, rs1, sunToPowerConversion, tariffMarketService, tariffSubscriptionRepo, tempToPowerConversion, upperPowerCap, windToPowerConversion
 
Constructor Summary
Village(String name)
          This is the constructor function of the Village customer
 
Method Summary
 void addCustomerInfo(org.powertac.common.CustomerInfo customer)
           
 void consumePower()
           
 void evaluateNewTariffs()
          This is the basic evaluation function, taking into consideration the minimum cost without shifting the appliances' load but the tariff chosen is picked up randomly by using a possibility pattern.
 Map<org.powertac.common.CustomerInfo,String> getHouseMapping()
          This function returns the inertia Map variable of the village.
 Vector<Household> getHouses()
          This function returns a vector with all the houses that are present in this village.
 Vector<Household> getHouses(String type)
          This function returns a vector with all the households of a certain type that are present in this village.
 Map<org.powertac.common.CustomerInfo,org.powertac.common.TariffEvaluator> getTariffEvaluators()
          This function returns the period Map variable of the village.
 void initialize(Properties conf, int seed, Map<org.powertac.common.CustomerInfo,String> mapping)
          This is the initialization function.
 void step()
           
 void subscribeDefault()
           
 String toString()
           
 
Methods inherited from class org.powertac.common.AbstractCustomer
changeSubscription, getCarbonEmissionRate, getCustId, getCustomerInfo, getId, getLowerPowerCap, getName, getPopulation, getSunToPowerConversion, getTempToPowerConversion, getUpperPowerCap, getWindToPowerConversion, producePower, subscribe, unsubscribe
 
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
logger for trace logging -- use log.info(), log.warn(), and log.error() appropriately. Use log.debug() for output you want to see in testing or debugging.


tariffEvalHelper

protected final org.powertac.common.TariffEvaluationHelper tariffEvalHelper
Constructor Detail

Village

public Village(String name)
This is the constructor function of the Village customer

Method Detail

initialize

public void initialize(Properties conf,
                       int seed,
                       Map<org.powertac.common.CustomerInfo,String> mapping)
This is the initialization function. It uses the variable values for the configuration file to create the village with its households and then fill them with persons and appliances.

Parameters:
conf -
gen -

addCustomerInfo

public void addCustomerInfo(org.powertac.common.CustomerInfo customer)
Overrides:
addCustomerInfo in class org.powertac.common.AbstractCustomer

subscribeDefault

public void subscribeDefault()
Overrides:
subscribeDefault in class org.powertac.common.AbstractCustomer

consumePower

public void consumePower()
Overrides:
consumePower in class org.powertac.common.AbstractCustomer

getHouseMapping

public Map<org.powertac.common.CustomerInfo,String> getHouseMapping()
This function returns the inertia Map variable of the village.


getTariffEvaluators

public Map<org.powertac.common.CustomerInfo,org.powertac.common.TariffEvaluator> getTariffEvaluators()
This function returns the period Map variable of the village.


getHouses

public Vector<Household> getHouses()
This function returns a vector with all the houses that are present in this village.


getHouses

public Vector<Household> getHouses(String type)
This function returns a vector with all the households of a certain type that are present in this village.


evaluateNewTariffs

public void evaluateNewTariffs()
This is the basic evaluation function, taking into consideration the minimum cost without shifting the appliances' load but the tariff chosen is picked up randomly by using a possibility pattern. The better tariffs have more chances to be chosen.


step

public void step()
Overrides:
step in class org.powertac.common.AbstractCustomer

toString

public String toString()
Overrides:
toString in class org.powertac.common.AbstractCustomer


Copyright © 2013 Power TAC. All Rights Reserved.