Class Village
- java.lang.Object
- 
- org.powertac.customer.AbstractCustomer
- 
- org.powertac.householdcustomer.customers.Village
 
 
- 
 public class Village extends 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 SummaryNested Classes Modifier and Type Class Description classVillage.TariffEvaluationWrapper
 - 
Field SummaryFields Modifier and Type Field Description protected static org.apache.logging.log4j.Loggerloglogger for trace logging -- use log.info(), log.warn(), and log.error() appropriately.protected TariffEvaluationHelpertariffEvalHelper- 
Fields inherited from class org.powertac.customer.AbstractCustomerallCustomerInfos, customerInfos, name, rs1, service
 
- 
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconsumePower()voidevaluateTariffs(List<Tariff> tariffs)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<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<CustomerInfo,TariffEvaluator>getTariffEvaluators()This function returns the period Map variable of the village.voidinitialize()Initializes the instance.voidinitialize(Properties conf, int seed, Map<CustomerInfo,String> mapping)This is the initialization function.voidstep()Called to run the model forward one step.voidsubscribeDefault(TariffMarket tariffMarketService)StringtoString()- 
Methods inherited from class org.powertac.customer.AbstractCustomeraddCustomerInfo, changeSubscription, createTariffEvaluator, getCurrentSubscriptions, getCurrentSubscriptions, getCustId, getCustomerInfo, getCustomerInfoList, getCustomerInfos, getId, getName, getPopulation, lastSunday, nextStartOfDay, saveBootstrapState, setName, setServiceAccessor, setTariffMarket, startOfDay
 
- 
 
- 
- 
- 
Field Detail- 
logprotected static org.apache.logging.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.
 - 
tariffEvalHelperprotected final TariffEvaluationHelper tariffEvalHelper 
 
- 
 - 
Constructor Detail- 
Villagepublic Village(String name) This is the constructor function of the Village customer
 
- 
 - 
Method Detail- 
initializepublic void initialize() Description copied from class:AbstractCustomerInitializes the instance. Called after configuration, and after a call to setServices(). TODO -- do we really want this here?- Overrides:
- initializein class- AbstractCustomer
 
 - 
initializepublic void initialize(Properties conf, int seed, Map<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-
- seed-
- mapping-
 
 - 
subscribeDefaultpublic void subscribeDefault(TariffMarket tariffMarketService) 
 - 
consumePowerpublic void consumePower() 
 - 
getHouseMappingpublic Map<CustomerInfo,String> getHouseMapping() This function returns the inertia Map variable of the village.
 - 
getTariffEvaluatorspublic Map<CustomerInfo,TariffEvaluator> getTariffEvaluators() This function returns the period Map variable of the village.
 - 
getHousespublic Vector<Household> getHouses() This function returns a vector with all the houses that are present in this village.
 - 
getHousespublic Vector<Household> getHouses(String type) This function returns a vector with all the households of a certain type that are present in this village.
 - 
evaluateTariffspublic void evaluateTariffs(List<Tariff> tariffs) 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.- Specified by:
- evaluateTariffsin class- AbstractCustomer
 
 - 
steppublic void step() Description copied from class:AbstractCustomerCalled to run the model forward one step.- Specified by:
- stepin class- AbstractCustomer
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- AbstractCustomer
 
 
- 
 
-